4
1
Here is a video file my Xbox 360 refuses to play:
$ MP4Box -info video.mp4
* Movie Info *
Timescale 90000 - Duration 02:18:33.365
Fragmented File no - 2 track(s)
File Brand mp42 - version 0
Created: GMT Sat Jul 21 07:08:55 2012
File has root IOD (9 bytes)
Scene PL 0xff - Graphics PL 0xff - OD PL 0xff
Visual PL: ISO Reserved Profile (0x7f)
Audio PL: High Quality Audio Profile @ Level 2 (0x0f)
No streams included in root OD
iTunes Info:
Encoder Software: HandBrake 0.9.6 2012022800
Track # 1 Info - TrackID 1 - TimeScale 90000 - Duration 02:18:33.235
Media Info: Language "Undetermined" - Type "vide:avc1" - 199318 samples
Visual Track layout: x=0 y=0 width=1280 height=688
MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size 1280 x 688
AVC Info: 1 SPS - 1 PPS - Profile High @ Level 4.1
NAL Unit length bits: 32
Self-synchronized
Track # 2 Info - TrackID 2 - TimeScale 48000 - Duration 02:18:33.365
Media Info: Language "English" - Type "soun:mp4a" - 389689 samples
MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x40
MPEG-4 Audio MPEG-4 Audio AAC LC - 6 Channel(s) - SampleRate 48000
Synchronized on stream 1
$ avconv -i video.mp4
avconv version 0.8.4-4:0.8.4-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers
built on Nov 6 2012 16:51:33 with gcc 4.6.3
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42isomavc1
creation_time : 2012-07-21 07:08:55
encoder : HandBrake 0.9.6 2012022800
Duration: 02:18:33.36, start: 0.000000, bitrate: 2299 kb/s
Stream #0.0(und): Video: h264 (High), yuv420p, 1280x688, 1973 kb/s, 23.98 fps, 90k tbr, 90k tbn, 180k tbc
Metadata:
creation_time : 2012-07-21 07:08:55
Stream #0.1(eng): Audio: aac, 48000 Hz, 5.1, s16, 319 kb/s
Metadata:
creation_time : 2012-07-21 07:08:55
At least one output file must be specified
What tool, such as ffmpeg or mencoder, and what magic command line incantation should I use to transcode this file into a format Xbox 360 can play? I want the transcode process to retain as good video quality as possible.
With the help from slhck, I've managed to create a new mp4 file with the audio changed to two channels. However Xbox 360 still refuses to play it for some reason. Here is what MP4Box and ffmpeg says about the new file:
$ MP4Box -info final.mp4
* Movie Info *
Timescale 1000 - Duration 02:18:33.343
Fragmented File no - 2 track(s)
File Brand isom - version 512
Created: GMT Sat Jul 21 07:08:55 2012
File has root IOD (9 bytes)
Scene PL 0xff - Graphics PL 0xff - OD PL 0xff
Visual PL: Not part of MPEG-4 Visual profiles (0xfe)
Audio PL: Not part of MPEG-4 audio profiles (0xfe)
No streams included in root OD
iTunes Info:
Encoder Software: Lavf53.21.0
Track # 1 Info - TrackID 1 - TimeScale 90000 - Duration 02:18:33.193
Media Info: Language "Undetermined" - Type "vide:avc1" - 199318 samples
Visual Track layout: x=0 y=0 width=1280 height=688
MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size 1280 x 688
AVC Info: 1 SPS - 1 PPS - Profile High @ Level 4.1
NAL Unit length bits: 32
Self-synchronized
Track # 2 Info - TrackID 2 - TimeScale 48000 - Duration 02:18:33.343
Media Info: Language "Undetermined" - Type "soun:mp4a" - 389688 samples
MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x40
MPEG-4 Audio MPEG-4 Audio AAC LC - 2 Channel(s) - SampleRate 48000
Synchronized on stream 1
Alternate Group ID 1
$ avconv -i final.mp4
avconv version 0.8.4-4:0.8.4-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers
built on Nov 6 2012 16:51:33 with gcc 4.6.3
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'final.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 2012-07-21 07:08:55
encoder : Lavf53.21.0
Duration: 02:18:33.34, start: 0.000000, bitrate: 2161 kb/s
Stream #0.0(und): Video: h264 (High), yuv420p, 1280x688, 1973 kb/s, 23.98 fps, 90k tbr, 90k tbn, 180k tbc
Metadata:
creation_time : 2012-07-21 07:08:55
Stream #0.1(und): Audio: aac, 48000 Hz, stereo, s16, 180 kb/s
Metadata:
creation_time : 2012-07-21 07:08:55
At least one output file must be specified
Thanks. It almost works when I use
avconv
instead offfmpeg
. But then I get the error: Can not resample 6 channels @ 48000 Hz to 2 channels @ 48000 Hz – Björn Lindqvist – 2012-12-11T20:17:05.807Thanks but still no dice. Now I'm getting a different error on your last command:
[mp4 @ 0x12aea20] Tag [1][0][0][0]/0x00000001 incompatible with output codec id '65536'
– Björn Lindqvist – 2012-12-11T20:41:35.283Think I got it now.
faad
outputs PCM stereo audio, not AAC. We'll have to convert that one again. – slhck – 2012-12-11T20:54:32.160Alright. That creates a new video file which seem valid, but Xbox 360 still wont play it. I've updated my question with
avconv
andMP4Box
info. – Björn Lindqvist – 2012-12-12T21:38:09.033Hm. I'm giving up. If I only had an Xbox to try with I'd surely help you, but as far as I can tell the file seems valid. Do you have other videos that actually play on the Xbox? We could take a look at what's different. Did you try re-encoding the (stereo audio) video bitstream as well, maybe even with
ffmpeg -i input.mp4 -c:v libx264 -profile:v baseline -c:a copy output.mp4
? This would give us a video stream with a lower profile. Although the Xbox supports up to High, this could be an issue as well. Or a file with no audio (-an
option). At least we'd know if it's the video or audio part. – slhck – 2012-12-12T21:45:49.590Yes, I've lots of other videos that play fine. But with mp4 it's definitely hit and miss. Some mp4's work, but most don't. Reencoding like in your example command has already taken 24h and I don't think it ever will complete. Plus the ffmpeg status line reads
frame=19313100 fps=233 q=33.0 size= 6625618kB time=214.59 bitrate=252934.5kbits/s dup=19307954 drop=0
and I think the "bitrate=252934.5kbits/s" part means it is doing something really insane. If there was a way to reencode this file to a more friendly format, I'd definitely use that instead but nothing I've tried with so far has worked. – Björn Lindqvist – 2012-12-13T20:56:57.710If it's just a regular movie and it takes more than say half an hour, there's something wrong (bit error?) with the source video. You could try re-encoding with
-c:v mpeg4
, which should be compatible with the Xbox as well, but you need more bitrate to accomodate for the worse performing codec. Or try converting to an intermediate lossless format like Huffyuv into an AVI, and then back to x264. Just to be clear: Does the file play normally on your computer? – slhck – 2012-12-13T21:04:42.520Not sure how you suggest that I should reencode it?
avconv -i in.mp4 -c:v mpeg4 -profile:v baseline -c:a copy out.mp4
does not work. The original video plays without any trouble in both mplayer, totem and other players. – Björn Lindqvist – 2012-12-23T19:04:49.447If you say it "does not work", what exactly happens? Does the command itslelf not work or does the video not play? – slhck – 2012-12-23T19:25:27.893
What I mean is that avconv doesn't accept the command, it says
[mpeg4 @ 0x1373ca0] [Eval @ 0x7fffba481e00] Undefined constant or missing '(' in 'baseline' Unable to parse option value "baseline"
– Björn Lindqvist – 2013-01-01T06:37:57.003There's no baseline profile for MPEG-4 Visual. Simply leave out the
-profile:v baseline
. You can add the option-qscale:v 3
for quality (lower means better,qscale
goes down to 31). – slhck – 2013-01-01T18:05:13.270