[FFmpeg-devel] [PATCH 2/3] avformat/mpegts: cache PID discard values

Carl Eugen Hoyos ceffmpeg at gmail.com
Fri Jan 25 02:12:13 EET 2019

2019-01-24 21:38 GMT+01:00, Marton Balint <cus at passwd.hu>:
> discard_pid can be quite expensive, so let's cache it and recalculate it on
> every packet start.
> ffmpeg -y -i samples/MPEG-VOB/sdtv/RAI.ts -c copy -map 0:v:0 -map 0:a:0
> -f mpegts /dev/null

I can reproduce a 30% overall speedup for this command line and your patch.
(For a relatively low execution time around one second.)

Carl Eugen

More information about the ffmpeg-devel mailing list