View Full Version : Call for testing: MP4Creator (QTF Build 1.0)
tuber99
23rd October 2007, 19:58
After digging through forums for weeks to find answers for QuickTime-specific issues, I decided to build my own solution. This is a first-stab at addressing two missing features in the two main open source utils used for MP4 muxing (MP4creator and MP4Box)
I have versioned this as MP4Creator QTF (QuickTime Friendly) Build 1.0
Added feature #1: Support for QuickTime Display Aspect Ratio
There are two new command-line params when adding a video track. -qth=xxx and -qtw=xxx
So, for example, I have DV (type2) NTSC video from a camcorder that I have encoded using x264. This video is 720x480@29.97 fps, but I want it to be correctly displayed at 4:3 when I view it on my AppleTV. Using MP4Creator to add the video track, my cmd-line is:
mp4creator.exe -c myrawvideo.264 -rate=29.97 -qtw=720 -qth=540 myoutput.m4v
The result should be video that is correctly scaled in QuickTime player and/or AppleTV playback.
Added feature #2: Support for QuickTime Chapters
QuickTime supports chapters as an added 'text' track. Chapters can be added using the chapter file syntax that MP4Box allows. (See MP4Box doc for details. (http://gpac.sourceforge.net/doc_mp4box.php)) Chapter file must have .chap file extension to be recognized. Also, to support all chapter file syntaxes, it is best to have video and audio tracks already added to file before adding chapter track.
Example usage:
mp4creator.exe -c myrawvideo.264 -rate=29.97 -qtw=720 -qth=540 myoutput.m4v
mp4creator.exe -c myrawaudio.aac myoutput.m4v
mp4creator.exe -c mychapters.chap myoutput.m4v
QuickTime Chapter Information is also displayed when using the 'list' function of MP4Creator.
Unfortunately, I am only able to provide a WIN32 build at this time. The MPEG4IP project is in limbo, otherwise, I would simply contribute there. Any testing on iPhone/iPod/AppleTV/QuickTime is welcome. I look forward to getting some results back.
bond
23rd October 2007, 22:13
can you post a sample of a mp4 with this qt chapter text track?
tuber99
23rd October 2007, 22:30
I can provide a sample, but I have no way to host it. Can you PM me with info to upload a small sample?
bond
23rd October 2007, 23:01
if its small you can attach it to a post :thanks:
LoRd_MuldeR
23rd October 2007, 23:16
I can provide a sample, but I have no way to host it. Can you PM me with info to upload a small sample?
You can always use one of the free "one click" web-hosters for that purpose ;)
For example: http://www.mytempdir.com/, http://zshare.net/ or http://rapidshare.com/
tuber99
23rd October 2007, 23:25
Sample file posted here (http://www.4shared.com/file/27260726/caea3e1f/park.html).
Thanks
Yo
25th October 2007, 05:11
Thank you. I'll try it.
After digging through forums for weeks to find answers for QuickTime-specific issues, I decided to build my own solution. This is a first-stab at addressing two missing features in the two main open source utils used for MP4 muxing (MP4creator and MP4Box)
I have versioned this as MP4Creator QTF (QuickTime Friendly) Build 1.0
Added feature #1: Support for QuickTime Display Aspect Ratio
There are two new command-line params when adding a video track. -qth=xxx and -qtw=xxx
So, for example, I have DV (type2) NTSC video from a camcorder that I have encoded using x264. This video is 720x480@29.97 fps, but I want it to be correctly displayed at 4:3 when I view it on my AppleTV. Using MP4Creator to add the video track, my cmd-line is:
mp4creator.exe -c myrawvideo.264 -rate=29.97 -qtw=720 -qth=540 myoutput.m4v
The result should be video that is correctly scaled in QuickTime player and/or AppleTV playback.
Added feature #2: Support for QuickTime Chapters
QuickTime supports chapters as an added 'text' track. Chapters can be added using the chapter file syntax that MP4Box allows. (See MP4Box doc for details. (http://gpac.sourceforge.net/doc_mp4box.php)) Chapter file must have .chap file extension to be recognized. Also, to support all chapter file syntaxes, it is best to have video and audio tracks already added to file before adding chapter track.
Example usage:
mp4creator.exe -c myrawvideo.264 -rate=29.97 -qtw=720 -qth=540 myoutput.m4v
mp4creator.exe -c myrawaudio.aac myoutput.m4v
mp4creator.exe -c mychapters.chap myoutput.m4v
QuickTime Chapter Information is also displayed when using the 'list' function of MP4Creator.
Unfortunately, I am only able to provide a WIN32 build at this time. The MPEG4IP project is in limbo, otherwise, I would simply contribute there. Any testing on iPhone/iPod/AppleTV/QuickTime is welcome. I look forward to getting some results back.
Kurtnoise
25th October 2007, 09:53
@tuber: could you post also the sources please...
tuber99
25th October 2007, 17:11
Patch attached. My apologies if I missed something - I'm a total newb with CVS...
Starting point is the latest CVS version of MPEG4IP project. Chapter support code mostly from this thread/patch (http://sourceforge.net/forum/forum.php?thread_id=1837284&forum_id=59136)(which he borrowed from HandBrake). Ideas/code for QuickTime transform matrix also from HandBrake project.
Changes I excluded from the patch are changes to MS Visual Studio project files and changes to the win32-specific headers files (since I am building with an older version of MSVC++ and the latest CVS version of MPEG4IP assumes VS2005).
NorthPole
28th November 2007, 23:15
@tuber99
Thanks for the modified build. I gave it a try and worked OK with the video display setting & audio. The chapters didn't seem to work out though. I'm using this format:
CHAPTER01=00:00:00.000
CHAPTER01NAME=Chapter 1
CHAPTER02=00:01:00.000
CHAPTER02NAME=Chapter 2
CHAPTER03=00:02:00.000
CHAPTER03NAME=Chapter 3
CHAPTER04=00:03:00.000
CHAPTER04NAME=Chapter 4
Using win xp sp2
What version of QT are you using?
EDIT: Updated my iTunes and Quicktime versions and then played the mp4 in itunes and the chapters worked fine. If I play the mp4 in quicktime, the chapters don't appear.
bond
2nd December 2007, 15:55
Added feature #2: Support for QuickTime Chapters
QuickTime supports chapters as an added 'text' track. Chapters can be added using the chapter file syntax that MP4Box allows. (See MP4Box doc for details. (http://gpac.sourceforge.net/doc_mp4box.php)) Chapter file must have .chap file extension to be recognized. Also, to support all chapter file syntaxes, it is best to have video and audio tracks already added to file before adding chapter track.
those chapter tracks are indeed subtitle tracks. kinda strange to misuse subtitles for that
so strictly speaking you can also create apple chapters with mp4box, right?
btw mp4box crashes when i try to extract the subtitle stream in the sample file you posted
jmartinr
8th February 2008, 18:16
Thanks for the muxer.
It works great for signaling the correct dimensions of an anamorphic MP4 to Adobe Flash: http://www.jeroenwijering.com/?thread=8862#msg52825
Using MP4Box etc. Flash didn't get the aspect ratio right.
It took quite some time to sort that problem out. Your version of MP4Creator is the solution. :cool:
Schrade
14th February 2008, 02:46
I just found out that if you want to get chapters to show up in the Quicktime Player you _HAVE_ to make sure your .mp4 file has a .m4v extension, at least in Windows. I am unsure if this is the case with a Mac.
Thanks for this tool. Using this I was able to have Chapters show up in both Media Player Classic and also in the Windows Quicktime Player.
Edit: I've tested this now on MacOS X as well as on an iPod Touch and an iPhone. Just make sure your .mp4 is renamed to .m4v and the chapters you mux into the file with this tool will show up and be accessable.
RsVolcom
2nd March 2008, 22:17
MeGui and Yamb will both mux chapter info that is readable by Media Player Classic, but so far not on the iPod. I will test this tool as soon as I figure out how to use it. (command line novice)
Edit: YOU'RE MY HEROES!
Finally it works. I muxed the audio with the video in megui...I added the chapters with tuber99's badass muxing tool (I've tried dozens of things for weeks-this is the first to work). Rename the mp4 to m4v (thanks to Schrade) and BAM...I'm wathching Zoolander on my iPod with properly named chapter markers! Ya'll are the greatest! My many thanks. Let the movie encoding commence.
@tuber99
Thanks for the modified build. I gave it a try and worked OK with the video display setting & audio. The chapters didn't seem to work out though. I'm using this format:
CHAPTER01=00:00:00.000
CHAPTER01NAME=Chapter 1
CHAPTER02=00:01:00.000
CHAPTER02NAME=Chapter 2
CHAPTER03=00:02:00.000
CHAPTER03NAME=Chapter 3
CHAPTER04=00:03:00.000
CHAPTER04NAME=Chapter 4
Using win xp sp2
What version of QT are you using?
EDIT: Updated my iTunes and Quicktime versions and then played the mp4 in itunes and the chapters worked fine. If I play the mp4 in quicktime, the chapters don't appear.
So--Is the syntax in the example above the correct syntax to use, when making a .chap file for use with this tool? (In other words, create a .txt file in notepad with this syntax, and later change the extension to .chap?)
Is this the same syntax used by tools such as Chaptergrabber?
Sample file posted here (http://www.4shared.com/file/27260726/caea3e1f/park.html).
Thanks
I guess I'm too late coming back to this thread, but when I click that link, 4shared reports that that file is no longer there.
Could you please re-upload it? Thank you.
Patch attached. My apologies if I missed something - I'm a total newb with CVS...
Starting point is the latest CVS version of MPEG4IP project. Chapter support code mostly from this thread/patch (http://sourceforge.net/forum/forum.php?thread_id=1837284&forum_id=59136)(which he borrowed from HandBrake). Ideas/code for QuickTime transform matrix also from HandBrake project.
Changes I excluded from the patch are changes to MS Visual Studio project files and changes to the win32-specific headers files (since I am building with an older version of MSVC++ and the latest CVS version of MPEG4IP assumes VS2005).
How do you apply the patch file?
RsVolcom
14th March 2008, 02:42
So--Is the syntax in the example above the correct syntax to use, when making a .chap file for use with this tool? (In other words, create a .txt file in notepad with this syntax, and later change the extension to .chap?)
Yes, but DVDDecrypter will make this file for you. Under ifo settings tell it you want an OGG file. Then you just have to change the names (if you care) and then change the extension to .chap.
jmartinr
18th April 2008, 15:27
@tuber99
MP4Creator-QTF somehow introduces an error with non mod 16 values. Leading GSpot and VLC to to believe it's mod 16. Media Info still shows the right values.
This is what probably causes a black screen in VLC with standard (DirectX) output.
Is there a solution for this problem?
[EDIT] Just tried and found out that the original mp4creator has the same quirk (changing 720 x 540 to 720 x 544). :mad:
See this post and before (messages from nhope & jmartinr) for more info http://forum.doom9.org/showthread.php?p=1126905#post1126905
nhope
19th April 2008, 14:07
I'm having trouble with muxing the audio with the modified mp4creator.
No problem with the first line, turning .264 into .m4v
mp4creator.exe -c myrawvideo.264 -rate=25 -qtw=853 -qth=480 myoutput.m4v
But then when I issue this line...
mp4creator.exe -c myrawaudio.aac myoutput.m4v
I get problems. I'm encoding Nero audio to the NDAAC-HE-64Kbps profile in MeGUI. MeGUI offers extension options MP4-AAC which gives .mp4 extension, or .m4a. mp4creator doesn't recognise either file extension, for the audio, only .aac.
So I renamed either .mp4 to .aac and mp4creator gave me about 20 warnings like this:
Warning: dropped 35993 input bytes at offset 0
The .m4v grew a little in size but can't be played back. I tried renaming .m4a to .aac as well but that didn't help.
I successfully did the muxing in mp4box instead but then the aspect ratio is wrong again in Flash full-screen so presumably the qt info is lost.
Any ideas?
nhope
19th April 2008, 14:39
Well, I got it working by extracting audio out of the mp4 audio encoded in MeGUI with this line:
mp4creator -extract=1 myaudio.mp4
Then rename myaudio.mp4.t1 to myaudio.aac and mux that with the .m4v
Seems a long-winded way to go about it but it seems raw .aac cannot be done with the Nero codec. Which of those codecs in MeGUI that can do raw .aac would be good to use? FAAC? Or am I better doing it with Nero and extracting?
jmartinr
19th April 2008, 15:10
Or am I better doing it with Nero and extracting?
I would stick with Nero. I've done the extraction trick before.
But you can still use MP4Box to create, from both an MP4Creator-QTF muxed (video only) MP4 and the Nero (audio only) MP4, an MP4 which plays with correct AR in flash player/QuickTime. This way MP4Box keeps the info. I don't know why, but it does.
The batchfile I send you shows how that goes:
mp4creator -create="video.264" -rate=25 -qtw=788 -qth=576 "video.264.mp4"
and then:
mp4box.exe" -add "video.264.mp4"#1 -add "audio.aac.mp4"#1 -new "video.mp4"
[EDIT] If it doesn't work mention your version of MP4Box
crypto
19th April 2008, 18:29
Just an idea, but I think you have to extract the aac track out of the mp4 container first.
I use:
:extract_aac
rem Extract raw aac track
if exist "%1.aac" goto multiplex
%TOOLS%\mp4creator -extract=1 "%1.aac.mp4"
ren "%1.aac.mp4.t1" "%1.aac"
callehedberg
25th May 2008, 11:49
I'll just start to say thanks a million for the great work on Quicktime chapter integration!
Then to my problem:
Patch attached. My apologies if I missed something - I'm a total newb with CVS...
Starting point is the latest CVS version of MPEG4IP project. Chapter support code mostly from this thread/patch (http://sourceforge.net/forum/forum.php?thread_id=1837284&forum_id=59136)(which he borrowed from HandBrake). Ideas/code for QuickTime transform matrix also from HandBrake project.
Changes I excluded from the patch are changes to MS Visual Studio project files and changes to the win32-specific headers files (since I am building with an older version of MSVC++ and the latest CVS version of MPEG4IP assumes VS2005).
I tried to apply the patch to MPEG4IP CVS version 1.6.1 and compile on OS X Leopard 10.5.2 using XCode 3.0. I had to change a few variable definitions from boolean to bool. My problem is when linking mp4creator there is a call to a missing function:
Undefined symbols:
"QTChapterCreator(void*, __sFILE*)", referenced from:
CreateMediaTracks(void*, char const*, bool)in mp4creator.o
Is this function part of the patch, or is it from some other module, since I can't find it in the MPEG4IP sources?
EDIT: Never mind. I found the function in the file "server/mp4creator/qtchap.cpp" added by the patch. It seems, however, as if the Makefile isn't updated to compile this file. I'll look into that...
refulgentis
26th May 2008, 00:27
calledhedberg: if you could upload the binary when you have it compiled (including this patch: http://forum.doom9.org/showthread.php?p=1142000#post1142000, just a one line patch), i'd be very grateful. Right now it takes an immense amount of time to compile it even with the patches generated with handbrake because there seems to be a lot of holes in it even when compiled with the latest Xcode version.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.