From 54afab7061292bd88314d51c580ed3f2dd846c24 Mon Sep 17 00:00:00 2001 From: atze Date: Fri, 4 Aug 2017 14:46:36 +0200 Subject: [PATCH 1/3] change subsampling to 420 because vocto currently uses 420 internally --- .../ffmpeg/record-mixed-ffmpeg-segmented-timestamps.sh | 2 +- example-scripts/ffmpeg/record-mixed-ffmpeg-segmented.sh | 2 +- example-scripts/ffmpeg/record-mixed-ffmpeg.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented-timestamps.sh b/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented-timestamps.sh index 48d8d1fb..fda070d8 100755 --- a/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented-timestamps.sh +++ b/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented-timestamps.sh @@ -8,7 +8,7 @@ ffmpeg \ -y -nostdin \ -i tcp://localhost:11000 \ -ac 2 -channel_layout 2 -aspect 16:9 \ - -map 0:v -c:v:0 mpeg2video -pix_fmt:v:0 yuv422p -qscale:v:0 2 -qmin:v:0 2 -qmax:v:0 7 -keyint_min 0 -bf:0 0 -g:0 0 -intra:0 -maxrate:0 90M \ + -map 0:v -c:v:0 mpeg2video -pix_fmt:v:0 yuv420p -qscale:v:0 2 -qmin:v:0 2 -qmax:v:0 7 -keyint_min 0 -bf:0 0 -g:0 0 -intra:0 -maxrate:0 90M \ -map 0:a -c:a:0 mp2 -b:a:0 192k -ac:a:0 2 -ar:a:0 48000 \ -flags +global_header -flags +ilme+ildct \ -f segment -segment_time 180 -segment_format mpegts segment-%t-%05d.ts diff --git a/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented.sh b/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented.sh index 341aa27f..1d2ec688 100755 --- a/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented.sh +++ b/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented.sh @@ -3,7 +3,7 @@ ffmpeg \ -y -nostdin \ -i tcp://localhost:11000 \ -ac 2 -channel_layout 2 -aspect 16:9 \ - -map 0:v -c:v:0 mpeg2video -pix_fmt:v:0 yuv422p -qscale:v:0 2 -qmin:v:0 2 -qmax:v:0 7 -keyint_min 0 -bf:0 0 -g:0 0 -intra:0 -maxrate:0 90M \ + -map 0:v -c:v:0 mpeg2video -pix_fmt:v:0 yuv420p -qscale:v:0 2 -qmin:v:0 2 -qmax:v:0 7 -keyint_min 0 -bf:0 0 -g:0 0 -intra:0 -maxrate:0 90M \ -map 0:a -c:a:0 mp2 -b:a:0 192k -ac:a:0 2 -ar:a:0 48000 \ -flags +global_header -flags +ilme+ildct \ -f segment -segment_time 180 -segment_format mpegts segment-%d.ts diff --git a/example-scripts/ffmpeg/record-mixed-ffmpeg.sh b/example-scripts/ffmpeg/record-mixed-ffmpeg.sh index c9b583ee..392f93df 100755 --- a/example-scripts/ffmpeg/record-mixed-ffmpeg.sh +++ b/example-scripts/ffmpeg/record-mixed-ffmpeg.sh @@ -3,7 +3,7 @@ ffmpeg \ -y -nostdin \ -i tcp://localhost:11000 \ -ac 2 -channel_layout 2 -aspect 16:9 \ - -map 0:v -c:v:0 mpeg2video -pix_fmt:v:0 yuv422p -qscale:v:0 2 -qmin:v:0 2 -qmax:v:0 7 -keyint_min 0 -bf:0 0 -g:0 0 -intra:0 -maxrate:0 90M \ + -map 0:v -c:v:0 mpeg2video -pix_fmt:v:0 yuv420p -qscale:v:0 2 -qmin:v:0 2 -qmax:v:0 7 -keyint_min 0 -bf:0 0 -g:0 0 -intra:0 -maxrate:0 90M \ -map 0:a -c:a:0 mp2 -b:a:0 192k -ac:a:0 2 -ar:a:0 48000 \ -flags +global_header -flags +ilme+ildct \ -f mpegts output.ts From ad59a7f148c1e7f57acb0902aadda2dbd1930ff2 Mon Sep 17 00:00:00 2001 From: atze Date: Fri, 4 Aug 2017 14:55:15 +0200 Subject: [PATCH 2/3] abandon FFmpeg timestamp patch --- .../ffmpeg/record-mixed-ffmpeg-segmented-timestamps.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented-timestamps.sh b/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented-timestamps.sh index fda070d8..7628a34d 100755 --- a/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented-timestamps.sh +++ b/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented-timestamps.sh @@ -1,9 +1,5 @@ #!/bin/sh -# WARNING: Using '%t' in the output filename requires a patched FFmpeg! -# If this command fails with the message 'Invalid segment filename template', -# you do not have such a FFmpeg version. - ffmpeg \ -y -nostdin \ -i tcp://localhost:11000 \ @@ -11,4 +7,4 @@ ffmpeg \ -map 0:v -c:v:0 mpeg2video -pix_fmt:v:0 yuv420p -qscale:v:0 2 -qmin:v:0 2 -qmax:v:0 7 -keyint_min 0 -bf:0 0 -g:0 0 -intra:0 -maxrate:0 90M \ -map 0:a -c:a:0 mp2 -b:a:0 192k -ac:a:0 2 -ar:a:0 48000 \ -flags +global_header -flags +ilme+ildct \ - -f segment -segment_time 180 -segment_format mpegts segment-%t-%05d.ts + -f segment -segment_time 180 -segment_format mpegts -strftime 1 segment-%Y-%m-%d_%H-%M-%S.ts From ee4430333f524781c4da16b726ee7c215be7b42c Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Sat, 5 Aug 2017 10:59:59 +0200 Subject: [PATCH 3/3] remove simple segmented variant as upstream ffmpeg now can do timestamped segments --- example-scripts/ffmpeg/record-mixed-ffmpeg-segmented.sh | 9 --------- 1 file changed, 9 deletions(-) delete mode 100755 example-scripts/ffmpeg/record-mixed-ffmpeg-segmented.sh diff --git a/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented.sh b/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented.sh deleted file mode 100755 index 1d2ec688..00000000 --- a/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -ffmpeg \ - -y -nostdin \ - -i tcp://localhost:11000 \ - -ac 2 -channel_layout 2 -aspect 16:9 \ - -map 0:v -c:v:0 mpeg2video -pix_fmt:v:0 yuv420p -qscale:v:0 2 -qmin:v:0 2 -qmax:v:0 7 -keyint_min 0 -bf:0 0 -g:0 0 -intra:0 -maxrate:0 90M \ - -map 0:a -c:a:0 mp2 -b:a:0 192k -ac:a:0 2 -ar:a:0 48000 \ - -flags +global_header -flags +ilme+ildct \ - -f segment -segment_time 180 -segment_format mpegts segment-%d.ts