[FFmpeg-user] ffmpeg scte35

Devin Heitmueller devin.heitmueller at ltnglobal.com
Fri Jun 18 23:57:46 EEST 2021

On Thu, Jun 17, 2021 at 5:48 AM Javier Fuentes <jfuentes at flumotion.com> wrote:
> Good Morning:
> I have tried to copy the stream with the scte35 or subtitle  data from an
> rtp stream to udp but in the resulting stream I lose data. I try to use the
> option -map 0 -codec copy -scodec text -dcodec
> copy or only -map 0 -codec copy but the output is the same.
> In subtitle case if a try to use tmp output like this ffmpeg -txt_format
> text -txt_page subtitle -i "srt://" -map
> 0:0 -map 0:1 -map 0:4  -codec copy -scodec text  -f flv rtmp://
>, the subtitle are copied successfully

You can't simply use -codec copy to get SCTE-35 from the source to the
destination.  The PMT has to be properly set up in the output stream
and the SCTE-35 sections themselves have to be re-written to take into
account changes in the PTS clock.

I've got a tree at the following URL which allows SCTE-35 to be
preserved across ffmpeg transcoding in the case where the input and
output are MPEG-TS (should work fine with UDP or SRT inputs/outputs).
Supporting FLV/RTMP is a whole different problem that this patch
series doesn't attempt to address.



Devin Heitmueller, Senior Software Engineer
LTN Global Communications
o: +1 (301) 363-1001
w: https://ltnglobal.com  e: devin.heitmueller at ltnglobal.com

More information about the ffmpeg-user mailing list