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 13th March 2009, 18:05   #1  |  Link
jingo_man
Registered User
 
Join Date: Aug 2007
Posts: 8
muxing aac-lc track to existing m4v file

i am in the process of converting my mkv's to m4v's for use on appletv.

the mkv's originally contained the ac3 soundtrack, and an h264 video track (the bare minimum anyway). i used vlc to export the audio to aac-lc 6-channel format, in a new .mp4 file. using MP4Box -info filename.mp4, this lists as:
Quote:
* Movie Info *
Timescale 90000 - Duration 01:37:25.546
Fragmented File no - 1 track(s)
File Brand isom - version 0
Created: GMT Sat Mar 14 12:00:11 2009

File has no MPEG4 IOD/OD

Track # 1 Info - TrackID 1 - TimeScale 48000 - Duration 01:37:25.546
Media Info: Language "Undetermined" - Type "soun:mp4a" - 274010 samples
MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x40
MPEG-4 Audio AAC LC - 6 Channel(s) - SampleRate 48000
Self-synchronized
i used mpeg streamclip to convert the mkv to an mp4 file (m4v actually) but this still contains the ac3 sound track:
Quote:
* Movie Info *
Timescale 45000 - Duration 01:37:25.600
Fragmented File no - 2 track(s)
File Brand qt - version 537199360
Created: GMT Sat Mar 14 09:59:18 2009

Moov Meta type: "mdta" - 0 resource item(s)
File has no MPEG4 IOD/OD

Track # 1 Info - TrackID 1 - TimeScale 1000 - Duration 01:37:25.173
Media Info: Language "Undetermined" - Type "vide:avc1" - 140144 samples
MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size 1280 x 720 - Profile High @ Level 5.1
NAL Unit length bits: 32
Self-synchronized
Track Meta type: "mdta" - 0 resource item(s)

Track # 2 Info - TrackID 2 - TimeScale 1000 - Duration 01:37:25.600
Media Info: Language "Unknown" - Type "soun:ac-3" - 182675 samples
AC3 stream - Sample Rate 1 - 3 channel(s) 16 bits per samples
Track Meta type: "mdta" - 0 resource item(s)


using a pre-compiled Mac OSX version of MP4Box 0.4.6-DEV (build 1) (available from any good google search) i tried to add the 1st track into the 2nd. this results in:
Code:
/Applications/MP4Box -add /Volumes/EditSpace/Anchorman/Anchorman.The.Legend.Of.Ron.Burgundy.mkv.a1.mp4#trackID=1 /Volumes/EditSpace/Anchorman/Anchorman_\ The\ Legend\ Of\ Ron\ Burgundy.720p.m4v
outputs following (after a progress bar completes to 100%, and then is removed from the screen)
Quote:
IsoMedia import - track ID 1 - Audio (SR 48000 - 6 channels)
Setting up iTunes/iPod file...
Forcing AVC/H264 SAR to 1:1...
Saving /Volumes/EditSpace/Anchorman/Anchorman_\ The\ Legend\ Of\ Ron\ Burgundy.720p.m4v: 0.500 secs Interleaving
Segmentation fault
can anyone help or explain the issue that is happening? i tried a few additional audio options in the mp4box, ie -sdr, but still errors. are the file(s) faulty/corrupt? process wrong? binaries not properly compiled?

regards

jingo_man
jingo_man is offline   Reply With Quote
Old 13th March 2009, 19:11   #2  |  Link
b66pak
Registered User
 
b66pak's Avatar
 
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
i suspect it is ac3 track fault...

try: mp4box -add Burgundy.720p.m4v#trackID=1 -add Anchorman.The.Legend.Of.Ron.Burgundy.mkv.a1.mp4#trackID=1 -new final.m4v
_
b66pak is offline   Reply With Quote
Old 13th March 2009, 19:41   #3  |  Link
jingo_man
Registered User
 
Join Date: Aug 2007
Posts: 8
must be a mind reader. that was the next thing i tried after posting my item, like you said to remove the ac3 from the equation totally.

unfortunately, same result...

even with the verbose switch, i get no further output as to what the error may actually be.
jingo_man is offline   Reply With Quote
Old 13th March 2009, 19:50   #4  |  Link
b66pak
Registered User
 
b66pak's Avatar
 
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
ok...use mkvtoolnix to extract the .h264 stream from the original .mkv...then mux the .h264 with the aac with mp4box (don't forget to specify the fps for the video or you will get 25fps by default)...
_
b66pak is offline   Reply With Quote
Old 13th March 2009, 23:42   #5  |  Link
jingo_man
Registered User
 
Join Date: Aug 2007
Posts: 8
cheers b66pak

the video track is the problem. i tried separately to add the audio track to a new mp4 container, which worked, then the video to another new mp4 container, resulting in the "segmentation fault" error once again.


i tried to re-demux the original file. the only method that seems to work for me is to use the MPEG Streamclip application (which specifies an mp4 extension, not m4v). the other tools, including iMKVExtract, MKVTools and Mkvtoolnix dont seem to properly extract the video tracks (i havent checked the other tracks). if i run a MP4Box -info on the exported files above, they return:

Quote:
(MKVInfo) No EBML head found.
or

Quote:
File has 1 tracks
Track 1 type: Video (....)
so with the mpeg streamclip exported file, MP4Box -info returns:

Quote:
* Movie Info *
Timescale 45000 - Duration 01:37:25.173
Fragmented File no - 1 track(s)
File Brand mp42 - version 1
Created: GMT Sat Mar 14 21:56:52 2009

File has no MPEG4 IOD/OD

Track # 1 Info - TrackID 1 - TimeScale 1000 - Duration 01:37:25.173
Media Info: Language "English" - Type "vide:avc1" - 140144 samples
MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size 1280 x 720 - Profile High @ Level 5.1
NAL Unit length bits: 32
Self-synchronized
Track Meta type: "mdta" - 0 resource item(s)
i checked the frame rate in both the original mkv file (using mkvinfo) and vlc with the demuxed video track. they seem different:
mkvinfo output (in video track section, as this also has the ac3 sound track too):
+ Default duration: 41.708ms (23.976 fps for a video track)

vlc (from "window" > "information" > "adv stats": 23.809524

so i tried to the following command to add this track to my successful new aac-lc mp4 file:
Code:
MP4Box -add /new/video.mp4 -fps 23.809524 /previous/mp4box/audio.m4v
and

Code:
MP4Box -add /new/video.mp4 -fps 23.976 /previous/mp4box/audio.m4v
both return the same error:
Quote:
IsoMedia import - track ID 1 - Video (size 1280 x 720)
Setting up iTunes/iPod file...
Forcing AVC/H264 SAR to 1:1...
Saving /Volumes/EditSpace/Anchorman.m4v: 0.500 secs Interleaving
Segmentation fault
any more suggestions? are there more specific video switches that need applying? or more info i can gather to more accurately reveal any other settings that may need applying?

i also note from the MP4Box -info command that its running at h.264 profile 5.1 - i believe the appletv only supports up to 4.1. can i change this on mac osx? (or linux, failing that, with appropriate compiled binary)

cheers again

jingo_man
jingo_man is offline   Reply With Quote
Old 14th March 2009, 00:01   #6  |  Link
jingo_man
Registered User
 
Join Date: Aug 2007
Posts: 8
for note, i also tried to mux the Mktoolnix extracted MP4 file into the original aac-lc MP4 file. here i got a totally different error:

MP4Box(4766) malloc: *** mmap(size=4223586304) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Bus error
jingo_man is offline   Reply With Quote
Reply

Tags
macosx mp4box mp4 aac ac3

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 21:08.


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