Created
January 27, 2014 01:24
-
-
Save rtucker/8641882 to your computer and use it in GitHub Desktop.
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 | |
FONTFILE=/usr/share/fonts/truetype/freefont/FreeSerif.ttf | |
TEXT="bladeRF_ATSC_Demo_TBM2" | |
VIDEOFILE="tbm_tdf_2.mp4" | |
OUTFILE="tbm_tdf_2.ts" | |
FILTERS="-vf drawtext=fontfile=${FONTFILE}:text=${TEXT}:x=100:y=50:fontsize=72:[email protected]:box=1:[email protected] -t 327" | |
VIDEO_CODEC="-vcodec mpeg2video -s hd720 -r 25" | |
VIDEO_QUALITY="-b:v:0 8M" | |
AUDIO_CODEC="-acodec ac3_fixed" | |
AUDIO_QUALITY="-b:a:0 384k -ar 48k -ac 2" | |
if [ -n "${VIDEOFILE}" ]; then | |
VIDEOFILE="-i ${VIDEOFILE}" | |
fi | |
if [ -n "${AUDIOFILE}" ]; then | |
AUDIOFILE="-i ${AUDIOFILE}" | |
fi | |
avconv -re \ | |
${VIDEOFILE} ${AUDIOFILE} \ | |
${VIDEO_CODEC} \ | |
${FILTERS} \ | |
${VIDEO_QUALITY} \ | |
${AUDIO_CODEC} \ | |
${AUDIO_QUALITY} \ | |
-muxrate 19393000 -f mpegts \ | |
-metadata service_name="${OUTFILE}" \ | |
-metadata service_provider="BladeRF ATSC Demo" \ | |
${OUTFILE} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment