Permalink
Browse files

livetestencoder.sh

  • Loading branch information...
1 parent a88374b commit d68cbcc4959cbef70cfa0601cf70b091622f7905 nicolargo committed May 28, 2011
View
0 audio-rcv-amr.sh 100644 → 100755
No changes.
View
0 audio-rcv-celt.sh 100644 → 100755
No changes.
View
0 audio-rcv-speex.sh 100644 → 100755
No changes.
View
0 audio-snd-amr.sh 100644 → 100755
No changes.
View
0 audio-snd-celt.sh 100644 → 100755
No changes.
View
0 audio-snd-speex.sh 100644 → 100755
No changes.
View
@@ -1,3 +1,31 @@
#!/bin/sh
+# Script to test video codecs (live)
+# Nicolargo - http://blog.nicolargo.com/gstreamer
-gst-launch autovideosrc ! videoscale ! videorate ! "video/x-raw-yuv,width=(int)320,height=(int)240,framerate=(fraction)15/1" ! tee name="display" ! queue ! cairotextoverlay text="Apres" shaded-background=true ! ffenc_mpeg4 bitrate=128000 ! decodebin ! autovideosink display. ! queue ! cairotextoverlay text="Avant" shaded-background=true ! autovideosink
+CODEC1="ffenc_mpeg4" ; CODEC1_OPT="bitrate=128000"
+CODEC2="xvidenc" ; CODEC2_OPT="bitrate=128000 profile=145"
+#CODEC1="vp8enc" ; CODEC_OPT1="max-latency=1 mode=cbr"
+
+# Compare two codecs (CODEC1 vs CODEC2) and also vs source
+
+gst-launch -tv autovideosrc ! videoscale ! videorate \
+ ! "video/x-raw-yuv,width=(int)320,height=(int)240,framerate=(fraction)15/1" \
+ ! tee name="source" \
+ ! tee name="codec1" \
+ ! queue ! cairotextoverlay text="$CODEC2" shaded-background=true \
+ ! $CODEC2 $CODEC_OPT2 ! decodebin ! autovideosink \
+ codec1. \
+ ! queue ! cairotextoverlay text="$CODEC1" shaded-background=true \
+ ! $CODEC1 $CODEC_OPT1 ! decodebin ! autovideosink \
+ source. \
+ ! queue ! cairotextoverlay text="Source" shaded-background=true ! autovideosink
+
+# Compare codec vs source
+
+gst-launch -tv autovideosrc ! videoscale ! videorate \
+ ! "video/x-raw-yuv,width=(int)320,height=(int)240,framerate=(fraction)15/1" \
+ ! tee name="source" \
+ ! queue ! cairotextoverlay text="$CODEC1" shaded-background=true \
+ ! $CODEC1 $CODEC_OPT1 ! decodebin ! autovideosink \
+ source. \
+ ! queue ! cairotextoverlay text="Source" shaded-background=true ! autovideosink

0 comments on commit d68cbcc

Please sign in to comment.