MP4Box crashes in Precise and Raring when importing chapters text-file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gpac (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Came across this problem using OGMRip in ubuntu 13.04. The rip broke down at the last step: merging the video-, audio- and chapters-files into a complete mp4. Tried the same rip in Ubuntu 12.04. Same result. Which was odd, because OGMRip has always worked fine for me in 12.04 in the past.
Submitted a post, including a full log-file, about this failure at the developper's web-page at sourceforge. Find it here:
http://
I then started experimenting with MP4Box as a stand-alone ap, to see if I could narrow down the source of the failure:
Thus I interrogated / re-packaged one of my old mp4s with MP4Box.
To get a record of the material in the source-file I did:
azed@azed-
* Movie Info *
Timescale 600 - Duration 00:25:21.898
2 track(s)
Fragmented File: no
File suitable for progressive download (moov before mdat)
File Brand mp42 - version 0
Created: GMT Sat Apr 20 20:39:29 2013
File has root IOD (9 bytes)
Scene PL 0xff - Graphics PL 0xff - OD PL 0xff
Visual PL: AVC/H264 Profile (0x15)
Audio PL: AAC Profile @ Level 2 (0x29)
No streams included in root OD
Chapters:
Chapter #1 - 00:00:00.000 - "Act 2, Tableau 1.1 Sc�ne et R�citatif - "O lumi�re de Troie !" (Ascagne, En�e, Le Phant�me d'Hector)"
Chapter #2 - 00:07:58.500 - "Act2, Tableau 1.2 R�citatif et Choeur - "Quelle esp�rance encore" (Ascagne, En�e, Chor�be, Panth�e, Choeur des Soldats troyens)"
Chapter #3 - 00:10:46.167 - "Act 2, Tableau 2.1 Choeur-Pri�re - "Puissante Cyb�te" (Cassandre, Polyx�ne, Choeur)"
Chapter #4 - 00:13:53.400 - "Act2 Tableau 2.2 R�citatif et Choeur - "Tous ne p�riront pas" (Cassandre, Polyx�ne, Choeur)"
Chapter #5 - 00:17:58.033 - "Act 2, Tableau 2.3 Final - "Complices de sa gloire" (Les m�mes, un Chef Grec, Choeur des Grecs)"
iTunes Info:
Name: Les Troyens Act 2
Track # 1 Info - TrackID 201 - TimeScale 30000 - Media Duration 00:25:21.720
Media Info: Language "Undetermined" - Type "vide:avc1" - 45606 samples
Visual Track layout: x=0 y=0 width=599 height=336
MPEG-4 Config: Visual Stream - ObjectTypeIndic
AVC/H264 Video - Visual Size 608 x 336
AVC Info: 1 SPS - 1 PPS - Profile High @ Level 3
NAL Unit length bits: 32
Pixel Aspect Ratio 336:341 - Indicated track size 599 x 336
Synchronized on stream 1
Track # 2 Info - TrackID 202 - TimeScale 48000 - Media Duration 00:25:21.898
Media Info: Language "Unknown" - Type "soun:mp4a" - 71339 samples
MPEG-4 Config: Audio Stream - ObjectTypeIndic
MPEG-4 Audio AAC LC - 2 Channel(s) - SampleRate 48000
Synchronized on stream 1
Alternate Group ID 1
azed@azed-
Very complete. No problems, thus far. [The omissions in the chapter-headings, above, can be ignored (I assume), as being caused by limitations on the characters available to the terminal]
Re-packaged this mp4, without including a chapters file, with:
azed@azed-
IsoMedia import LesTroyensAct2.mp4 - track ID 201 - Video (size 608 x 336)
Warning: track ID 201 has references to a track not imported
IsoMedia import LesTroyensAct2.mp4 - track ID 202 - Audio (SR 48000 - 2 channels)
Warning: track ID 201 has references to a track not imported
Saving to ../LesTroyensAc
azed@azed-
Thus no problems here either – produced a new out-file at the stipulated location; and the new file played fine.
Finally, I tried adding a chapters-file to the mix:
azed@azed-
IsoMedia import LesTroyensAct2.mp4 - track ID 201 - Video (size 608 x 336)
Warning: track ID 201 has references to a track not imported
IsoMedia import LesTroyensAct2.mp4 - track ID 202 - Audio (SR 48000 - 2 channels)
Warning: track ID 201 has references to a track not imported
Segmentation fault (core dumped)
And so the re-mux aborted at the add-chapters point.
I am wondering: does this behaviour, in both precise and raring, have anything to do with the update of libavcodec-extra-53 which both systems recently received. As I understand it, libavcodec-extra-53 handles x264-encoding and is a dependency of gpac.
Final point: since chapter-imorting cannot be "turned off" in OGMRip, this bug (if such it be) effectively kills OGMRip as a DVD ripper.
Not a blind bit of notice seems to have been taken of this bug report, which was just as well, because it is mistaken in a couple of respects. In particular, there is nothing wrong with MP4Box or OGMrip (which, for some of its functions, depends on MP4Box) in Precise. I got an odd result, in the latter, because of the chapters-file I used. It wasn't the non-displaying characters: when i prepared the same file in Precise, with the same characters, MP4Box handled it fine; it was (I think) the fact that i had prepped the earlier chapters-file in Windows, and the line-endings, carriage-returns, blah, blah, blah were wrong.
OK, nothing wrong with Precise, then; but MP4Box in Raring is definitely up the creek, at least when it comes to importing chapters. Tried another experiment. This time with a short clip, and a very simple, plain English chapters file. Without the chapters file, MP4Box works fine:
azed@azed- N110:~/ Videos/ Alcina$ MP4Box -new -nodrop -brand mp42 -itags name="Alcina Chapters 13 and 14" -add AlcinaCh13and14 .mp4#video -add AlcinaCh13and14 .mp4#audio: fmt=aac: lang=ita: group=1 ../AlcinaCh13an d14.mp4 d14.mp4: 0.500 secs Interleaving N110:~/ Videos/ Alcina$
IsoMedia import AlcinaCh13and14.mp4 - track ID 1 - Video (size 720 x 400)
IsoMedia import AlcinaCh13and14.mp4 - track ID 2 - Audio (SR 48000 - 2 channels)
Saving ../AlcinaCh13an
azed@azed-
But when we add a chapters-file:
azed@azed- N110:~/ Videos/ Alcina$ MP4Box -nodrop -brand mp42 -itags name="Alcina Chapters 13 and 14" -add AlcinaCh13and14 .mp4#video -add AlcinaCh13and14 .mp4#audio: fmt=aac: lang=ita: group=1 -chap AlcinaCh13and14.txt ../AlcinaCh13an d14.mp4
IsoMedia import AlcinaCh13and14.mp4 - track ID 1 - Video (size 720 x 400)
IsoMedia import AlcinaCh13and14.mp4 - track ID 2 - Audio (SR 48000 - 2 channels)
[Chapter import] Guessed video frame rate 29.97 (30000:1001)
Segmentation fault (core dumped)
azed@azed-N110:
Note the penultimate line, above. The Raring-system (a clean install on a Samsung N110, by the way) also puts up a crash report.
And, as noted, earlier, in my previous post: because MP4Box doesn't work properly, OGMrip doesn't work properly either. But there is a work-around for OGMrip (assuming you don't want to install handbrake): just encode the source to an x264+aac+mkv-file; i.e., switch the muxer to MKV, then re-mux the finished file to mp4 (if desired) with ffmpeg. Tried this with a short 30s encode, prepared by OGMrip in my Raring-system:
azed@azed- N110:~/ Videos/ Alcina$ ffmpeg -i AlcinaAct3Sc8an d9.mkv -acodec copy -vcodec copy AlcinaAct3Sc8an d9.mp4 0.8.6-1ubuntu2, Copyright (c) 2000-2013 the Libav developers nd9.mkv' :
ffmpeg version 0.8.6-6:
built on Mar 30 2013 22:23:21 with gcc 4.7.2
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
[matroska,webm @ 0x919aa20] Estimating duration from bitrate, this may be inaccurate
Input #0, matroska,webm, from 'AlcinaAct3Sc8a
Metadata:
title : AlcinaAct3Sc8and9
Duration: 00:00:34.56, start: 0.000000, bitrate: N/A
Chapter #0.0: start 0.000000, end 21.132000
Metadata:
title : Chapter 12
Cha...