Opened 12 years ago

Last modified 9 years ago

#2616 open defect

support matrox mpeg-2 I-frame with alpha codec (m704 fourcc)

Reported by: ami_stuff Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: matrox mpeg2video alpha
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by ami_stuff)

attached file decodes as mpeg2video, but there are visible some artefact in the right-bottom corner of the video

http://www1.datafilehost.com/d/ea13c1dc

C:\>ffmpeg -vcodec mpeg2video -i m704.avi out.avi
ffmpeg version N-53680-g0ab9362 Copyright (c) 2000-2013 the FFmpeg developers
  built on May 30 2013 12:14:03 with gcc 4.7.3 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-
amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
enable-libxvid --enable-zlib
  libavutil      52. 34.100 / 52. 34.100
  libavcodec     55. 12.102 / 55. 12.102
  libavformat    55.  8.100 / 55.  8.100
  libavdevice    55.  2.100 / 55.  2.100
  libavfilter     3. 73.100 /  3. 73.100
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
[mpeg2video @ 02997f20] Invalid frame dimensions 0x0.
Input #0, avi, from 'm704.avi':
  Duration: 00:00:12.64, start: 0.000000, bitrate: 8031 kb/s
    Stream #0:0: Video: mpeg2video (4:2:2) (M704 / 0x3430374D), yuv422p, 720x480
 [SAR 8:9 DAR 4:3], 23.98 fps, 23.98 tbr, 23.97 tbn, 59.94 tbc
Output #0, avi, to 'out.avi':
  Metadata:
    ISFT            : Lavf55.8.100
    Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 720x480 [SAR 8:9 DAR
 4:3], q=2-31, 200 kb/s, 23.98 tbn, 23.98 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video -> mpeg4)
Press [q] to stop, [?] for help
[mpeg2video @ 02997f20] Invalid frame dimensions 0x0.
[mpeg2video @ 02997f20] end mismatch left=73960 1
[mpeg2video @ 02997f20] Warning MVs not available
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=69680 1
[mpeg2video @ 02997f20] Warning MVs not available
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=69760 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=69664 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=69808 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=70176 1
[mpeg2video @ 02997f20] Warning MVs not available
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=70072 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=70168 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=69976 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=70736 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=70736 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=70440 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=71416 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=70920 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=71096 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=71208 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=71304 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=71848 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=72432 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=71208 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=71568 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=72256 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=74440 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=73032 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=72712 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=73160 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
frame=  246 fps=0.0 q=31.0 size=     467kB time=00:00:10.26 bitrate= 373.2kbits/
end mismatch left=75504 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=75672 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=77384 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
[mpeg2video @ 02997f20] end mismatch left=76168 1
[mpeg2video @ 02997f20] concealing 9 DC, 9 AC, 9 MV errors in I frame
frame=  303 fps=0.0 q=31.0 Lsize=     536kB time=00:00:12.63 bitrate= 347.2kbits
/s
video:523kB audio:0kB subtitle:0 global headers:0kB muxing overhead 2.463669%

Attachments (14)

vd_dummyalpha.avi (105.9 KB ) - added by ami_stuff 12 years ago.
alpha.jpg (196.2 KB ) - added by ami_stuff 11 years ago.
matrox.7z (730.0 KB ) - added by ami_stuff 9 years ago.
matrox_mpeg2_720_480.avi (573.9 KB ) - added by ami_stuff 9 years ago.
matrox_mpeg2_720_576.avi (611.6 KB ) - added by ami_stuff 9 years ago.
matrox_mpeg2_alpha_720_480.avi (1.3 MB ) - added by ami_stuff 9 years ago.
matrox_mpeg2_alpha_720_576.avi (1.2 MB ) - added by ami_stuff 9 years ago.
matrox_mpeg2_hd_1280.avi (1.1 MB ) - added by ami_stuff 9 years ago.
matrox_mpeg2_hd_1440.avi (1.3 MB ) - added by ami_stuff 9 years ago.
matrox_mpeg2_hd_1920.avi (1.5 MB ) - added by ami_stuff 9 years ago.
matrox_mpeg2_hd_alpha_1280.avi (2.0 MB ) - added by ami_stuff 9 years ago.
matrox_mpeg2_hd_alpha_1440.avi (1.8 MB ) - added by ami_stuff 9 years ago.
matrox_mpeg2_hd_alpha_1920.avi (2.3 MB ) - added by ami_stuff 9 years ago.
utalpha.7z (323.5 KB ) - added by ami_stuff 9 years ago.

Change History (38)

comment:1 by Carl Eugen Hoyos, 12 years ago

Component: undeterminedavcodec
Keywords: matrox alpha added
Status: newopen
Version: unspecifiedgit-master

Assuming "alpha codec" means that the encoder can really save transparency information in the mpeg2 video stream, could you try to encode a file that actually contains transparency?
As for example the files in http://samples.ffmpeg.org/FLV/flash_with_alpha
(There are other samples but I can't find them atm.)

comment:2 by Carl Eugen Hoyos, 12 years ago

Keywords: mpeg2video added

in reply to:  1 comment:3 by ami_stuff, 12 years ago

Replying to cehoyos:

Assuming "alpha codec" means that the encoder can really save transparency information in the mpeg2 video stream, could you try to encode a file that actually contains transparency?
As for example the files in http://samples.ffmpeg.org/FLV/flash_with_alpha
(There are other samples but I can't find them atm.)

I would like to generate a sample with alpha, but I do not match the specs for example for Adobe Premiere CS6 which I could use for it:

http://helpx.adobe.com/x-productkb/policy-pricing/system-requirements-premiere-pro.html#Adobe%20Premiere%20Pro%20CS6%20system%20requirements

If you meet then maybe you can use this instruction to generate a file:

http://forums.creativecow.net/thread/3/934149

http://www.matrox.com/video/en/support/windows/vfw_software_codecs/downloads/softwares/version1.0/build33/

comment:4 by Carl Eugen Hoyos, 12 years ago

How did you encode m704.avi ?

comment:5 by ami_stuff, 12 years ago

You mean with which software? VirtualDub, but afaict it doesn't support alpha export to AVI.

comment:6 by Carl Eugen Hoyos, 12 years ago

You mean if your source is mov/png with transparency, it gets lost if you use VirtualDub?

comment:7 by ami_stuff, 12 years ago

Yes, it only exports dummy alpha channel.

by ami_stuff, 12 years ago

Attachment: vd_dummyalpha.avi added

comment:8 by Carl Eugen Hoyos, 12 years ago

Does it support encoding png in avi? A user on irc claims that encoding transparency should work fine with VirtualDub (sorry, I honestly don't know).

comment:9 by Carl Eugen Hoyos, 12 years ago

Or to say it differently: What happens if you encode vd_dummyalpha.avi to any format that supports transparency?

comment:10 by Carl Eugen Hoyos, 12 years ago

Unrelated: Could you test if the sample from ticket #2464 plays for more than half a second for you with the Matrox codec installed?

in reply to:  10 comment:11 by ami_stuff, 12 years ago

Description: modified (diff)

Replying to cehoyos:

Unrelated: Could you test if the sample from ticket #2464 plays for more than half a second for you with the Matrox codec installed?

Matrox codecs which I installed doesn't like this file (VirtualDub says "Couldn't load decompressor for format 'M701' (unknown)".

What I can notice is that Xvid's FourCC changer reports for this file:

FourCC Description code: M701
FourCC Used codes: M701

when for myself generated file:

FourCC Description code: m701
FourCC Used codes: M701

but even when I modify "FourCC Descriprion code" from M701 to m701 I still can't load/play the file with WMP/VirtualDub.

in reply to:  8 comment:12 by ami_stuff, 12 years ago

Replying to cehoyos:

Does it support encoding png in avi? A user on irc claims that encoding transparency should work fine with VirtualDub (sorry, I honestly don't know).

This is what VirtualDub supports:

http://packtlib.packtpub.com/graphics/9781904811350/graphics/1353_08_15.jpg

Maybe he can create a real alpha sample, I don't know how.

comment:13 by Carl Eugen Hoyos, 12 years ago

Thank you for testing the sample from ticket #2464!

comment:14 by ami_stuff, 11 years ago

Finally I was able to encode sample with a real alpha channel:

http://www1.datafilehost.com/d/0436af02

Attached file plays correctly in Adobe Premiere (no colorful artefacts and alpha
works - see attached screenshot).
Colorful artefacts are visible while playing the file in WMP/VirtualDub.

It looks like this codec is designed especially for Adobe Premiere which knows how to identify alpha channel and use it:

"When rendering compositions or animations that have an alpha channel, you can
select a “+ Alpha” Matrox VFW codec to render to a Matrox uncompressed or
MPEG-2 I-frame .
avi
file that contains the alpha-key information. This .
avi
file
will be automatically keyed when you place the clip in an Adobe Premiere Pro
sequence."

http://www.matrox.com/video/media/pdf/support/windows/vfw_software_codecs/doc/en_Matrox_VFW_Software_Codecs_10.pdf

input which I used to encode the file:

http://samples.mplayerhq.hu/FLV/flash_with_alpha/300x180-Scr-f8-056alpha.flv

by ami_stuff, 11 years ago

Attachment: alpha.jpg added

in reply to:  14 ; comment:15 by Michael Niedermayer, 11 years ago

Replying to ami_stuff:

Finally I was able to encode sample with a real alpha channel:

http://www1.datafilehost.com/d/0436af02

it seems this is "404"

by ami_stuff, 9 years ago

Attachment: matrox.7z added

in reply to:  15 ; comment:17 by ami_stuff, 9 years ago

Replying to michael:

Replying to ami_stuff:

Finally I was able to encode sample with a real alpha channel:

http://www1.datafilehost.com/d/0436af02

it seems this is "404"

Attached, also some info:

http://forum.matrox.com/mxo/viewtopic.php?t=14347

in reply to:  17 comment:18 by Carl Eugen Hoyos, 9 years ago

Replying to ami_stuff:

http://forum.matrox.com/mxo/viewtopic.php?t=14347

I was unable to register on this forum;-(
If they discontinue their mpeg2 alpha codec, maybe they'll share information about how to decode the files.

comment:19 by ami_stuff, 9 years ago

the same colorful thing is visible with "Matrox Uncompressed HD with Alpha (M104)", so to move on, #2611 should be fixed first (maybe fix for #2611 will fix support of "Matrox Uncompressed HD (M102) as well - I have samples)

in reply to:  19 ; comment:20 by Carl Eugen Hoyos, 9 years ago

Replying to ami_stuff:

the same colorful thing is visible with "Matrox Uncompressed HD with Alpha (M104)", so to move on, #2611 should be fixed first (maybe fix for #2611 will fix support of "Matrox Uncompressed HD (M102) as well - I have samples)

Please provide samples with FourCC M102 and M104.

in reply to:  20 comment:21 by ami_stuff, 9 years ago

Replying to cehoyos:

Replying to ami_stuff:

the same colorful thing is visible with "Matrox Uncompressed HD with Alpha (M104)", so to move on, #2611 should be fixed first (maybe fix for #2611 will fix support of "Matrox Uncompressed HD (M102) as well - I have samples)

Please provide samples with FourCC M102 and M104.

http://www.datafilehost.com/d/53861a14

comment:22 by ami_stuff, 9 years ago

hmm just checked this again and "m704.avi" file seems to decode correctly with reference software (after remuxing to *.m2v)

https://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket2616/m704.avi

ffmpeg -vcodec mpeg2video -i 704.avi -vcodec copy 704.m2v

http://www.mpeg.org/MPEG/video/mssg-free-mpeg-software.html

https://web.archive.org/web/20061214212714/http://www.mpeg2.de/video/software/mpg2w11b.zip

(I tested with "mpeg2dec.exe" from "mpg2w11b.zip" archive)

Last edited 9 years ago by ami_stuff (previous) (diff)

by ami_stuff, 9 years ago

Attachment: matrox_mpeg2_720_480.avi added

by ami_stuff, 9 years ago

Attachment: matrox_mpeg2_720_576.avi added

by ami_stuff, 9 years ago

by ami_stuff, 9 years ago

by ami_stuff, 9 years ago

Attachment: matrox_mpeg2_hd_1280.avi added

by ami_stuff, 9 years ago

Attachment: matrox_mpeg2_hd_1440.avi added

by ami_stuff, 9 years ago

Attachment: matrox_mpeg2_hd_1920.avi added

by ami_stuff, 9 years ago

by ami_stuff, 9 years ago

by ami_stuff, 9 years ago

comment:23 by ami_stuff, 9 years ago

attached some more matrox mpeg-2 samples

by ami_stuff, 9 years ago

Attachment: utalpha.7z added

comment:24 by ami_stuff, 9 years ago

It looks like Photoshop detects these colorful things with some kind of video filter.

I exported video with and without alpha to utvideo. "utvideo_rgba_720_480.avi" decodes correctly in Photoshop (no colorful artefacts) and alpha works just fine.

Version 0, edited 9 years ago by ami_stuff (next)
Note: See TracTickets for help on using tickets.