January 20, 2021, 07:47:33 PM

News:

--


mpeg2 re-encoding of mpeg-ts seems broken

Started by xyzzy, November 23, 2020, 10:59:35 PM

Previous topic - Next topic

xyzzy

I tried to re-encode some captured 59.94 fps ATSC video, which uses an MPEG-TS container with a 90kHz timebase and mpeg2 video codec.  But the mpeg2 ff encoder fails to initialize.

[ffMpeg2Encoder] Creating.
[ff] Time base 1/90000
...
[setupInternal] 22:51:00-248  Opening context
[adm_lavLogCallback] 22:51:00-249  [lavc] MPEG-1/2 does not support 90000/1 fps

It seems like maybe the timebase and frame rate are confused somewhere.

Latest git version of avidemux of course.

eumagga0x2a

Avidemux falls back onto 1/90000 timebase if the timing of the source is messed up / incompatible. Please insert the "resample" video filter into the filter chain to enforce a strict 1001/60000 timebase ("59.94  (NTSC)").

eumagga0x2a

Quote from: xyzzy on November 23, 2020, 10:59:35 PMIt seems like maybe the timebase and frame rate are confused somewhere.

find_frame_rate_index(MpegEncContext *s) at libavcodec/mpeg12enc.c:101 expects timebase to match 1/fps. Depending on the source video, Avidemux' demuxers and the editor in general cannot satisfy this expectation on their own.

eumagga0x2a

Could you please test whether undefining USE_REAL_TIME_BASE in avidemux_core/ADM_coreVideoEncoder/src/ADM_coreVideoEncoderFFmpeg.cpp:30 solves the problem for this particular source video? If it does, this would indicate that using fallback timebase was probably unjustified.