diff options
author | MaZderMind <git@mazdermind.de> | 2016-01-29 17:59:34 +0100 |
---|---|---|
committer | MaZderMind <git@mazdermind.de> | 2016-01-29 17:59:34 +0100 |
commit | 4ddbb55eac513c1863a453a8d21cd6c8dc167661 (patch) | |
tree | 29e31ec4e17f3929342deffbbd611494934d19d8 /example-scripts/ffmpeg | |
parent | b3d585c78a3c8245232ddbd28a88f4130f8ca5a5 (diff) |
add a global resolution-config for all example-scripts
Diffstat (limited to 'example-scripts/ffmpeg')
8 files changed, 40 insertions, 11 deletions
diff --git a/example-scripts/ffmpeg/source-avsync-test-clip-as-cam1.sh b/example-scripts/ffmpeg/source-avsync-test-clip-as-cam1.sh index 5c0f47e..fd55f05 100755 --- a/example-scripts/ffmpeg/source-avsync-test-clip-as-cam1.sh +++ b/example-scripts/ffmpeg/source-avsync-test-clip-as-cam1.sh @@ -1,7 +1,12 @@ #!/bin/sh +. `dirname "$0"`/../config.sh ffmpeg -y \ -i http://c3voc.mazdermind.de/testfiles/avsync.ts \ - -vf scale=1920x1080 \ + -filter_complex " + [0:v] scale=$WIDTH:$HEIGHT,fps=$FRAMERATE [v] ; + [0:a] aresample=$AUDIORATE [a] + " \ + -map "[v]" -map "[a]" \ -c:v rawvideo \ -c:a pcm_s16le \ -pix_fmt yuv420p \ diff --git a/example-scripts/ffmpeg/source-avsync-test-clip-looped-as-cam1.sh b/example-scripts/ffmpeg/source-avsync-test-clip-looped-as-cam1.sh index c454dd7..4de3f83 100755 --- a/example-scripts/ffmpeg/source-avsync-test-clip-looped-as-cam1.sh +++ b/example-scripts/ffmpeg/source-avsync-test-clip-looped-as-cam1.sh @@ -1,8 +1,13 @@ #!/bin/sh +. `dirname "$0"`/../config.sh wget -nc -O /tmp/avsync.ts http://c3voc.mazdermind.de/testfiles/avsync.ts (while true; do cat /tmp/avsync.ts || exit; done) | ffmpeg -y \ -i - \ - -vf scale=1920x1080 \ + -filter_complex " + [0:v] scale=$WIDTH:$HEIGHT,fps=$FRAMERATE [v] ; + [0:a] aresample=$AUDIORATE [a] + " \ + -map "[v]" -map "[a]" \ -c:v rawvideo \ -c:a pcm_s16le \ -pix_fmt yuv420p \ diff --git a/example-scripts/ffmpeg/source-background-loop.sh b/example-scripts/ffmpeg/source-background-loop.sh index 00ff35c..3613862 100755 --- a/example-scripts/ffmpeg/source-background-loop.sh +++ b/example-scripts/ffmpeg/source-background-loop.sh @@ -1,8 +1,12 @@ #!/bin/sh +. `dirname "$0"`/../config.sh wget -nc -O /tmp/bg.ts http://c3voc.mazdermind.de/testfiles/bg.ts while true; do cat /tmp/bg.ts || exit 1; done |\ ffmpeg -re -i - \ - -map 0:v \ + -filter_complex " + [0:v] scale=$WIDTH:$HEIGHT,fps=$FRAMERATE [v] + " \ + -map "[v]" \ -c:v rawvideo \ -pix_fmt yuv420p \ -f matroska \ diff --git a/example-scripts/ffmpeg/source-mjpg-framegrabber.sh b/example-scripts/ffmpeg/source-mjpg-framegrabber.sh index 6b47bf7..c470a91 100755 --- a/example-scripts/ffmpeg/source-mjpg-framegrabber.sh +++ b/example-scripts/ffmpeg/source-mjpg-framegrabber.sh @@ -1,12 +1,12 @@ #!/bin/sh +. `dirname "$0"`/../config.sh ffmpeg -y \ -i "http://10.73.5.2:1881/stream.mjpg" \ -filter_complex " - [0:v] scale=1920:1080,fps=25 [v] ; - anullsrc=r=48000:cl=stereo [a] + [0:v] scale=$WIDTH:$HEIGHT,fps=$FRAMERATE [v] ; + anullsrc=r=$AUDIORATE:cl=stereo [a] " \ - -map "[v]" \ - -map "[a]" \ + -map "[v]" -map "[a]" \ -c:a pcm_s16le \ -c:v rawvideo \ -pix_fmt yuv420p \ diff --git a/example-scripts/ffmpeg/source-nostream-music.sh b/example-scripts/ffmpeg/source-nostream-music.sh index 71bc1ed..9a8c877 100755 --- a/example-scripts/ffmpeg/source-nostream-music.sh +++ b/example-scripts/ffmpeg/source-nostream-music.sh @@ -1,10 +1,11 @@ #!/bin/sh +. `dirname "$0"`/../config.sh wget -nc -O /tmp/machine_lullaby_1.ogg http://c3voc.mazdermind.de/testfiles/machine_lullaby_1.ogg while true; do ffmpeg -y \ -i "/tmp/machine_lullaby_1.ogg" \ -ac 2 \ - -af aresample=48000 \ + -af aresample=$AUDIORATE \ -c:a pcm_s16le \ -f matroska \ tcp://localhost:18000 diff --git a/example-scripts/ffmpeg/source-nostream-pause-loop.sh b/example-scripts/ffmpeg/source-nostream-pause-loop.sh index 65b7436..69ac366 100755 --- a/example-scripts/ffmpeg/source-nostream-pause-loop.sh +++ b/example-scripts/ffmpeg/source-nostream-pause-loop.sh @@ -1,8 +1,12 @@ #!/bin/sh +. `dirname "$0"`/../config.sh wget -nc -O /tmp/pause.ts http://c3voc.mazdermind.de/testfiles/pause.ts while true; do cat /tmp/pause.ts || exit 1; done |\ ffmpeg -re -i - \ - -map 0:v \ + -filter_complex " + [0:v] scale=$WIDTH:$HEIGHT,fps=$FRAMERATE [v] + " \ + -map '[v]' \ -c:v rawvideo \ -pix_fmt yuv420p \ -f matroska \ diff --git a/example-scripts/ffmpeg/source-testvideo-as-cam1.sh b/example-scripts/ffmpeg/source-testvideo-as-cam1.sh index ef73a08..bd68933 100755 --- a/example-scripts/ffmpeg/source-testvideo-as-cam1.sh +++ b/example-scripts/ffmpeg/source-testvideo-as-cam1.sh @@ -1,8 +1,13 @@ #!/bin/sh +. `dirname "$0"`/../config.sh ffmpeg -y \ -i "http://ftp.uni-erlangen.de/cdn.media.ccc.de/broadcast/sendezentrum/h264-hd/31c3-sendezentrum-1013-de-Methodisch_inkorrekt_Die_falsche_42_hd.mp4" \ -ac 2 \ - -af aresample=48000 \ + -filter_complex " + [0:v] scale=$WIDTH:$HEIGHT,fps=$FRAMERATE [v] ; + [0:a] aresample=$AUDIORATE [a] + " \ + -map "[v]" -map "[a]" \ -pix_fmt yuv420p \ -c:v rawvideo \ -c:a pcm_s16le \ diff --git a/example-scripts/ffmpeg/source-testvideo-as-cam2.sh b/example-scripts/ffmpeg/source-testvideo-as-cam2.sh index 7cb795a..1c72485 100755 --- a/example-scripts/ffmpeg/source-testvideo-as-cam2.sh +++ b/example-scripts/ffmpeg/source-testvideo-as-cam2.sh @@ -1,8 +1,13 @@ #!/bin/sh +. `dirname "$0"`/../config.sh ffmpeg -y \ -i "http://ftp.uni-erlangen.de/cdn.media.ccc.de/broadcast/sendezentrum/h264-hd/31c3-sendezentrum-1003-de-Freak_Show_FS147_That_Escalatored_Quickly_hd.mp4" \ -ac 2 \ - -af aresample=48000 \ + -filter_complex " + [0:v] scale=$WIDTH:$HEIGHT,fps=$FRAMERATE [v] ; + [0:a] aresample=$AUDIORATE [a] + " \ + -map "[v]" -map "[a]" \ -pix_fmt yuv420p \ -c:v rawvideo \ -c:a pcm_s16le \ |