[FFmpeg-user] How can I remux a video from 2997/100 to 30000/1001 fps?

Peter B. pb at das-werkstatt.com
Mon Jul 30 11:43:26 CEST 2012


Quoting Robert Krüger <krueger at lesspain.de>:


> If you wouldn't just remux but reencode (which you don't want, I know)
> you could use the setpts filter to do the job but AKAIK filters do not
> work for remuxing by design and I do not know of a similar mechanism
> for remuxing (something like a packet filter). The current docs could
> also be interpreted in such a way that the "-r" option _before_ the
> input should do the job but it doesn't.

Since it's lossless I could as well reencode.
However, I agree with you and think that it would be good if remuxing  
was enough, because then this problem could also be solved in case of  
lossy codecs.


> From docs: "As an input option, ignore any timestamps stored in the
> file and instead generate timestamps assuming constant frame rate
> fps."
>
> but a quick glimpse at the code doesn't look as if it is used in the
> remuxing case. In fact, I have a simple example with a mov file I
> generated with 2997/100 for which it does not work even if I recode
> the video stream, which is kind of strange. I had once hacked a
> command line option that manipulated the video package timestamps by a
> factor before handing them over to the decoder (I think) and that did
> work for that use case. however, I doubt that was a clean solution and
> would be accepted as a patch. The clean solution should probably be to
> make the "-r" option before the input work as documented for the
> remuxing case. However, I don't know if there are any hidden traps in
> that for certain formats (e.g. problems due to inconsistencies between
> timestamps in the bitstream and the container). Maybe someone could
> comment, if that should be postet as a bug report. Then I will do
> that.

Michael's message says it's possible to remux and change the fps. I  
don't know about the current code, but it seems doable already somehow.

I'll go check.

Thanks,
Pb



More information about the ffmpeg-user mailing list