[FFmpeg-user] MKV to MP4

Mark Filipak markfilipak.imdb at gmail.com
Wed Oct 25 09:25:07 EEST 2023


I'm trying to remux MKV as MP4. In the process, I want to remove the
rounding errors that were introduced by MKV so that the video is
24/1.001fps CFR once again with proper PTSs & DTSs and 1/90000 time
base. When I do that, audio & video are out of sync.

Does anyone know how to do this? I'd be really grateful.

Regards -- Mark.

PS: Since I wrote this I may have stumbled on a partial answer. I'd
like your experiences with that partial answer. The partial answer is
to add only this bit stream filter:
-bsf:v setts=time_base=1/90000
and to NOT add either :pts=... or :dts=...
As I wrote, I stumbled on it through a fortuitous mistake. It seems to
work, even for videos that completely lack PTSs & DTSs. Comments?
Please.


More information about the ffmpeg-user mailing list