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:
To remux into MP4, I have tried:
- rtmpdump
- Replay Media Catcher 4
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).
- ffmpeg
- VLC
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
+ Reply to Thread
Results 1 to 7 of 7
-
-
Try remux with mp4muxer. You might have to extract the video and audio with flvextract.
-
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. -
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> ...
Code:<nalu length> <nalu> <nalu length> <nalu> <nalu length> <nalu> ...
Similar Threads
-
mkv2vob: VOB converted video plays at ~5x speed
By shiroi in forum Video ConversionReplies: 1Last Post: 9th Sep 2012, 00:59 -
Converted FLV to MP4-Video OK. Now trying...
By adamberkey in forum Video ConversionReplies: 6Last Post: 1st May 2012, 21:41 -
MP4 plays choppy using Quicktime player but ok in everything else
By larryc in forum Software PlayingReplies: 11Last Post: 24th Jan 2012, 04:49 -
Corrupt MP4 and FLV Files - VLC Plays different Video
By ColdCoffee in forum Software PlayingReplies: 2Last Post: 25th Apr 2010, 08:32 -
Script for uploading video and directing converted to FLV?
By badsectors in forum ProgrammingReplies: 1Last Post: 30th Oct 2008, 02:12