[FFmpeg-user] Muxing Dvb Subtitles stopping output

Kousthu Gangarapu gkousthu1997 at gmail.com
Thu Aug 31 15:45:19 EEST 2023


Hi,

I have an input feed that contains video, multiple audio, and dvb_subtitles
streams. I am transcoding the audio and video and copying the dvb_subtitles
where subtitles are not coming continuously(for example during commercial
breaks).
But as per the FFmpeg documentation *max_interleave_delta* default value
will be *10sec* so the other streams will be buffered without writing into
the output file. Due to this facing playback glitches and not able achieve
Constant Bitrate


*FFmpeg command*

ffmpeg -y -v debug -fix_sub_duration -i <srt_input> -f mpegts -vcodec
libx264 -scodec copy -s 1920x1080 -b:v 3M -r 25/1 -acodec libfdk_aac -b:a
128000 -ar 48000 -sc_threshold 0 -profile:v main -level 4.0 -preset fast
-x264opts nal-hrd=cbr -g 50 -maxrate 3M -minrate 3M -bufsize 6M -muxrate
4.5M -pcr_period 20 -pat_period 0.1 -map 0:v -map 0:a -map 0:s
-max_muxing_queue_size 9999 <srt_output>

Below are my questions:

   1. Can we be able to flush the audio and video packets without
   buffering?
   *tried -fflags +flush_packets and -flush_packets 1 but failed to achieve*
   2. Will reducing the max_interleave_delta to 1sec(1000000) or lesser sec
   causes any issues(like PES drops, sync issues etc)
   *Tried reducing to 1sec observing DTS < PCR Invalid TS warning and
   unable to decode*

I truly appreciate any suggestions, or corrections you can offer to help me
overcome these challenges.


Regards,

Kousthub


More information about the ffmpeg-user mailing list