more-examples
This commit is contained in:
parent
e90a9d30d6
commit
1211611cac
20
compose-gstreamer.sh
Normal file
20
compose-gstreamer.sh
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
gst-launch-1.0 \
|
||||||
|
compositor name=comp sink_0::xpos=0 sink_0::ypos=0 sink_1::xpos=1920 sink_1::ypos=0 ! \
|
||||||
|
'video/x-raw(memory:NVMM),width=3840,height=1080,framerate=60/1,format=I420' ! \
|
||||||
|
nvv4l2h264enc bitrate=10000000 control-rate=1 idrinterval=1 tuning-info-id=3 preset-id=1 profile=0 ! \
|
||||||
|
h264parse config-interval=1 ! \
|
||||||
|
mpegtsmux ! \
|
||||||
|
rtpmp2tpay ! \
|
||||||
|
udpsink host=239.239.239.3 port=2055 auto-multicast=true sync=false async=false qos=false \
|
||||||
|
\
|
||||||
|
decklinkvideosrc device-number=0 connection=1 mode=1080p60 drop-no-signal-frames=true ! \
|
||||||
|
nvvideoconvert ! \
|
||||||
|
'video/x-raw(memory:NVMM),format=I420' ! \
|
||||||
|
comp.sink_0 \
|
||||||
|
\
|
||||||
|
decklinkvideosrc device-number=1 connection=1 mode=1080p60 drop-no-signal-frames=true ! \
|
||||||
|
nvvideoconvert ! \
|
||||||
|
'video/x-raw(memory:NVMM),format=I420' ! \
|
||||||
|
comp.sink_1
|
||||||
16
compose-playback.sh
Normal file
16
compose-playback.sh
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
gst-launch-1.0 udpsrc address=239.239.239.3 port=2055 ! \
|
||||||
|
"application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP2T" ! \
|
||||||
|
rtpmp2tdepay ! \
|
||||||
|
tsdemux ! \
|
||||||
|
h264parse ! \
|
||||||
|
avdec_h264 ! \
|
||||||
|
videoconvert ! \
|
||||||
|
tee name=t \
|
||||||
|
\
|
||||||
|
t. ! queue ! videocrop left=0 right=1920 top=0 bottom=0 ! \
|
||||||
|
autovideosink sync=false \
|
||||||
|
\
|
||||||
|
t. ! queue ! videocrop left=1920 right=0 top=0 bottom=0 ! \
|
||||||
|
autovideosink sync=false
|
||||||
@ -13,4 +13,11 @@ fi
|
|||||||
|
|
||||||
#this script checks the PSNR between two video streams using ffmpeg
|
#this script checks the PSNR between two video streams using ffmpeg
|
||||||
# one video stream is the reference and the other is the test stream both are recorded files
|
# one video stream is the reference and the other is the test stream both are recorded files
|
||||||
ffmpeg -i "$1" -i "$2" -filter_complex "psnr" -f null /dev/null
|
ffmpeg -f rawvideo -video_size 1920x1080 -pixel_format yuv444p -color_range pc -framerate 30 -i "$1" -i "$2" -filter_complex "psnr" -f null /dev/null
|
||||||
|
# example working:
|
||||||
|
# ffmpeg -f rawvideo -video_size 1920x1080 -pixel_format yuv444p -color_range pc -framerate 30 -i base.yuv -i test.mp4 -filter_complex "psnr" -f null /dev/null
|
||||||
|
|
||||||
|
#this script checks the SSIM between two video streams using ffmpeg
|
||||||
|
ffmpeg -f rawvideo -video_size 1920x1080 -pixel_format yuv444p -color_range pc -framerate 30 -i "$1" -i "$2" -filter_complex "[0:v][1:v]ssim=stats_file=ssim_results.txt" -f null /dev/null
|
||||||
|
|
||||||
|
# ffmpeg -f rawvideo -video_size 1920x1080 -pixel_format yuv422p -color_range pc -framerate 30 -i base.yuv -i test.mp4 -filter_complex "[0:v][1:v]ssim=stats_file=ssim_results.txt" -f null /dev/null
|
||||||
@ -21,10 +21,10 @@ fi
|
|||||||
if [ "$3" == "DEBUG" ]; then
|
if [ "$3" == "DEBUG" ]; then
|
||||||
gst-launch-1.0 -e \
|
gst-launch-1.0 -e \
|
||||||
videotestsrc pattern=smpte ! \
|
videotestsrc pattern=smpte ! \
|
||||||
capsfilter caps="video/x-raw,format=RGBA,width=1920,height=1080,framerate=30/1" ! \
|
capsfilter caps="video/x-raw,format=UYVY,width=1920,height=1080,framerate=30/1" ! \
|
||||||
videoconvert ! queue ! tee name=t \
|
videoconvert ! queue ! tee name=t \
|
||||||
t. ! queue ! filesink location="$1" \
|
t. ! queue ! filesink location="$1" \
|
||||||
t. ! queue ! x264enc bitrate=5000 speed-preset=ultrafast tune=zerolatency ! h264parse ! mpegtsmux ! filesink location="$2"
|
t. ! queue ! x264enc bitrate=20000 speed-preset=ultrafast tune=zerolatency ! h264parse ! mpegtsmux ! filesink location="$2"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -35,4 +35,4 @@ gst-launch-1.0 -e \
|
|||||||
mode=auto \
|
mode=auto \
|
||||||
drop-no-signal-frames=true ! videoconvert ! queue ! tee name=t \
|
drop-no-signal-frames=true ! videoconvert ! queue ! tee name=t \
|
||||||
t. ! queue ! mpegtsmux ! filesink location="$1" \
|
t. ! queue ! mpegtsmux ! filesink location="$1" \
|
||||||
t. ! queue ! x264enc bitrate=5000 speed-preset=ultrafast tune=zerolatency ! mpegtsmux ! filesink location="$2"
|
t. ! queue ! x264enc bitrate=20000 speed-preset=ultrafast tune=zerolatency ! mpegtsmux ! filesink location="$2"
|
||||||
Loading…
x
Reference in New Issue
Block a user