Group:  English: Entertainment ยป microsoft.public.windowsmedia.encoder.optimization
Thread: Quality issue

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Quality issue
Dirk 25.05.2007 11:16:01
Hello,

I have a question about the quality of wmv-encoded content.

I have written an application with the Windows Media Encoder SDK to
transcode mxf-files to wmv. The format of the mxf-videostream is D10 Video
IMX,
that is an interlaced mpeg2 with I-frame-only at 50 MBit/s. For mpeg2
decoding I use Main Concept DShow filter from OpenCube.
I'll have to encode the WMV with a bitrate of 600kBit/s.

The encoded content has a good quality for sourcefiles that have a low
bitrate, i.e. 25 MBit/s or 15 MBit/s.
But surprisingly the results for mxf-files with higher bitrates (about
50MBit/s) are worse quality with visible artifacts.

I have tested this with different profile-settings, deinterlacing and
different encoding-codecs. I tried the "Windows Media Video 9 Advanced
Profile" (VC-1 codec) with different registry settings that may improve
quality, without any usable results. I also tried different settings for the
mpeg2-decoder, so as a completely other decoder. The results were still bad
in quality.

My question to you: what can I do to get a better quality of my wmv-encoded
content, without raising the target-bitrate? Does it depend on my hardware
(CPU) in any way?

Many thanks in advance
Re: Quality issue
"Neil Smith [MVP Digital Media]" <neil[ at ]nospam.com> 25.05.2007 17:25:24
On Fri, 25 May 2007 04:16:01 -0700, Dirk
<Dirk[ at ]discussions.microsoft.com> wrote:

[Quoted Text]
>I have written an application with the Windows Media Encoder SDK to
>transcode mxf-files to wmv. The format of the mxf-videostream is D10 Video
>IMX,
>that is an interlaced mpeg2 with I-frame-only at 50 MBit/s. For mpeg2
>decoding I use Main Concept DShow filter from OpenCube.
>I'll have to encode the WMV with a bitrate of 600kBit/s.

So you're going for nearly a 100:1 compression - however MPEG2 is
already compressed, albeit lightly I assume at 50MBps

It's perfectly reasonable to expect 100:1 for uncompressed content
when using well matched settings for WMV9, VC-1 or H264. However you
may be pushing the limits with precompressed material, as the raw data
rate could be at least 100MBps.

Approximately what dimensions and framerate is the source video ?

>The encoded content has a good quality for sourcefiles that have a low
>bitrate, i.e. 25 MBit/s or 15 MBit/s.

If all things are equal when capturing the lower bitrate streams, it
implies something about the level of compressibility of the content -
if you're saying these files are using unconstrained encodigin
bitrates, and the 3 sample files happened to end up at those bitrates
(i.e. usuing solely a quality based encode process)

For example you might expect high motion sports footage to require
more bitrate to maintain quality, compared to nature footage with
lower changes between frames.

>But surprisingly the results for mxf-files with higher bitrates (about
>50MBit/s) are worse quality with visible artifacts.


Transcoding won't really change that scenario, so you may have reached
the limits of what WM compression can be achieved with the source
content and a fixed bitrate encode.

Is there any improvement if you go to VBR and allow the encoder to
"mop up" spare bitrate for the high motion parts of the content ?


>I have tested this with different profile-settings, deinterlacing and
>different encoding-codecs. I tried the "Windows Media Video 9 Advanced
>Profile" (VC-1 codec) with different registry settings that may improve
>quality, without any usable results. I also tried different settings for the
>mpeg2-decoder, so as a completely other decoder. The results were still bad
>in quality.

We don't really know what settings you're using as yet ;-)
Talking specifics would be a great help there !

>My question to you: what can I do to get a better quality of my wmv-encoded
>content, without raising the target-bitrate? Does it depend on my hardware
>(CPU) in any way?

No. For file based encodes, the encoder will take as long as it takes
to encode to the specified settings, rather than device based content
which can be CPU constrained and may drop frames or compromise the
encode to reach the output goal of realtime encoding.


HTH
Cheers - Neil
------------------------------------------------
Digital Media MVP : 2004-2007
http://mvp.support.microsoft.com/mvpfaqs
Re: Quality issue
Dirk 29.05.2007 08:26:02
Hello Neil,

thank you very much for your detailed reply.

First of all, the resolution of my sourcefile is 810x608 and its framerate
is 25fps.

I think you are right. It could be an issue of the compessibility of the
content.
I recognized lots "stripes" in my source-file that may come from the
interlacing.
Especially when there is movement. Maybe the stripes are producing the
artifacts in my output.
I have tried to reduce them, by setting my mpeg2-decoders deinterlacing
and setting the VC-1s "VideoType" Options to treat every frame as an
interlaced frame - without success.
But I also own a sourcefile of the same type, bitrate, resolution and
framerate.
This source has the same interlacing-stripes and the quality of the output
is good.

About the profile-settings I can say I have experimented with all the
settings.

My actual profilesettings (an extract out of the .prx-file) are the following:
....
<streamconfig majortype="{73646976-0000-0010-8000-00AA00389B71}"
streamnumber="2"
streamname="Video Stream"
inputname="Video409"
bitrate="600000"
bufferwindow="-1"
reliabletransport="0"
decodercomplexity="AU"
rfc1766langid="en-us">
<videomediaprops maxkeyframespacing="40000000"
quality="100"/>
<wmmediatype subtype="{31435657-0000-0010-8000-00AA00389B71}"
bfixedsizesamples="0"
btemporalcompression="1"
lsamplesize="0">
<videoinfoheader dwbitrate="600000"
dwbiterrorrate="0"
avgtimeperframe="400000">
<rcsource left="0"
top="0"
right="640"
bottom="480"/>
<rctarget left="0"
top="0"
right="640"
bottom="480"/>
<bitmapinfoheader biwidth="640"
biheight="480"
biplanes="1"
bibitcount="24"
bicompression="WVC1"
bisizeimage="0"
bixpelspermeter="0"
biypelspermeter="0"
biclrused="0"
biclrimportant="0"/>
</videoinfoheader>
</wmmediatype>
<dataunitextension
extensionsystemid="{1B1EE554-F9EA-4BC8-821A-376B74E4C4B8}"
extensiondatasize="2"
extensionsysteminfo=""/>
</streamconfig>
....

My actual registry settings of the VC-1 are as follows:
(I experimented with the values as well)
DenoiseOption = 1
Force Median = 0
Force Overlap = 1
Video Type = 1
NumBFrames = 1
Force LoopFilter = 1
Dquant Option = 3
Dquant Strength = 3
Motion Search Level = 1
Motion Search Range = -1
Motion Match Method = -1
Motion Vector Cost Method = 1

VBR brings not the desired improvement, only when I'm using the quality
based VBR, but then the files get too large again.
Can I somewhere customize the VBR settings?
Within the profile I only know set three parameters:
vbrquality, bitratemax, bufferwindowmax

greetings
Dirk

"Neil Smith [MVP Digital Media]" wrote:

[Quoted Text]
> On Fri, 25 May 2007 04:16:01 -0700, Dirk
> <Dirk[ at ]discussions.microsoft.com> wrote:
>
> >I have written an application with the Windows Media Encoder SDK to
> >transcode mxf-files to wmv. The format of the mxf-videostream is D10 Video
> >IMX,
> >that is an interlaced mpeg2 with I-frame-only at 50 MBit/s. For mpeg2
> >decoding I use Main Concept DShow filter from OpenCube.
> >I'll have to encode the WMV with a bitrate of 600kBit/s.
>
> So you're going for nearly a 100:1 compression - however MPEG2 is
> already compressed, albeit lightly I assume at 50MBps
>
> It's perfectly reasonable to expect 100:1 for uncompressed content
> when using well matched settings for WMV9, VC-1 or H264. However you
> may be pushing the limits with precompressed material, as the raw data
> rate could be at least 100MBps.
>
> Approximately what dimensions and framerate is the source video ?
>
> >The encoded content has a good quality for sourcefiles that have a low
> >bitrate, i.e. 25 MBit/s or 15 MBit/s.
>
> If all things are equal when capturing the lower bitrate streams, it
> implies something about the level of compressibility of the content -
> if you're saying these files are using unconstrained encodigin
> bitrates, and the 3 sample files happened to end up at those bitrates
> (i.e. usuing solely a quality based encode process)
>
> For example you might expect high motion sports footage to require
> more bitrate to maintain quality, compared to nature footage with
> lower changes between frames.
>
> >But surprisingly the results for mxf-files with higher bitrates (about
> >50MBit/s) are worse quality with visible artifacts.
>
>
> Transcoding won't really change that scenario, so you may have reached
> the limits of what WM compression can be achieved with the source
> content and a fixed bitrate encode.
>
> Is there any improvement if you go to VBR and allow the encoder to
> "mop up" spare bitrate for the high motion parts of the content ?
>
>
> >I have tested this with different profile-settings, deinterlacing and
> >different encoding-codecs. I tried the "Windows Media Video 9 Advanced
> >Profile" (VC-1 codec) with different registry settings that may improve
> >quality, without any usable results. I also tried different settings for the
> >mpeg2-decoder, so as a completely other decoder. The results were still bad
> >in quality.
>
> We don't really know what settings you're using as yet ;-)
> Talking specifics would be a great help there !
>
> >My question to you: what can I do to get a better quality of my wmv-encoded
> >content, without raising the target-bitrate? Does it depend on my hardware
> >(CPU) in any way?
>
> No. For file based encodes, the encoder will take as long as it takes
> to encode to the specified settings, rather than device based content
> which can be CPU constrained and may drop frames or compromise the
> encode to reach the output goal of realtime encoding.
>
>
> HTH
> Cheers - Neil
> ------------------------------------------------
> Digital Media MVP : 2004-2007
> http://mvp.support.microsoft.com/mvpfaqs
>

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net