Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > New and alternative a/v containers

Reply
 
Thread Tools Search this Thread Display Modes
Old 5th April 2005, 09:28   #1  |  Link
hhanh00
Registered User
 
hhanh00's Avatar
 
Join Date: Dec 2004
Location: Seattle
Posts: 60
Import chapters into mp4

Does anyone know of a *standalone* tool that can mux a chapter info file (exported from an IFO file for instance) into a mp4 container? I know Nero Mp4 muxer can do that but it's not command line and one has to manually type in the chapter stops.

Thanks a bunch
--h
hhanh00 is offline   Reply With Quote
Old 5th April 2005, 18:15   #2  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
nope it hasnt been reverse engineered till now

but it would be great if someone could do this

the nero chapters are placed in the udta atom (user data), which can be used for placing private data in the .mp4
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 5th April 2005, 21:18   #3  |  Link
hhanh00
Registered User
 
hhanh00's Avatar
 
Join Date: Dec 2004
Location: Seattle
Posts: 60
Strange ... MPC understands nero chapter stops so I figured it knew how to parse it. Maybe it's metadata returned by the mp4 splitter? The format of the atom looks rather simple though. I wonder why they have timestamps in 1/10 000 000 of a sec...

Thanks,
--h
hhanh00 is offline   Reply With Quote
Old 5th April 2005, 21:22   #4  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
Quote:
Originally posted by hhanh00
[B]Strange ... MPC understands nero chapter stops so I figured it knew how to parse it.
if you use the nero parser together with the nero decoder it will work in any dshow player

Quote:
Maybe it's metadata returned by the mp4 splitter?
nope, the chapters are in udta

Quote:
The format of the atom looks rather simple though. I wonder why they have timestamps in 1/10 000 000 of a sec...
maybe because the timescale is set in a way this is necessary? sorry dunny :/
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 6th April 2005, 02:14   #5  |  Link
hhanh00
Registered User
 
hhanh00's Avatar
 
Join Date: Dec 2004
Location: Seattle
Posts: 60
Thanks, bond.

Here's a tool for adding chapters to an mp4 file. Please read the documentation before using it.

IT MODIFIES YOUR FILE IN PLACE WITHOUT MAKING A BACKUP.
Attached Files
File Type: zip mp4chap.zip (34.5 KB, 2209 views)
hhanh00 is offline   Reply With Quote
Old 6th April 2005, 05:47   #6  |  Link
JoeBG
stupid
 
JoeBG's Avatar
 
Join Date: Sep 2004
Location: Cologne
Posts: 638
Quote:
Originally posted by hhanh00
Thanks, bond.

Here's a tool for adding chapters to an mp4 file. Please read the documentation before using it.

IT MODIFIES YOUR FILE IN PLACE WITHOUT MAKING A BACKUP.
Where is it? Canīt see it
__________________
cu

Joe
------------------------
freedom is just another word for nothing left to loose
JoeBG is offline   Reply With Quote
Old 6th April 2005, 09:12   #7  |  Link
yaz
n00b ever
 
Join Date: May 2002
Posts: 627
@hhanh00
where is 'here' ? pls !
thx
y
yaz is offline   Reply With Quote
Old 6th April 2005, 09:27   #8  |  Link
hhanh00
Registered User
 
hhanh00's Avatar
 
Join Date: Dec 2004
Location: Seattle
Posts: 60
A moderator has to approve the upload...
hhanh00 is offline   Reply With Quote
Old 6th April 2005, 17:18   #9  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
hhanh00, wow you are quick!
cant wait to test it

btw would it be possible for you to also post the sources (and eg release it under gnu public license), so other mp4 tool devs can incorportate this into their tools too?
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 6th April 2005, 17:50   #10  |  Link
JoeBG
stupid
 
JoeBG's Avatar
 
Join Date: Sep 2004
Location: Cologne
Posts: 638
Which tools creates the needed Chapter file for your tool? It seems to be really great. Makes things much more easy. Can I create it with Chapter Extraktor?
__________________
cu

Joe
------------------------
freedom is just another word for nothing left to loose
JoeBG is offline   Reply With Quote
Old 6th April 2005, 18:03   #11  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,219
Somebody make a GUI please?


Cheers
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 6th April 2005, 18:27   #12  |  Link
hhanh00
Registered User
 
hhanh00's Avatar
 
Join Date: Dec 2004
Location: Seattle
Posts: 60
I have attached the source code. There is a big caveat with this tool: the moov atom has to be the last one in the mp4 file. It's quite difficult to make it work with any file because the chapter information goes into the moov atom. By inserting anything in it, you change the offsets of the data that follows it. Unless, you also update a lot of other entries (sample offsets and such), you end up with a corrupted file.

Changing a gpac or mpeg4ip is a more reasonable choice. It has all the infrastructure to deal with mpeg4 atoms. I wonder how they are confortable with modifications to their code though.

--h
Attached Files
File Type: txt mp4chap-src.txt (4.0 KB, 606 views)
hhanh00 is offline   Reply With Quote
Old 6th April 2005, 18:33   #13  |  Link
JoeBG
stupid
 
JoeBG's Avatar
 
Join Date: Sep 2004
Location: Cologne
Posts: 638
Quote:
Originally posted by JoeBG
Which tools creates the needed Chapter file for your tool?
I sitting here and really want to test it. But please tell me the tool for creating the chapterfile.
__________________
cu

Joe
------------------------
freedom is just another word for nothing left to loose
JoeBG is offline   Reply With Quote
Old 6th April 2005, 18:36   #14  |  Link
hhanh00
Registered User
 
hhanh00's Avatar
 
Join Date: Dec 2004
Location: Seattle
Posts: 60
I use scenchap.
hhanh00 is offline   Reply With Quote
Old 6th April 2005, 18:51   #15  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
Quote:
Originally posted by hhanh00
There is a big caveat with this tool: the moov atom has to be the last one in the mp4 file. It's quite difficult to make it work with any file because the chapter information goes into the moov atom. By inserting anything in it, you change the offsets of the data that follows it. Unless, you also update a lot of other entries (sample offsets and such), you end up with a corrupted file.
hum, ok good to know, so your tool is not useable on any file

still its good to have a first step of reverseengineering this

Quote:
Changing a gpac or mpeg4ip is a more reasonable choice. It has all the infrastructure to deal with mpeg4 atoms. I wonder how they are confortable with modifications to their code though.
i am sure they have absolutely nothing against batches or hints how they could add this
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 6th April 2005, 23:33   #16  |  Link
hhanh00
Registered User
 
hhanh00's Avatar
 
Join Date: Dec 2004
Location: Seattle
Posts: 60
I've made a patch to mp4box (gpac-0.2.4rc4) to support adding chapters.

For instance, if you want to mux a video file (video.avi) and a mp4 file audio file (audio.mp4) with chapter points coming from (movie.chp) into a final movie.mp4 file, run
$ mp4box -add audio.mp4 -add video.avi -chpl movie.chp movie.mp4

The zip file contains a release executable compiled with MSVC and the diff file of the changes.

The chapter stops are compensated for the drop frame, i.e. they appear 0.1% later than what's indicated in the chp file.

It's too big to upload here (~0.5 MB), where can I put it?

Thanks,
--h
hhanh00 is offline   Reply With Quote
Old 6th April 2005, 23:38   #17  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
wow great stuff

you might want to submit your code to the gpac project so that jeanlf can add it to the official mp4box cvs and therefore all compiles will offer that functionality too

you can for example submit patches to the gpac project via the sourceforge interface here or contact jeanlf directly

i am sure he would be happy about it
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 6th April 2005, 23:49   #18  |  Link
hhanh00
Registered User
 
hhanh00's Avatar
 
Join Date: Dec 2004
Location: Seattle
Posts: 60
Cool. I've uploaded the diff over there.
hhanh00 is offline   Reply With Quote
Old 7th April 2005, 17:25   #19  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
great!
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 7th April 2005, 20:00   #20  |  Link
JoeBG
stupid
 
JoeBG's Avatar
 
Join Date: Sep 2004
Location: Cologne
Posts: 638
Quote:
Originally posted by hhanh00
I use scenchap.
And I tried to use it too. Am I right when I load the IFO (by typing the whole path) and create a new chapter.chp with copy and past with an editor like notepad? This is nearly the same work like typing the chapters into the Nero Direct Show muxer. There is really no progress.

It would be a progress if itīs possible to import chapterfiles from more comfortable tools like Chapter Extractor (Maestro and many other chapterfile formats) or directly the chapterfile from Decrypter (OGG chapterfile).

@ bond

Itīs really great, but not with scenechap
__________________
cu

Joe
------------------------
freedom is just another word for nothing left to loose
JoeBG is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 18:41.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.