subtitles – Handling non continuous input dvb_subtitles in mpegts stream using FFmpeg
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.
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:
- Can we able to flush the audio and video packets without buffering?
tried -fflags +flush_packets and -flush_packets 1 but failed to achive - Will reducing the max_interleave_delta to 3sec or lesser sec causes any issues(like PES drops, sync issues etc)
I truly appreciate any suggestions, or corrections you can offer to help me overcome these challenges.
Read more here: Source link
