[FFmpeg-user] SCTE-35 passthrough in transcoding process
Dennis Mungai
dmngaie at gmail.com
Fri Jan 17 23:08:24 EET 2020
On Fri, 17 Jan 2020, 19:02 , <jamesed84.it at gmail.com> wrote:
> Hello,
>
>
>
> I am transcoding cable sourced streams with an SCTE-35 data stream. The
> output seems to drop the SCTE-35 type and shows just bin_data on an
> ffprobe.
> I am wondering if there is a way to properly set that type on the output or
> preserve it.
>
>
>
> FFprobe of Source stream:
>
> hostname:~$ ffprobe udp://@239.1.1.12:59012
>
> ffprobe version 4.2.1 Copyright (c) 2007-2019 the FFmpeg developers
>
> built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
>
> configuration: --prefix=/home/circle/ffmpeg_build
> --pkg-config-flags=--static
> --extra-cflags=-I/home/circle/ffmpeg_build/include
> --extra-ldflags=-L/home/circle/ffmpeg_build/lib --extra-libs='-lpthread
> -lm'
> --bindir=/home/circle/bin --enable-libsrt --enable-gpl --enable-libass
> --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame
> --enable-libvorbis --enable-libx264 --enable-libx265 --enable-nonfree
> --enable-nvenc
>
> libavutil 56. 31.100 / 56. 31.100
>
> libavcodec 58. 54.100 / 58. 54.100
>
> libavformat 58. 29.100 / 58. 29.100
>
> libavdevice 58. 8.100 / 58. 8.100
>
> libavfilter 7. 57.100 / 7. 57.100
>
> libswscale 5. 5.100 / 5. 5.100
>
> libswresample 3. 5.100 / 3. 5.100
>
> libpostproc 55. 5.100 / 55. 5.100
>
> [mpeg2video @ 0x560dabb59040] Invalid frame dimensions 0x0.
>
> Last message repeated 28 times
>
> Input #0, mpegts, from 'udp://@239.1.1.12:59012':
>
> Duration: N/A, start: 10753.571022, bitrate: N/A
>
> Program 715
>
> Stream #0:0[0x120]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
> yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions,
> 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc
>
> Stream #0:1[0x121](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz,
> 5.1(side), fltp, 384 kb/s
>
> Stream #0:2[0x122](spa): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz,
> stereo, fltp, 192 kb/s
>
> Stream #0:3[0x140]: Data: scte_35
>
> Unsupported codec with id 98305 for input stream 3
>
>
>
>
>
> Transcoding command and process:
>
> hostname:~$ ffmpeg -hwaccel nvdec -i 'udp://@239.1.1.12:59012' -map 0
> -vcodec h264_nvenc -b:v 1500K -s hd480 -acodec copy -f mpegts -metadata
> service_name="YES" -metadata service_provider="company"
> 'udp://@239.1.124.12:59012?pkt_size=1316'
>
> ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
>
> built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
>
> configuration: --prefix=/home/circle/ffmpeg_build
> --pkg-config-flags=--static
> --extra-cflags=-I/home/circle/ffmpeg_build/include
> --extra-ldflags=-L/home/circle/ffmpeg_build/lib --extra-libs='-lpthread
> -lm'
> --bindir=/home/circle/bin --enable-libsrt --enable-gpl --enable-libass
> --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame
> --enable-libvorbis --enable-libx264 --enable-libx265 --enable-nonfree
> --enable-nvenc
>
> libavutil 56. 31.100 / 56. 31.100
>
> libavcodec 58. 54.100 / 58. 54.100
>
> libavformat 58. 29.100 / 58. 29.100
>
> libavdevice 58. 8.100 / 58. 8.100
>
> libavfilter 7. 57.100 / 7. 57.100
>
> libswscale 5. 5.100 / 5. 5.100
>
> libswresample 3. 5.100 / 3. 5.100
>
> libpostproc 55. 5.100 / 55. 5.100
>
> [mpeg2video @ 0x556ef51bc800] Invalid frame dimensions 0x0.
>
> Last message repeated 10 times
>
> Input #0, mpegts, from 'udp://@239.1.1.12:59012':
>
> Duration: N/A, start: 10015.331022, bitrate: N/A
>
> Program 715
>
> Stream #0:0[0x120]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
> yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions,
> 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc
>
> Stream #0:1[0x121](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz,
> stereo, fltp, 192 kb/s
>
> Stream #0:2[0x122](spa): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz,
> stereo, fltp, 192 kb/s
>
> Stream #0:3[0x140]: Data: scte_35
>
> Stream mapping:
>
> Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (h264_nvenc))
>
> Stream #0:1 -> #0:1 (copy)
>
> Stream #0:2 -> #0:2 (copy)
>
> Stream #0:3 -> #0:3 (copy)
>
> Press [q] to stop, [?] for help
>
> Output #0, mpegts, to 'udp://@239.1.124.12:59012?pkt_size=1316':
>
> Metadata:
>
> service_name : YES
>
> service_provider: company
>
> encoder : Lavf58.29.100
>
> Stream #0:0: Video: h264 (h264_nvenc) (Main), nv12, 852x480 [SAR
> 640:639
> DAR 16:9], q=-1--1, 1500 kb/s, 59.94 fps, 90k tbn, 59.94 tbc
>
> Metadata:
>
> encoder : Lavc58.54.100 h264_nvenc
>
> Side data:
>
> cpb: bitrate max/min/avg: 0/0/1500000 buffer size: 3000000 vbv_delay:
> -1
>
> Stream #0:1(eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo,
> fltp, 192 kb/s
>
> Stream #0:2(spa): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo,
> fltp, 192 kb/s
>
> Stream #0:3: Data: scte_35
>
>
>
>
>
> FFPROBE output information:
>
> hostname:~$ ffprobe udp://@239.1.124.12:59012
>
> ffprobe version 4.2.1 Copyright (c) 2007-2019 the FFmpeg developers
>
> built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
>
> configuration: --prefix=/home/circle/ffmpeg_build
> --pkg-config-flags=--static
> --extra-cflags=-I/home/circle/ffmpeg_build/include
> --extra-ldflags=-L/home/circle/ffmpeg_build/lib --extra-libs='-lpthread
> -lm'
> --bindir=/home/circle/bin --enable-libsrt --enable-gpl --enable-libass
> --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame
> --enable-libvorbis --enable-libx264 --enable-libx265 --enable-nonfree
> --enable-nvenc
>
> libavutil 56. 31.100 / 56. 31.100
>
> libavcodec 58. 54.100 / 58. 54.100
>
> libavformat 58. 29.100 / 58. 29.100
>
> libavdevice 58. 8.100 / 58. 8.100
>
> libavfilter 7. 57.100 / 7. 57.100
>
> libswscale 5. 5.100 / 5. 5.100
>
> libswresample 3. 5.100 / 3. 5.100
>
> libpostproc 55. 5.100 / 55. 5.100
>
> Input #0, mpegts, from 'udp://@239.1.124.12:59012':
>
> Duration: N/A, start: 19.224000, bitrate: N/A
>
> Program 1
>
> Metadata:
>
> service_name : YES
>
> service_provider: company
>
> Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B),
> yuv420p(progressive), 852x480 [SAR 640:639 DAR 16:9], 59.94 fps, 59.94 tbr,
> 90k tbn, 119.88 tbc
>
> Stream #0:1[0x101](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000
> Hz,
> stereo, fltp, 192 kb/s
>
> Stream #0:2[0x102](spa): Audio: ac3 ([129][0][0][0] / 0x0081), 48000
> Hz,
> stereo, fltp, 192 kb/s
>
> Stream #0:3[0x103]: Data: bin_data ([6][0][0][0] / 0x0006)
>
> Unsupported codec with id 100359 for input stream 3
>
Hey there,
A few years back, there were developers working on scte 35 support in
ffmpeg, and so far, the mpegts demuxer recognizes the SCTE 35 codec (due to
the patch work written by a certain Carlos Fernandez Sans). However, these
threads were often mired by a lot of push-back by some developers here and
these efforts did not amount to much. It's as if they never wanted to see
support for SCTE-35 event splicing enabled, for some reason(s) beyond the
quality of code committed then.
Examples of such threads (one by Anshul Maheshwari):
https://ffmpeg.org/pipermail/ffmpeg-devel/2015-January/167487.html
And works by Carlos:
https://lists.ffmpeg.org/pipermail/ffmpeg-cvslog/2016-October/102553.html
Of which only the codec ID info was merged:
https://lists.ffmpeg.org/pipermail/ffmpeg-cvslog/2016-October/102552.html
As things are at the moment, the workflow you desire with SCTE-35 seems to
be unsupported.
>
More information about the ffmpeg-user
mailing list