testing pipelines
This commit is contained in:
parent
dd8c03dfb5
commit
e90a9d30d6
16
ffmpeg-psnr-check.sh
Normal file
16
ffmpeg-psnr-check.sh
Normal file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Usage: $0 <input_video> <reference_video>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v ffmpeg &> /dev/null
|
||||
then
|
||||
echo "ffmpeg could not be found, please install it."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#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
|
||||
ffmpeg -i "$1" -i "$2" -filter_complex "psnr" -f null /dev/null
|
||||
17
gstPlayback.sh
Executable file
17
gstPlayback.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Set environment variables for GStreamer latency tracing.
|
||||
# Note: We are using a different log file name to avoid overwriting the sender's log.
|
||||
GST_DEBUG_COLOR_MODE=off \
|
||||
GST_TRACERS="latency(flags=pipeline+element)" \
|
||||
GST_DEBUG="GST_TRACER:7" \
|
||||
GST_DEBUG_FILE=latency_traces_receiver.log \
|
||||
gst-launch-1.0 -v \
|
||||
udpsrc uri="udp://239.239.239.3:8889" ! \
|
||||
"application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP2T" ! \
|
||||
rtpmp2tdepay ! \
|
||||
tsdemux ! \
|
||||
h264parse ! \
|
||||
avdec_h264 ! \
|
||||
videoconvert ! \
|
||||
autovideosink sync=false
|
||||
38
gstreamer-record.sh
Executable file
38
gstreamer-record.sh
Executable file
@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This script record two video streams using gstreamer and saves them to files
|
||||
# The first video stream is the reference and the second is the encoded stream to be tested
|
||||
# First stream is coming from decklinkvideosrc
|
||||
# Second stream is same decklinkvideosrc but encoded using x264enc
|
||||
# Both streams are saved to files using mp4mux and filesink
|
||||
|
||||
if [ "$#" -lt 2 ]; then
|
||||
echo "Usage: $0 <reference_video_file> <test_video_file> <optional: DEBUG>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v gst-launch-1.0 &> /dev/null
|
||||
then
|
||||
echo "gstreamer could not be found, please install it."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Record both streams in one run
|
||||
if [ "$3" == "DEBUG" ]; then
|
||||
gst-launch-1.0 -e \
|
||||
videotestsrc pattern=smpte ! \
|
||||
capsfilter caps="video/x-raw,format=RGBA,width=1920,height=1080,framerate=30/1" ! \
|
||||
videoconvert ! queue ! tee name=t \
|
||||
t. ! queue ! filesink location="$1" \
|
||||
t. ! queue ! x264enc bitrate=5000 speed-preset=ultrafast tune=zerolatency ! h264parse ! mpegtsmux ! filesink location="$2"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
gst-launch-1.0 -e \
|
||||
decklinkvideosrc \
|
||||
device-number=1 \
|
||||
connection=1 \
|
||||
mode=auto \
|
||||
drop-no-signal-frames=true ! videoconvert ! queue ! tee name=t \
|
||||
t. ! queue ! mpegtsmux ! filesink location="$1" \
|
||||
t. ! queue ! x264enc bitrate=5000 speed-preset=ultrafast tune=zerolatency ! mpegtsmux ! filesink location="$2"
|
||||
Loading…
x
Reference in New Issue
Block a user