Page 1 of 1

mux mp4 problem (maybe related to frame rate)

Posted: 05 Nov 2013 17:01
by pacemedia
Hi,

I am trying to record a UDP/TS stream and save it to disk in MP4 format using the following syntax:

vlc udp://@:5001 --sout=file/mp4:record.mp4

The transport stream has H.264 and AAC streams. While recording VLC often prints the following warning:
mux_mp4 warning: i_length <= 0
When playing the recorded files with vlc playback stutters as if frames where dropped every second. This is about the interval in which the warnings appeared while recording. I found a similar issue in trac (ticket 2715) and it is marked as fixed. I am using vlc 2.1.0 x64 on Windows.

However, when I record the stream to MKV the files play smooth in vlc. And when I remux them using mp4box the remuxed files also play smooth in vlc.

When I remux mp4 and mkv files that are playing smooth in vlc using vlc --sout, the remuxed files don't play smooth any more.

I analyzed the files with MediaInfo and I determined that are differences in the frame rates. E. g. I have a file with 25 fps constant frame rate. After remuxing it with vlc it has variable frame rate between 24.415 fps and 25.025 fps. In the trac ticket the author reports relation to the frame rate too.

What can I do? Try an older version of vlc? Maybe 32 bit build? Is there any parameter for the muxer to write a fixed frame rate that would possibly help? The stream must be recorded in MP4 and if I am not able to solve this I have to switch to another solution (outside of vlc). But at the time being, I find vlc the sweetest solution for stream recording...

Best regards
Steve Eschke

Re: mux mp4 problem (maybe related to frame rate)

Posted: 05 Nov 2013 17:34
by pacemedia
Hi,

in my last post I posted some wrong information: all my tests where done with vlc for Windows x64, version 2.0.2.

Now I tested recording and remuxing with vlc for Windows x86 version 2.1.0. The issue has changed a bit: while recording the error message is now
mux_mp4 warning: i_length
and the recorded files stutter while playback. Still remuxing with vlc doesn't help. But in the case of remuxing other mp4 files that were not created with vlc, now these files have constant frame rate and play fine. So the issue still resides in the stream recording feature and unfortunately this is what I want to do...

Anyone knows something about the MP4 muxing module? Especially when muxing streams that are encoded from other (commercial) applications?

Best regards
Steve

Re: mux mp4 problem (maybe related to frame rate)

Posted: 05 Nov 2013 20:55
by Jean-Baptiste Kempf
I think our mp4 muxing module is a bit limited. Ask funman for more info.

Can you share the files?

Re: mux mp4 problem (maybe related to frame rate)

Posted: 05 Nov 2013 21:04
by funman
What can I do? Try an older version of vlc? Maybe 32 bit build? Is there any parameter for the muxer to write a fixed frame rate that would possibly help?
What is your source container?

Re: mux mp4 problem (maybe related to frame rate)

Posted: 05 Nov 2013 22:08
by pacemedia
Hi,

I can share some files tomorrow when I'm back in the office. The original source stream is a transport stream that is received over UDP.

Best regards
Steve

Re: mux mp4 problem (maybe related to frame rate)

Posted: 06 Nov 2013 10:13
by pacemedia
Hi,

I have created some sample files. You can download it from here: https://www.dropbox.com/sh/t6t2y2nu6w4j3p8/mzHyZfRYxe

There are three files:
  1. test.mp4 (stuttering): This is a record created with "vlc udp://@:5051 --sout=test.mp4"
  2. test.mkv (smooth): This is a record created with "vlc udp://@:5051 --sout=test.mkv"
  3. remux.mp4 (stuttering): This was created by remuxing test.mkv with "vlc test.mkv --sout=remux.mp4"
Thank you very much for your patience!

BTW: Is there a way to try the avformat muxer on Windows? vlc --list and --full-help print no option for that. I have libav installed on my Windows 7 machine so maybe it is a hidden option that I can try somehow?

Best regards
Steve

Re: mux mp4 problem (maybe related to frame rate)

Posted: 12 Nov 2013 19:06
by Jean-Baptiste Kempf
VLC version used?

Re: mux mp4 problem (maybe related to frame rate)

Posted: 13 Nov 2013 13:32
by pacemedia
At last I used VLC 2.1.0 x64 on Windows 7 x64.

Re: mux mp4 problem (maybe related to frame rate)

Posted: 18 Nov 2013 23:41
by Jean-Baptiste Kempf
Hmm, we need more fixes then.