VideoHelp Forum




+ Reply to Thread
Results 1 to 7 of 7
  1. Hi!

    I have recorded a video in FLV from a RTMP stream and then converted into MP4. The stream is already in H.264 + AAC so I need remuxing, not re-encoding. The resulting MP4 plays fine in every other player, but in QuickTime only audio is displayed, no video at all.

    To download the FLV, I have tried:
    • rtmpdump
    • Replay Media Catcher 4
    To remux into MP4, I have tried:
    • ffmpeg
    • VLC
    But the problem is always there: audio is OK but no video. I don't know if the problem is in recording, in remuxing, or just the original encoding is not suitable for QuickTime (but unfortunately QT does not have any debug log).


    Can anybody help me figure out what's wrong with this file/stream? Or any other way to have it in MP4 without re-encoding? Any help will be really appreciated.



    Stream: rtmp://fl0.c80137.cdn.qbrick.com/80137/Sevilla
    Recorded FLV: http://www.datafilehost.com/download-e037b1c8.html
    Resulting MP4: http://www.datafilehost.com/download-9226ac9a.html
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Try remux with mp4muxer. You might have to extract the video and audio with flvextract.
    Quote Quote  
  3. Member bat999's Avatar
    Join Date
    Feb 2008
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by ballenato View Post
    Can anybody help me figure out what's wrong with this file/stream?

    Hi
    I don't think there's anything wrong with your file.
    But it has:-
    Format profile: Main@L3.2
    Do some research, find out whether QuickTime supports Profile Main, Level 3.2.
    Last edited by bat999; 22nd Nov 2011 at 07:17.
    Quote Quote  
  4. I finally find the solution to my problem, so I'll post it here in case someone finds it helpful.

    The H.264 data in the stream was in "AnnexB" byte stream format, that is, different NALUs are separated by delimiter bytes (0x000001 or 0x00000001). When rtmpdump saves the stream into the FLV file, this AnnexB format is kept, and so it is when ffmpeg remuxes the file into MP4.

    However, the MP4 standard requires NALUs to be prefixed by its size, instead of said delimiter bytes. VLC and WMP are more flexible and accepts both formats, but QuickTime sticks to the standard and fails on AnnexB NALUs. By programmatically changing from one format to the other I could make the conversion successfully.

    Thanks to Baldrick for pointing me out to mp4muxer and flvextract, as that let me analyze the H.264 raw data and figure out all this stuff.
    Quote Quote  
  5. Member bat999's Avatar
    Join Date
    Feb 2008
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by ballenato View Post
    By programmatically changing from one format to the other I could make the conversion successfully.
    So what did you do to the file to make it play in QuickTime?
    Quote Quote  
  6. Originally Posted by bat999 View Post
    So what did you do to the file to make it play in QuickTime?
    Well, short answer: using flvextract and mp4muxer just works.

    But still I wanted to know why, that's why I did all that research. In conclusion:

    NALU byte stream in the form:
    Code:
    00 00 00 01 <nalu> 00 00 00 001 <nalu> 00 00 00 01 <nalu> 00 00 00 01 <nalu> ...
    Must be transfomed into:
    Code:
    <nalu length> <nalu> <nalu length> <nalu> <nalu length> <nalu> ...
    That's exactly what mp4muxer does with the raw H.264!
    Quote Quote  
  7. Member bat999's Avatar
    Join Date
    Feb 2008
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by ballenato View Post
    Well, short answer: using flvextract and mp4muxer just works....
    OK
    mp4muxer blurb says:-"Muxes are compatible with Quicktime, Apple TV, XBox and many others..."

    So it looks like mp4muxer changes from the AnnexB format, and FFmpeg/VLC muxers don't do that.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!