Longtime user of mjpegtools and maybe first-time poster if I can remember
back that far...

I am experiencing a problem with mplex where it seems to drop the last
frame of a muxed mpeg2 + ac3 combination. This is a problem when combining
files for DVD for example which results in a discontinuity between the
chapters.

The mpeg2 file is in NTSC pulldown encoding (23.976 fps) and the ac3 file
is setup to be slightly longer than the video file, yet it still drops the
last frame.

I have tried muxing the same files with ffmpeg and the frame does not drop.
However I would like to keep using mjpegtools since I have already written
code to mux stuff via the C++ interface.

The command line I am using is:

mplex -f 8 -o track07.mpg track07.m2v track07.ac3

At the end of the process we get this in the output. The interesting part
is that the I+P+B frames come to 2964 and No. Pictures is 2963. I believe
picture that is dropped is a B-frame, since the visual effect is that the
next-to-the-last frame is missing.

I have poked around in the code and confirmed that the entire input stream
is being consumed and it buffers 2964 pictures in videostrm_in.cpp. But I
can't follow how it actually consumes them. If someone could be so kind as
to provide some support I am happy to tinker and provide test files.

   INFO: [mplex] STREAM bd completed
   INFO: [mplex] STREAM e0 completed
   INFO: [mplex] Multiplex completion at SCR=11106304.
   INFO: [mplex] Video e0: completed
   INFO: [mplex] Audio bd: completed
   INFO: [mplex] VIDEO_STATISTICS: e0
   INFO: [mplex] Video Stream length:   108171338 bytes
   INFO: [mplex] Sequence headers:      247
   INFO: [mplex] Sequence ends   :        0
   INFO: [mplex] No. Pictures    :     2963
   INFO: [mplex] No. Groups      :      247
   INFO: [mplex] No. I Frames    :      247 avg. size 57524 bytes
   INFO: [mplex] No. P Frames    :      988 avg. size 43068 bytes
   INFO: [mplex] No. B Frames    :     1729 avg. size 29729 bytes
   INFO: [mplex] Average bit-rate :  7000000 bits/sec
   INFO: [mplex] Peak bit-rate    :  7878800  bits/sec
   INFO: [mplex] BUFFERING min 17 Buf max 171397
   INFO: [mplex] AUDIO_STATISTICS: bd
   INFO: [mplex] Audio stream length 2969088 bytes.
   INFO: [mplex] Frames         :     3866
   INFO: [mplex] BUFFERING min 67 Buf max 3811
   INFO: [mplex] MUX STATUS: no under-runs detected.
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to