Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#3434 closed defect (fixed)

Cannot remux PRORES 422 10bit MOV to MKV: results unplayable.

Reported by: Ian Kennedy Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: mkv
Cc: nfxjfg@googlemail.com Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Trying to take a MOV /w PRORES 422 10p to MKV. Just a remux and audio merge. The resulting MKV does not play in VLC or DShow based apps. VLC reports the video type is undefined. DShow will not render the video pin using any of the available splitters.

It does play in FFPLAY.

I know the DShow bits on my box can do MKV /w PRORES because if I remux to MOV via FFMPEG then REMUX to MKV using the HAALI mux via GraphStudio the output plays as expected.

FFMPEG spew:

SD:\Convert\Bin\FFMPEG\bin>ffmpeg -y -i TEST_TR_EN_853x480_8CH.mov -i "FL.wav" -i "FR.wav" -i "C.wav" -i "LFE.wav" -i "S
L.wav" -i "SR.wav" -filter_complex "[1:0][2:0][3:0][4:0][5:0][6:0] amerge=inputs=6" -acodec pcm_s24le -vcodec copy out.m
kv
ffmpeg version N-59852-g785dc14 Copyright (c) 2000-2014 the FFmpeg developers

built on Jan 14 2014 22:07:30 with gcc 4.8.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfi

g --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopenco
re-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-li
bvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib

libavutil 52. 62.100 / 52. 62.100
libavcodec 55. 48.101 / 55. 48.101
libavformat 55. 23.103 / 55. 23.103
libavdevice 55. 5.102 / 55. 5.102
libavfilter 4. 1.100 / 4. 1.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100

Guessed Channel Layout for Input Stream #0.7 : stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'TEST_TR_EN_853x480_8CH.mov':

Metadata:

major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2014-02-20 17:18:14

Duration: 00:02:05.04, start: 0.000000, bitrate: 55224 kb/s

Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le, 720x480, 45979 kb/s, SAR 32:27 DAR 16:9, 23.98 fps

, 23.98 tbr, 23976 tbn, 23976 tbc (default)

Metadata:

creation_time : 2014-02-20 17:18:14
handler_name : Apple Alias Data Handler
timecode : 00:00:00:00

Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (FL), s32, 1152 kb/s (default)
Metadata:

creation_time : 2014-02-20 17:18:14
handler_name : Apple Alias Data Handler

Stream #0:2(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (FR), s32, 1152 kb/s (default)
Metadata:

creation_time : 2014-02-20 17:18:14
handler_name : Apple Alias Data Handler

Stream #0:3(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s (default)
Metadata:

creation_time : 2014-02-20 17:18:14
handler_name : Apple Alias Data Handler

Stream #0:4(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (LFE), s32, 1152 kb/s (default)
Metadata:

creation_time : 2014-02-20 17:18:14
handler_name : Apple Alias Data Handler

Stream #0:5(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (BL), s32, 1152 kb/s (default)
Metadata:

creation_time : 2014-02-20 17:18:14
handler_name : Apple Alias Data Handler

Stream #0:6(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (BR), s32, 1152 kb/s (default)
Metadata:

creation_time : 2014-02-20 17:18:14
handler_name : Apple Alias Data Handler

Stream #0:7(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32, 2304 kb/s (default)
Metadata:

creation_time : 2014-02-20 17:18:14
handler_name : Apple Alias Data Handler

Stream #0:8(eng): Data: none (tmcd / 0x64636D74) (default)
Metadata:

creation_time : 2014-02-20 17:19:22
handler_name : Apple Alias Data Handler
timecode : 00:00:00:00

Input #1, wav, from 'FL.wav':

Metadata:

encoder : Lavf55.23.103

Duration: 00:02:05.04, bitrate: 1152 kb/s

Stream #1:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, 1 channels (FL), s32, 1152 kb/s

Input #2, wav, from 'FR.wav':

Metadata:

encoder : Lavf55.23.103

Duration: 00:02:05.04, bitrate: 1152 kb/s

Stream #2:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, 1 channels (FR), s32, 1152 kb/s

Input #3, wav, from 'C.wav':

Metadata:

encoder : Lavf55.23.103

Duration: 00:02:05.04, bitrate: 1152 kb/s

Stream #3:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, mono, s32, 1152 kb/s

Input #4, wav, from 'LFE.wav':

Metadata:

encoder : Lavf55.23.103

Duration: 00:02:05.04, bitrate: 1152 kb/s

Stream #4:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, 1 channels (LFE), s32, 1152 kb/s

Input #5, wav, from 'SL.wav':

Metadata:

encoder : Lavf55.23.103

Duration: 00:02:05.04, bitrate: 1152 kb/s

Stream #5:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, 1 channels (BL), s32, 1152 kb/s

Input #6, wav, from 'SR.wav':

Metadata:

encoder : Lavf55.23.103

Duration: 00:02:05.04, bitrate: 1152 kb/s

Stream #6:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, 1 channels (BR), s32, 1152 kb/s

[Parsed_amerge_0 @ 00000000048f43e0] No channel layout for input 1
Output #0, matroska, to 'out.mkv':

Metadata:

major_brand : qt
minor_version : 537199360
compatible_brands: qt
encoder : Lavf55.23.103
Stream #0:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, 5.1, s32, 6912 kb/s (default)
Stream #0:1(eng): Video: prores (apch / 0x68637061), yuv422p10le, 720x480 [SAR 32:27 DAR 16:9], q=2-31, 45979 kb/s,

23.98 fps, 1k tbn, 23976 tbc (default)

Metadata:

creation_time : 2014-02-20 17:18:14
handler_name : Apple Alias Data Handler
timecode : 00:00:00:00

Stream mapping:

Stream #1:0 (pcm_s24le) -> amerge:in0
Stream #2:0 (pcm_s24le) -> amerge:in1
Stream #3:0 (pcm_s24le) -> amerge:in2
Stream #4:0 (pcm_s24le) -> amerge:in3
Stream #5:0 (pcm_s24le) -> amerge:in4
Stream #6:0 (pcm_s24le) -> amerge:in5
amerge -> Stream #0:0 (pcm_s24le)
Stream #0:0 -> #0:1 (copy)

Press [q] to stop, ? for help
frame= 2998 fps=1085 q=-1.0 Lsize= 807477kB time=00:02:05.04 bitrate=52901.0kbits/s
video:701827kB audio:105504kB subtitle:0 global headers:0kB muxing overhead 0.018102%

Change History (14)

comment:1 by Carl Eugen Hoyos, 11 years ago

Keywords: mkv added

Is audio required to reproduce this problem or is it also reproducible with -an?

comment:2 by Ian Kennedy, 11 years ago

Sorry for the delayed response.

NO, audio is not required. I mistakenly pasted in the output from a typical workflow.

comment:3 by Carl Eugen Hoyos, 11 years ago

Version: unspecifiedgit-master

Could you provide a short mkv sample that does play with the applications you need?

comment:4 by Ian Kennedy, 11 years ago

I'll try to get some repro content pulled together this week...

comment:5 by Ian Kennedy, 11 years ago

ffmpeg.exe -i source.mov -an -y -vcodec copy out.mkv repros the bug. ZIP with source, and output using both FFMPEG and the HAALI DShow filter. Output from Haali plays in WMP and VLC. Output from FFMPEG does not.

ZIP with source, and both outputs (from Haali and FFMPEG) uploading to here:
https://dl.dropboxusercontent.com/u/67080212/ProResMOV_2_MKV_REMUX_BUG.ZIP

Version 0, edited 11 years ago by Ian Kennedy (next)

comment:6 by Carl Eugen Hoyos, 11 years ago

Component: undeterminedavformat

The file ProRes_FromHaali.mkv does not look correct to me, see http://matroska.org/technical/specs/codecid/index.html

comment:7 by Ian Kennedy, 11 years ago

It does look a bit off.

Here's the dump from MKVInfo for the Haali output (FFMPEG putput below...):
+ EBML head
|+ EBML version: 1
|+ EBML read version: 1
|+ EBML maximum ID length: 4
|+ EBML maximum size length: 8
|+ Doc type: matroska
|+ Doc type version: 1
|+ Doc type read version: 1
+ Segment, size 754747528
|+ Seek head (subentries will be skipped)
|+ EbmlVoid (size: 14)
|+ Segment information
| + Muxing application: Haali DirectShow Matroska Muxer 1.13.138.14
| + Writing application: graphstudio.exe
| + Segment UID: 0xf2 0x41 0xbc 0xaf 0xb3 0x7d 0x08 0x7d 0x3e 0x68 0x6f 0x0c 0xce 0x89 0xf4 0x4b
| + Date: Sat Mar 29 22:56:12 2014 UTC
| + Timecode scale: 1000000
| + Duration: 125.042s (00:02:05.041)
|+ Segment tracks
| + A track
| + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
| + Track UID: 1
| + Track type: video
| + Lacing flag: 0
| + Default flag: 0
| + Codec ID: V_MS/VFW/FOURCC
| + CodecPrivate, length 40 (FourCC: apch, 0x68637061)
| + Video track
| + Pixel width: 720
| + Pixel height: 480
| + Display width: 853
| + Display height: 480
| + A track
| + Track number: 2 (track ID for mkvmerge & mkvextract: 1)
| + Track UID: 2
| + Track type: audio
| + Lacing flag: 1
| + Default flag: 0
| + Codec ID: A_PCM/INT/LIT
| + Audio track
| + Sampling frequency: 48000
| + Channels: 2
| + Bit depth: 24
|+ Cluster

FFMPEG Spew:

+ EBML head
|+ EBML version: 1
|+ EBML read version: 1
|+ EBML maximum ID length: 4
|+ EBML maximum size length: 8
|+ Doc type: matroska
|+ Doc type version: 4
|+ Doc type read version: 2
+ Segment, size 718782018
|+ Seek head (subentries will be skipped)
|+ EbmlVoid (size: 147)
|+ Segment information
| + Timecode scale: 1000000
| + Muxing application: Lavf55.22.100
| + Writing application: Lavf55.22.100
| + Segment UID: 0x9f 0x1f 0x44 0x55 0x9f 0xaf 0x34 0xbc 0x83 0xe2 0x1d 0xed 0x9b 0x37 0xf6 0xab
| + Duration: 125.042s (00:02:05.042)
|+ Segment tracks
| + A track
| + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
| + Track UID: 1
| + Lacing flag: 0
| + Language: eng
| + Codec ID: V_PRORES
| + Track type: video
| + Default duration: 41.708ms (23.976 frames/fields per second for a video track)
| + Video track
| + Pixel width: 720
| + Pixel height: 480
| + Display width: 853
| + Display height: 480
|+ Tags
| + Tag
| + Targets
| + Simple
| + Name: MAJOR_BRAND
| + String: qt
| + Simple
| + Name: MINOR_VERSION
| + String: 537199360
| + Simple
| + Name: COMPATIBLE_BRANDS
| + String: qt
| + Simple
| + Name: ENCODER
| + String: Lavf55.22.100
| + Tag
| + Targets
| + TrackUID: 1
| + Simple
| + Name: CREATION_TIME
| + String: 2014-02-20 17:18:14
| + Simple
| + Name: LANGUAGE
| + String: eng
| + Simple
| + Name: HANDLER_NAME
| + String: Apple Alias Data Handler
| + Simple
| + Name: TIMECODE
| + String: 00:00:00:00
|+ Cluster

comment:8 by gjdfgh, 11 years ago

Looks like ffmpeg might produce correct output using the proper codec ID, while the haali one uses AVI compatibility (V_MS/VFW/FOURCC is basically AVI in MKV).

So it's not surprising that the Haali one is "more compatible", but I also don't think ffmpeg should produce files muxed in AVI compatibility mode.

comment:9 by gjdfgh, 11 years ago

Cc: nfxjfg@googlemail.com added

comment:10 by Ian Kennedy, 11 years ago

I tend to agree. I will file a bug with LAV as well, since the LAV splitter source has the same issue.

Of note, FFPLAY does not grok the AVI compatibility mode stuff from Haali.

Last edited 11 years ago by Ian Kennedy (previous) (diff)

comment:11 by gjdfgh, 11 years ago

Would it be possible to provide the sample files in a way you don't have to download 2GB? Possibly by not putting them into a zip, so that they can be streamed from the dropbox server.

in reply to:  description comment:12 by Carl Eugen Hoyos, 11 years ago

Replying to ianken:

I know the DShow bits on my box can do MKV /w PRORES because if I remux to MOV via FFMPEG then REMUX to MKV using the HAALI mux via GraphStudio the output plays as expected.

Do the same tools allow to mux your original ProRes video into avi? If yes, please provide a sample.

I fixed the FFmpeg-generated mkv ProRes files to conform to the specification and I submitted two patches that allow FFmpeg to read the file that you uploaded (which does not conform to the mkv specification). Which patch to apply depends on the question if such avi files also exist.

Last edited 11 years ago by Carl Eugen Hoyos (previous) (diff)

comment:13 by Carl Eugen Hoyos, 11 years ago

Resolution: fixed
Status: newclosed

FFmpeg is able to decode the broken mkv ProRes files from Haali since ade5851b

If there is software that creates such avi files, please upload a sample!

in reply to:  13 comment:14 by Carl Eugen Hoyos, 11 years ago

Replying to cehoyos:

FFmpeg is able to decode the broken mkv ProRes files from Haali since ade5851b

If there is software that creates such avi files (except MEncoder), please upload a sample!

Note: See TracTickets for help on using tickets.