Log in

View Full Version : Problem splitting a mp4 file with mp4box.


Selur
16th April 2011, 14:30
I'm trying split a clip (http://medien.wdr.de/m/1299858361/monitor/wdr_fernsehen_monitor_20110310.mp4) into 7:04 minute chunks (since I'm only interested in the first 7:04 minutes) using mp4box (http://kurtnoise.free.fr/mp4tools/MP4Box-0.4.6-rev2735.zip).

calling mp4box -info on the clip () I get:
* Movie Info *
Timescale 90000 - Duration 00:29:26.485
Fragmented File no - 2 track(s)
File Brand mp42 - version 0
Created: GMT Fri Mar 11 15:46:00 2011

File has no MPEG4 IOD/OD

Track # 1 Info - TrackID 1 - TimeScale 25000 - Duration 00:29:26.360
Media Info: Language "English" - Type "vide:avc1" - 44159 samples
Visual Track layout: x=0 y=0 width=480 height=272
MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size 480 x 272
AVC Info: 1 SPS - 1 PPS - Profile Baseline @ Level 3
NAL Unit length bits: 32
Pixel Aspect Ratio 136:135 - Indicated track size 480 x 272
Self-synchronized

Track # 2 Info - TrackID 2 - TimeScale 24000 - Duration 00:29:26.485
Media Info: Language "English" - Type "soun:mp4a" - 41402 samples
MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x40
MPEG-4 Audio AAC LC - 2 Channel(s) - SampleRate 24000
Synchronized on stream 1

calling
MP4Box -raw 1 "wdr_fernsehen_monitor_20110310.mp4" -splitx 0:420 -out "test.264"
I was hoping to end up with the first <= 7:04 min (+/- a GOP) of the clip, but instead of this, I ended up with one file containing the whole video. Extracting chunk test.264 - duration 420.00 seconds
Extracting MPEG-4 AVC-H264 stream to h264
(I know cutting isn't frame accurate, but some splitting should be possible,... or does this clip not contain possible cut points?)

so next I tried:
MP4Box -raw 1 "wdr_fernsehen_monitor_20110310.mp4" -split 424 -out "D:\Encoding Output\test.264"
and
MP4Box -raw 1 "wdr_fernsehen_monitor_20110310.mp4" -split 424 -out "D:\Encoding Output\"
-> surprise both times I ended up with multiple files (so splitting is possible :P), downside is
a. they were created in the source folder next to the source file.
and
b. the parts still contained audio&video

So I'm stuck with two questions:
1. Why doesn't '-splitx' work? (is it my clip or a bug? as a side node: splitting&extracting works with ffmpeg)
2. Does anyone know if it's possible to specify the output folder - when using '-split' - and in the case it is possible how to?


Cu Selur