[FFmpeg-user] Problem converting MPEGTS file to QuickTime compatible MP4

Bryan Murphy bmurphy1976 at gmail.com
Mon Apr 18 15:52:36 CEST 2011


On Sat, Apr 16, 2011 at 2:22 PM, Lou <lou at fakeoutdoorsman.com> wrote:
> Does it work with Quicktime if you use .temp.video.h264 and
> temp.audio.aac as your sources instead of .temp.transcoded.ts?

No.  There is something about ffmpeg merging the pre-transcoded
streams that QuickTime does not like.  It's only when it performs the
transcode inline that it is happy.

ffmpeg -y -shortest -async 1 -i .temp.audio.aac -i .temp.video.h264
-acodec copy -vcodec copy output-bad2.mp4

result:

---------------------------
Error
---------------------------
Error -2041: an invalid sample description was found in the movie
(output-bad2.mp4)
---------------------------
OK
---------------------------



Here are a few more pieces to the puzzle.  Using mp4info, we can see
it complaining that the "bad" file's audio stream is missing
"GAConfig".  And with MP4Box -info, we can see that the stream for the
bad file is labeled as having a "Corrupted AAC Config".


mp4info output-bad.mp4

Track   Type    Info
1       video   H264 Baseline at 1.3, 9.142 secs, 262 kbps, 320x240 @ 29.971560 fps
2       audio   MPEG-4 (no GAConfig), 9.148 secs, 0 kbps, 22050 Hz
 Metadata Tool: Lavf52.92.0



mp4info output-good.mp4

Track   Type    Info
1       video   H264 Baseline at 1.3, 9.142 secs, 262 kbps, 320x240 @ 29.971560 fps
2       audio   MPEG-4 AAC LC, 9.287 secs, 0 kbps, 22050 Hz



MP4Box -info output-bad.mp4

* Movie Info *
        Timescale 1000 - Duration 00:00:09.149
        Fragmented File no - 2 track(s)
        File Brand isom - version 512
        Created: GMT Thu Jan 01 00:00:00 1970

File has no MPEG4 IOD/OD

iTunes Info:
        Encoder Software: Lavf52.92.0

Track # 1 Info - TrackID 1 - TimeScale 2997 - Duration 00:00:09.142
Media Info: Language "Undetermined" - Type "vide:avc1" - 274 samples
Visual Track layout: x=0 y=0 width=320 height=240
MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size 320 x 240
        AVC Info: 1 SPS - 1 PPS - Profile Baseline @ Level 1.3
        NAL Unit length bits: 32
Self-synchronized

Track # 2 Info - TrackID 2 - TimeScale 22050 - Duration 00:00:09.148
Media Info: Language "Undetermined" - Type "soun:mp4a" - 197 samples
MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x40
Corrupted AAC Config
Synchronized on stream 1



MP4Box -info output-good.mp4

* Movie Info *
        Timescale 1000 - Duration 00:00:09.288
        Fragmented File no - 2 track(s)
        File Brand isom - version 512
        Created: GMT Thu Jan 01 00:00:00 1970

File has no MPEG4 IOD/OD

Chapters:
        Chapter #1 - 00:00:00.000 - "Clip 1"

iTunes Info:
        Name: Smelly Monkey!
        Artist: 2atoms.com
        Comment: Hey monkey - don't be doing that!
        Encoder Software: Lavf52.92.0

Track # 1 Info - TrackID 1 - TimeScale 2997 - Duration 00:00:09.142
Media Info: Language "English" - Type "vide:avc1" - 274 samples
Visual Track layout: x=0 y=0 width=320 height=240
MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size 320 x 240
        AVC Info: 1 SPS - 1 PPS - Profile Baseline @ Level 1.3
        NAL Unit length bits: 32
Self-synchronized

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


More information about the ffmpeg-user mailing list