Слияние файлов h264 / MP4 с mp4box приводит к проблемам с поиском и синхронизацией

1627
slhck

У меня проблема при объединении двух файлов h.264 / MP4 с одинаковыми параметрами, кроме длины.

Я сливаюсь по mp4box -cat .... После этого проигрыватели видео ведут себя странно: если я перетаскиваю ползунок времени ближе к концу файла, он перезагружается, чтобы перезапустить видео, и иногда проигрыватели показывают неверную длину видеофайла.

Также существует проблема с синхронизацией звука.

Пример параметров входного файла:

* Movie Info * Timescale 90000 - Duration 00:15:00.214 Fragmented File no - 2 track(s) File suitable for progressive download (moov before mdat) File Brand mp42 - version 0 Created: GMT Thu Jun 7 23:31:52 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:

Encoder Software: HandBrake 0.9.6 2012022800  Track # 1 Info - TrackID 1 - TimeScale 90000 - Duration 00:14:59.858 Media Info: Language "Undetermined" - Type "vide:avc1" - 21576 samples Visual Track layout: x=0 y=0 width=853 height=480 MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21 AVC/H264 Video - Visual Size 864 x 480 AVC Info: 1 SPS - 1 PPS - Profile Main @ Level 3 NAL Unit length bits: 32 Pixel Aspect Ratio 80:81 - Indicated track size 853 x 480 Self-synchronized  Track # 2 Info - TrackID 2 - TimeScale 44100 - Duration 00:15:00.214 Media Info: Language "English" - Type "soun:mp4a" - 38769 samples MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x40 MPEG-4 Audio MPEG-4 Audio AAC LC - 2 Channel(s) - SampleRate 44100 Synchronized on stream 1 

Выход:

* Movie Info * Timescale 90000 - Duration 00:29:24.136 Fragmented File no - 3 track(s) File suitable for progressive download (moov before mdat) File Brand isom - version 1 Created: GMT Thu Jun 28 19:40:39 2012  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  Track # 1 Info - TrackID 1 - TimeScale 90000 - Duration 00:19:36.968 Media Info: Language "Undetermined" - Type "vide:avc1" - 28219 samples Visual Track layout: x=0 y=0 width=1024 height=576 MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21 AVC/H264 Video - Visual Size 1024 x 576 AVC Info: 1 SPS - 1 PPS - Profile Main @ Level 3.1 NAL Unit length bits: 32 Pixel Aspect Ratio 1:1 - Indicated track size 1024 x 576 Self-synchronized  Track # 2 Info - TrackID 2 - TimeScale 44100 - Duration 00:29:24.136 Media Info: Language "English" - Type "soun:mp4a" - 75975 samples MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x40 MPEG-4 Audio MPEG-4 Audio AAC LC - 2 Channel(s) - SampleRate 44100 Synchronized on stream 1  Track # 3 Info - TrackID 3 - TimeScale 90000 - Duration 00:09:46.503 Media Info: Language "Undetermined" - Type "vide:avc1" - 14062 samples Visual Track layout: x=0 y=0 width=1280 height=720 MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21 AVC/H264 Video - Visual Size 1280 x 720 AVC Info: 1 SPS - 1 PPS - Profile Main @ Level 3.1 NAL Unit length bits: 32 Pixel Aspect Ratio 1:1 - Indicated track size 1280 x 720 Synchronized on stream 1 

И я не понимаю: почему у меня на выходе 2 видео дорожки?

1

1 ответ на вопрос

2
slhck

Your video streams have different frame sizes.

The first one is 1024x576 (seems like PAL 576 interlaced), while the second one is 1280x720 (HD 720 progressive).

These two probably weren't meant to work together anyway, and this would explain the errors you're seeing.

Похожие вопросы