Last active
August 29, 2015 14:07
-
-
Save jledet/cc5bc8ed3d1bc2731d2f to your computer and use it in GitHub Desktop.
Generate synchronized testvideo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Lenght in seconds | |
LENGTH=300 | |
if [[ $# -lt 1 ]]; then | |
echo "usage: $0 <output-file>" | |
exit | |
fi | |
gst-launch-1.0 \ | |
mp4mux name=m ! filesink location=$1 sync=false \ | |
\ | |
videotestsrc pattern=12 num-buffers=$LENGTH timestamp-offset=450000000 ! \ | |
'video/x-raw,width=1280,height=720,framerate=1/1' ! \ | |
videorate skip-to-first=true ! \ | |
'video/x-raw,framerate=20/1' ! \ | |
timeoverlay halignment=1 valignment=4 font-desc="sans 50" ! \ | |
x264enc bitrate=1024 key-int-max=10 ! \ | |
m. \ | |
\ | |
audiotestsrc wave=8 num-buffers=$LENGTH samplesperbuffer=44100 ! \ | |
'audio/x-raw,samplerate=44100/1' ! \ | |
lamemp3enc ! \ | |
m. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment