MP4Box crashes in Precise and Raring when importing chapters text-file

Bug #1176596 reported by Stephen Hamer
10
This bug affects 2 people
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://sourceforge.net/p/ogmrip/discussion/258034/thread/dc196114/

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-N110:~/Desktop$ MP4Box -info LesTroyensAct2.mp4

* 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 - ObjectTypeIndication 0x21
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 - ObjectTypeIndication 0x40
MPEG-4 Audio AAC LC - 2 Channel(s) - SampleRate 48000
Synchronized on stream 1
Alternate Group ID 1

azed@azed-N110:~/Desktop$

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-N110:~/Desktop$ MP4Box -fps 30000/1001 -add LesTroyensAct2.mp4#video -add LesTroyensAct2.mp4#audio ../LesTroyensAct2.mp4
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 ../LesTroyensAct2.mp4: 0.500 secs Interleaving
azed@azed-N110:~/Desktop$

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-N110:~/Desktop$ MP4Box -new -fps 30000/1001 -add LesTroyensAct2.mp4#video -add LesTroyensAct2.mp4#audio -chap LesTroyensAct2Chaps.txt ../LesTroyensAct2.mp4
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.

Revision history for this message
Stephen Hamer (stephen-hamer-uk) wrote :
Download full text (4.6 KiB)

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 ../AlcinaCh13and14.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)
Saving ../AlcinaCh13and14.mp4: 0.500 secs Interleaving
azed@azed-N110:~/Videos/Alcina$

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 ../AlcinaCh13and14.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 AlcinaAct3Sc8and9.mkv -acodec copy -vcodec copy AlcinaAct3Sc8and9.mp4
ffmpeg version 0.8.6-6:0.8.6-1ubuntu2, Copyright (c) 2000-2013 the Libav developers
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 'AlcinaAct3Sc8and9.mkv':
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...

Read more...

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gpac (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.