[FFmpeg-user] TS stream audio discontinuity in ffmpeg
Steve Laufman
stevel at innovsys.com
Thu Dec 5 23:19:43 EET 2024
I am using ffmpeg to transcode a TS video stream. For whatever reason, there is a discontinuity in one of the audio streams and it goes missing for some period of time. Try as I may, I cannot get ffmpeg to seamlessly pick up and continue to transcode the audio stream when it re-appears. Is there an option or suggestion as to what I might try in this case?
I have tried a lot of things and my current command looks like this:
ffmpeg -y -threads 2 -nostats -loglevel warning -probesize 5M -filter_threads 4 -threads 2 -re -fflags discardcorrupt -hwaccel_device 0 -extra_hw_frames 2 -hwaccel_output_format cuda -hwaccel cuda -heavy_compr 1 -thread_queue_size 500 -i "udp://@239.252.11.117:10102?fifo_size=536720&buffer_size=2129920&timeout=800000&demuxer=mpegts" -f mepgts -threads 2 -filter_complex "[0:a:0]aresample=async=1,volume=1.00,asetpts=NB_CONSUMED_SAMPLES/SR/TB,apad [aout1];[0:a:1]aresample=async=1,volume=1.00,asetpts=NB_CONSUMED_SAMPLES/SR/TB,apad [aout2];[0:v:0]fps=30000/1001,yadif_cuda,scale_npp=1280:720:interp_algo=super:format=yuv420p [vout]" -map "[vout]" -map "[aout1]" -map "[aout2]" -c:a aac -b:a 192k -ac:a 2 -copytb 1 -fps_mode cfr -c:v h264_nvenc -b:v 6000k -minrate:v 6000k -maxrate:v 6000k -bufsize:v 12000k -a53cc 1 -tune ll -zerolatency 1 -cbr 1 -forced-idr 1 -strict_gop 1 -threads 2 -profile:v high -level:v 4.2 -bf:v 0 -g:v 15 -metadata service_provider="InnoCoder" -f fifo -drop_pkts_on_overflow 1 -attempt_recovery 1 -recovery_wait_time 1 -fifo_format mpegts -format_opts muxrate=6707559:pes_payload_size=1528 "udp://@225.105.0.130:10102?pkt_size=1316&bitrate=6707559&burst_bits=10528&ttl=64&disc_start"
Here is a test file I have: https://drive.google.com/file/d/1flgJuJdAVWvAA7IZkgNw87l00xkU9pFe/view?usp=drive_link
Steve
More information about the ffmpeg-user
mailing list