
You might have read my post about my FLV meta data and cue point reader/writer. You might also know that the F4V format (which really is simple MP4+H264+AAC) succeeded to the FLV format, and is supported by Flash 9.0.115 and up.
The MP4Info class is a simple extensible PHP class reading the MP4 container’s frames (called boxes) to get various information, namely the video duration, the video/audio codecs, the width and the height, as well as the embedded XMP meta data.
The F4V format is better than the FLV format in many aspects:
- Better compression ratio
- Better quality at similar bit rates
- Open source compressors available, through ffmpeg and libh264 (Flash 8 On2 VP6 codec is proprietary)
- Decoding H.264 is a lot less CPU intensive on the host computer than decoding On2 VP6
You’ll find the project at Google Code, under php-mp4info.
1 As per Adobe’s Adobe Flash Player Version Penetration statistics, on June 11, 2009
2 F4V logo at the top found at Flash Develop And Design
If you like this article, leaving a comment, tweeting ofr liking it is always appreciated.
Saturday 13 June 2009 7:49 pm
Cool, it works extraordinarily well !!
Incredible! I tested it with my video maked with my nokia n93i (h264 but incompatible with flash mp4 format video) that I was renamed from .mp4 to .f4v and putted it inside “TestFiles” directory. It extract all informations !
..and another incredible thing is that flash movie player cannot able to play that video!
Wednesday 24 June 2009 11:17 am
haven’t even opened the url and I already love you:)
for FLV I could do it myself, but for mp4, I have been looking everywhere:) and this is PHP too!:)
great work!
Tuesday 29 September 2009 9:23 am
Is there anything available to write meta data, namely to set cue points?
Wednesday 14 October 2009 6:22 pm
Wow – We needed this for our Horse Racing Melbourne Cup site. It’s worked! We have calculated the length of videos we are supplied with and display them online. Very nice
Wednesday 13 January 2010 6:13 am
This seems like a nice php tool but unfortunately it wasn’t able to parse my mp4 file. I encoded it with a very recent build of FFmpeg using a single pass following these instructions: http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/
The only error I get when trying to get its information is: 0x434e4356-CNCV in udta
Friday 9 April 2010 11:14 am
Hi Tom, thanks for this!.
How can I read cue points from a f4v files ?
Thursday 15 July 2010 10:21 am
hi,
i’m trying your classes but the only info i can retrive is:
0xa954494d-©TIM in udta
simpy using MP4Info::getInfo(path_to_f4v_file);
any suggestion?
regards
Thursday 15 July 2010 10:45 pm
That’s great! Can we write metadata back to mp4?