From: Joseph A. <jo...@mi...> - 2012-11-20 17:12:12
|
On 20/11/2012 08:58, Joseph Artsimovich wrote: > On 19/11/2012 17:24, Burkhard Plaum wrote: > >> ... >> >> From what I see right now, the lines: >> >> codec->avctx->time_base.den = lqt_video_time_scale(file, track); >> codec->avctx->time_base.num = lqt_frame_duration(file, track, NULL); >> >> should in any case become: >> >> codec->avctx->time_base.den = lqt_video_time_scale(file, track); >> codec->avctx->time_base.num = 1; >> >> and (citing Michael Niedermayer): >> >> "if one would set timebase = 1/600 THEN pts would go 0 24 48 ..." >> >> which would also be libquicktime's idea of PTSes in a 600/24 fps stream. >> Either I completely overlooked something, or the 1 line change above is enough. > OK, I'll try to implement that strategy. > It doesn't look like it's going to work. When I set the following: codec->avctx->time_base.num = 1; codec->avctx->time_base.den = lqt_video_time_scale(file, track); codec->avctx->ticks_per_frame = lqt_frame_duration(file, track, NULL); avcodec_open2() then fails with "MPEG1/2 does not support 600/1 fps". It doesn't even look at ticks_per_frame. It also lools like even if you remove that check, 1/600 ratio would get written to MPEG bitstream. In fact that's the whole point of ticks_per_frame, to be able to put 1/50 to MPEG bitstream for 50i content. So, this behaviour is by design. The solution I am thinking about is doing what my previous patch did, but only for XDCAM. This will make it impossible to generate variable-duration XDCAM frames, but I don't expect anyone to ever need that. -- Joseph Artsimovich Senior C++ Applications Developer MirriAd Ltd |