Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > New and alternative video codecs

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th August 2011, 05:22   #1  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,480
[SOLVED] VC-1 Aspect Ratio vs.Libav/FFmpeg

Offenders:

ffdshow r3919
LAV Video 0.31
MPCVideoDec.ax 1.5.2.3337
Mplayer r33574
ffplay N-31653-gfaa3381


Problem:

If you have a VC-1 clip with non-square pixels, there may be difficulties for the decoders and players listed above. Let's say you create a VC-1 stream at 720x540, and set its PAR to 4:3 (so the video will be displayed at 960x540); ffdshow's libavcodec resizes the image to something slightly greater than 16:9 BUT, if the video includes information about "Display Width" and "Display Height", then both ffdshow and LAV Video make MPC crash

ffplay.exe does the following:

Quote:
ffplay version N-31653-gfaa3381,
Copyright (c) 2003-2011 the FFmpeg developers
built on Jul 28 2011 01:57:12 with gcc 4.6.1

configuration:

<SNIP>

libavutil 51. 11. 0 / 51. 11. 0
libavcodec 53. 9. 0 / 53. 9. 0
libavformat 53. 6. 0 / 53. 6. 0
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 27. 3 / 2. 27. 3
libswscale 2. 0. 0 / 2. 0. 0
libpostproc 51. 2. 0 / 51. 2. 0

[matroska,webm @ 01EBC760] Estimating duration from bitrate,
this may be inaccurate

Input #0, matroska,webm, from 'zz-ms-sekond.mkv':
Duration: 00:00:10.00, start: 0.000000, bitrate: N/A
Stream #0.0: Video: vc1 (Advanced), yuv420p, 960x540 [PAR 1:1 DAR
16:9], PAR 4:3 DAR 64:27,
25 fps, 25 tbr, 1k tbn, 25 tbc (default)
[vc1 @ 024823C0] Bits overconsumption: 59625 > 59600B sq= 0B f=0/0
[vc1 @ 024823C0] concealing 1331 DC, 1331 AC, 1331 MV errors
1313117818.22 A-V: 0.000 s:0.0 aq= 0KB vq= 47KB sq= 0B f=0/0
As for Mplayer and MPCVideoDec.ax, they don't crash, but they do screw the image anyway:

Quote:
MPlayer Sherpya-SVN-r33574-4.2.5 (C) 2000-2011 MPlayer Team
163 audio & 367 video codecs

Playing zz-ms-sekond.mkv.
libavformat file format detected.
[matroska,webm @ 0029bc10] Estimating duration from bitrate, this may
be inaccurate
[lavf] stream 0: video (vc1), -vid 0
VIDEO: [WVC1] 960x540 0bpp 25.000 fps 0.0 kbps ( 0.0 kbyte/s)
Load subtitles in ./
======================================================================
====
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Unsupported PixelFormat 61
Unsupported PixelFormat 53
Unsupported PixelFormat 61
Unsupported PixelFormat 53
Selected video codec: [ffvc1] vfm: ffmpeg (FFmpeg WVC1)
======================================================================
====
Audio: no sound
Starting playback...
Movie-Aspect is 2.37:1 - prescaling to correct movie aspect.
VO: [directx] 960x540 => 1280x540 Planar YV12
[vc1 @ 01239f34]concealing 510 DC, 510 AC, 510 MV errors
[vc1 @ 01239f34]concealing 510 DC, 510 AC, 510 MV errors
[vc1 @ 01239f34]concealing 510 DC, 510 AC, 510 MV errors
[vc1 @ 01239f34]concealing 510 DC, 510 AC, 510 MV errors
[vc1 @ 01239f34]concealing 510 DC, 510 AC, 510 MV errors
[vc1 @ 01239f34]concealing 510 DC, 510 AC, 510 MV errors
[vc1 @ 01239f34]concealing 510 DC, 510 AC, 510 MV errors
[vc1 @ 01239f34]concealing 510 DC, 510 AC, 510 MV errors
[vc1 @ 01239f34]concealing 510 DC, 510 AC, 510 MV errors
[vc1 @ 01239f34]concealing 510 DC, 510 AC, 510 MV errors
...

...

...

Exiting... (Quit)
vc1-samples.7z @ https://skydrive.live.com/?cid=5acf0...0EBAE8D5%21126

Last edited by Midzuki; 28th August 2011 at 08:45. Reason: add link to samples ++ fix typo
Midzuki is offline   Reply With Quote
Old 13th August 2011, 11:00   #2  |  Link
Reimar
Registered User
 
Join Date: Jun 2005
Posts: 278
Crash should be because of bug in FFmpeg VC-1 decoder, I sent a patch: http://ffmpeg.org/pipermail/ffmpeg-d...st/113852.html.
Concerning PAR, FFmpeg says the PAR is set to 3:2, not 4:3, I think it is parsing the custom PAR incorrectly: http://ffmpeg.org/pipermail/ffmpeg-d...st/113854.html
Reimar is offline   Reply With Quote
Old 14th August 2011, 19:23   #3  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,480
@ Reimar: Many thanks for the attention

Now, all I can do is just wait for duly-updated builds of Mplayer, ffdshow, and MPC-HC.
Midzuki is offline   Reply With Quote
Old 16th August 2011, 20:18   #4  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,480
To whom this may interest , the ArcSoft VC-1 decoder also presents aspect-ratio issues Like "ffdshow+wmv9", it converts the 16:9 flag to 18:9 ( = 2:1) OTOH, my 960x408 (1:1) encode of Sintel is "wisely" scaled to 16:9, because "broadcasting and Blu-Ray are all that matters"

Last edited by Midzuki; 16th August 2011 at 21:05.
Midzuki is offline   Reply With Quote
Old 16th August 2011, 22:15   #5  |  Link
Reimar
Registered User
 
Join Date: Jun 2005
Posts: 278
Well, FFmpeg is now updated and MPlayer should thus be working fine.
Other projects will probably follow "somewhen".
Reimar is offline   Reply With Quote
Old 19th August 2011, 06:18   #6  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,480
Quote:
Originally Posted by Reimar View Post
Well, FFmpeg is now updated and MPlayer should thus be working fine.

Other projects will probably follow "somewhen".
Very true. On the one hand, MPCVideoDec.ax 1.5.3.3677 is working as it should *THUMBS UP*

OTOH, in ffdshow r3972 (from xvidvideo.ru), the dämn design flaw has not been fixed yet -.-

Last edited by Midzuki; 19th August 2011 at 07:05. Reason: update; too many typos
Midzuki is offline   Reply With Quote
Old 28th August 2011, 08:52   #7  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,480
Now, ...

ffdshow (r3976 and r3978) == OK

ffplay N-32071-g276f43b == OK

MPCVideoDec.ax == OK

LAV Video 0.33 == OK

As for Mplayer, the only problem is find an up-to-date Windows build I know, there exists the so-called
"Mplayer-WW", but it's not "the real thing"

Last edited by Midzuki; 28th August 2011 at 08:53. Reason: formatting
Midzuki is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 13:54.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.