View Full Version : VC-1 Encoder SDK - Professional released
HookedOnTV
14th July 2008, 19:27
Is there some resource that lists which settings are required based upon choices made? In trying to do CBR encodes, using -ratecontrol 0 or 2, I always just get error code -20. I'm assuming I'm not setting a required parameter but I don't know which.
HookedOnTV
15th July 2008, 14:24
It's kinda like I'm having a conversation with myself... found the problem. Nic, you've made -peakrate required when actually it only applies to -ratecontrol 3. VC1EncASF.cpp line 1524, removing bPeak allows for CBR encoding.
HookedOnTV
4th November 2008, 03:56
Any idea why this is happening:
Encoding in ASF mode
------------Start Analysis-----------
------------End Analysis------------
Average bit rate: 2741.00, total bytes processed: 6610556.00.
Total frames: 463.00, Coded frames: 463.00.
------------Start Encode-----------
------------End Encode--------------
------------Done-----------
Average bit rate: 1609.00, total bytes processed: 3880639.00.
Total frames: 463.00, Coded frames: 203.00.
Total elapsed time in seconds = 193.625000
It's a small mpeg2 file. Encodes fine in other encoders.
ss3
5th November 2008, 20:26
Hello all,
New bie here, happy to join this community after months of passive participation.
I am unable to encode in simpe profile when I am trying to to use SDK RAW2ES @LL (Basically for my research)
RAW2ES.exe -i foreman.yuv -o foreman.vc1 -maxw 176 -maxh 144 -rate 96 -framerate 5 -peakrate 200 -profiletype 0 -bframes 0 -maxkeydist 10 -vbv 327680
*************************************
VC-1 RAW2ES Encoding
*************************************
Failure in CVC1EncES::Init
error = -30
Final error code: -30
Total elapsed time: 0.000000 seconds
Press <Enter> to continue...
Code 30 means
A setting is not valid for the current encoder state. This usually means the setting conflicts with an existing one.
But I am unable to figure out what might be conflict in settings. I donot face such problems with Advanced Profile. Any pointers why?
Few more rookie questions ( or call dumb ones) regarding AP
I need to encode in interlace mode, so does this mean my source has to be an interlace content or by setting -videotype 3 does encodes progressive source to interlaced vc1 stream.
Because this part in documentation confuses me
By default, the VC-1 encoder uses progressive frame encoding for progressive source video and interlaced field encoding for interlaced source video, as specified by the bInterlacedSource member of the CONFIG_PROPERTIES structure passed as an argument to CVC1Encoder::Configure.
Also if i need multiple slices in stream, I am not clear if setting -SH flag is sufficient?
Any help is greatly appreciated
benwaggoner
19th November 2008, 18:06
I believe that -peakrate is defined in bps, not Kbps (at least it is in the library itself). If, so, setting it to 20000 would be a lot better :). Give that a shot. Otherwise what you've got looks good to me. What are you making Simple Profile for?
As for interlaced, yes, you'll want to set the mode to pass interlaced through. It's not going to do any detection, so it'll treat your source as whatever you tell it, so getting that right is pretty important.
ss3
21st November 2008, 03:31
Just curious
Is encoding in SP/MP (profile 0/1) not currently supported ? I mean I used WM 8 utilities and I never get any problem encoding in SP/MP but I always get error codes 20 and 30 while using AVS2ASF.
any body with success encoding in simple profile with elementary stream.
for example
this command work (i.e AP)
AVS2ASF.exe -i football.avs -o ElementryStream.vc1 -framerate 23.976 -ratecontrol 3 -rate 60000 -peakrate 20000 -vbv 1843200 -complexity 5 -profiletype 2 -bframes 1 -maxkeydist 14 -inloop 1 -motionsearchlevel 3 -mesearchmethod 2 -mbcost 1 -mvcost 1 -mvrange 4 -adaptiveGOP -videotype 0
Once I give this command (SP)
AVS2ASF.exe -i football.avs -o ElementryStream.vc1 -framerate 23.976 -ratecontrol 3 -rate 60000 -peakrate 20000 -vbv 184320 -profiletype 0 -bframes 0 -maxkeydist 14 -adaptiveGOP -videotype 0
it doesnot work :(
Any Clues??
The second issue is i am looking to support is multiple slices (in AP) in the encoder. I am a new bie, wondering if some one can give me pointers on how to get support for multiple slices. [ I am able to encode multiple slices with wm9eutil.exe , but I have only binary of this utility, no source hence clueless how to proceed if I need support multiple slices in AVS2ASF)
@Ben
I am doing a comparative study of 264/VC1 for my research report. Hence looking for SP/MP too.
Thanks in advance for any help
Sagittaire
22nd November 2008, 21:50
bitrate must be inferior to max rate:
@REM -----------------------------------------------------------
@REM
@REM Profil BluRay 1080p23.976 2 passes extra high quality
@REM
@REM -----------------------------------------------------------
@REM Source file name (suffit de mettre la source ici)
set E_SRC=Lossless.avs
@REM Set of bitrates (ici le bitrate)
set E_BR=12000
@REM Set of max bitrates (ici le bitrate max)
set MAX_BR=40000
@REM Set of Buffer (ici le buffer)
set BUF_BR=3750000
@REM Profil (ici le nom des fichiers de sortie)
AVS2ASF.exe -i %E_SRC% -o azerty.vc1 -rate %E_BR% -peakrate %MAX_BR% -vbv %BUF_BR% -framerate 23.976 -ratecontrol 3 -profiletype 2 -maxkeydist 24 -bframes 2 -adaptiveGOP -inloop 1 -complexity 5 -motionsearchlevel 2 -mesearchmethod 1 -mbcost 1 -mvcost 1 -mvrange 4
pause
ss3
23rd December 2008, 00:54
Can some one post the working command for simple profile? I am frustrated making the encoder work. It doesnot accept SP settings at all
AVS2ASF.exe -i football.avs -o ElementryStream.vc1 -framerate 23.976 -ratecontrol 3 -rate 60000 -peakrate 120000 -vbv 184320 -profiletype 0 -bframes 0 -maxkeydist 14 -adaptiveGOP -videotype 0
Kurtnoise
5th January 2009, 20:41
@Benwaggoner: could you tell us why SP & MP encodings fail with this tool please ?
benwaggoner
6th January 2009, 05:20
Is there some resource that lists which settings are required based upon choices made? In trying to do CBR encodes, using -ratecontrol 0 or 2, I always just get error code -20. I'm assuming I'm not setting a required parameter but I don't know which.
Hmmm. I don't see anything obviously wrong, but I'm pretty rusty using AVS2ASF; I've been mainly doing Expression Encoder lately. EEv2 uses the same lib and does SP just fine, so you're probably right that it's a paramter thing.
One thing that stands out is that a maxkeydist of 14 is very aytpically low for SP. I don't know that I've ever seen a SP encode with keyframes less than every couple of seconds. Generally for the low power devices where SP makes sense, optimizing for quality@perf is best done with long GOPs and a smaller VBV.
What's the content like, and what are you shooting for with your encode?
benwaggoner
6th January 2009, 19:28
sure...I'll upload a new build tonight.
http://kurtnoise.free.fr/index.php?dir=misc/&file=AVS2ASF-0.3_20080312.zip
Say, is this still the current version?
I'd love to cover this in a blog post. Is there a web site somewhere I can link to for the download, or is this thread it?
I'd like to encourage others to start using it and hopefully enhancing it.
rica
6th January 2009, 19:51
Hi guys, is any gui available?
ss3
6th January 2009, 19:56
Hi Ben,
I donot think they is an issue with key dist , I did try both longer GOPs and shorter VBVs. I guess it is more of an issue with some default settings AP profile which donot work with SP/MP. I tried all possibilities and went through most of documentation but fell short . EE does SP/MP with out much problems but I was looking for generating ES to be used with ref decoder.
I am still looking for solution?.
Kurtnoise
7th January 2009, 07:37
Say, is this still the current version?
yes...although I've a custom build (for my needs) not published.
I'd love to cover this in a blog post. Is there a web site somewhere I can link to for the download, or is this thread it?
no website dedicated to this tool...
benwaggoner
8th January 2009, 01:29
Hi Ben,
I donot think they is an issue with key dist , I did try both longer GOPs and shorter VBVs. I guess it is more of an issue with some default settings AP profile which donot work with SP/MP. I tried all possibilities and went through most of documentation but fell short . EE does SP/MP with out much problems but I was looking for generating ES to be used with ref decoder.
I am still looking for solution?.
Ah! Only AP supports being in ES :). SP and MP were designed with some dependencies on the ASF file format. We fixed that as part of the VC-1 and Advanced Profile effort.
benwaggoner
8th January 2009, 01:30
yes...although I've a custom build (for my needs) not published.
no website dedicated to this tool...
No prob. I've blogged here:
http://on10.net/blogs/benwagg/AVS2ASF-ndash-Open-Source-VC-1-Encoder-SDK-application/
The URL it is actually a search string, so it should continue to point to your current version going forward.
ss3
9th January 2009, 23:15
Ah! Only AP supports being in ES :). SP and MP were designed with some dependencies on the ASF file format. We fixed that as part of the VC-1 and Advanced Profile effort.
I didnot get the fix part. I understand that SP/MP used RCV container to remove ASF dependency.Is it not possible to encode SP/MP to RCV container using SDK?
benwaggoner
10th January 2009, 19:14
I didnot get the fix part. I understand that SP/MP used RCV container to remove ASF dependency.Is it not possible to encode SP/MP to RCV container using SDK?
No, I don't believe so. This is the first time I've ever even seen the letters "RCV" typed by someone not on the Microsoft codec team :).
ss3
12th January 2009, 20:22
No, I don't believe so. This is the first time I've ever even seen the letters "RCV" typed by someone not on the Microsoft codec team :).
RCV is surely not a full fledged container format but surely a encapuslation scheme and Alex zambelli reply on this thread just explains it. http://forum.doom9.org/showthread.php?t=131117 (I guess Alex is part of MS team [:)] and I am just a research student )
But I am desperately looking for a VC1 encoder which can generate SP/MP in ES and multiple slices directly in VC1 ES stream. EE and SDK seems to be not much of help here. Any pointers please?
benwaggoner
15th January 2009, 07:34
RCV is surely not a full fledged container format but surely a encapuslation scheme and Alex zambelli reply on this thread just explains it. http://forum.doom9.org/showthread.php?t=131117 (I guess Alex is part of MS team [:)] and I am just a research student )
But I am desperately looking for a VC1 encoder which can generate SP/MP in ES and multiple slices directly in VC1 ES stream. EE and SDK seems to be not much of help here. Any pointers please?
Alex and I both used to be on the codec team. He's now on the Silverlight evangelism team:
http://www.alexzambelli.com/blog
Anyway, SP and MP simply aren't part about the VC-1 elementary stream spec. Can you explain what you're trying to do? Perhaps you could just make AP with SP/MP feature subsets?
Celeritas
23rd January 2009, 07:03
I have been able to get the video to convert, but in the past I have been using 6 mono wav files in WME (via WMCmd.vbs) to add a 5.1 channel soundtrack. I have been experimenting with the -pr option, but I can't seem to make a .prx file that AVS2ASF likes. I only know enough about avs files to add a single wav, so the avs will play, but AVS2ASF balks at the .prx file, even though I am creating it with WME. If I leave the audiodub section out of the avs file, it works but picks up no audio.
My avs file looks like:
a=DirectShowSource("C:\Users\Public\Videos\HD Transcodes\vob\video-indexed.avi", audio=false)
b=WavSource("C:\Users\Public\Videos\HD Transcodes\vob\audio.C.wav")
audiodub(a,b)
Trim(0,100) #to make it short for testing
ConvertToYV12()
The current contents of the .prx file:
<?xml version="1.0"?>
<WMEncoder major_version="9"
minor_version="0"
Name="WMEncoder10810"
AutoIndex="0"
SynchroniesOperation="0" >
<Description />
<Attributes >
<WMENC_LONG Name="SurroundMix" Value="-3" />
<WMENC_LONG Name="CenterMix" Value="-3" />
<WMENC_LONG Name="LFEMix" Value="-12" />
</Attributes>
<SourceGroups >
<SourceGroup Name="Source 1" >
<Source Type="WMENC_AUDIO" Scheme="multichannel" >
<UserData >
<WMENC_STRING Name="FrontLeft" Value="C:\Users\Public\Videos\HD Transcodes\vob\audio.L.wav" />
<WMENC_STRING Name="FrontRight" Value="C:\Users\Public\Videos\HD Transcodes\vob\audio.R.wav" />
<WMENC_STRING Name="FrontCenter" Value="C:\Users\Public\Videos\HD Transcodes\vob\audio.C.wav" />
<WMENC_STRING Name="LowFrequency" Value="C:\Users\Public\Videos\HD Transcodes\vob\audio.LFE.wav" />
<WMENC_STRING Name="BackLeft" Value="C:\Users\Public\Videos\HD Transcodes\vob\audio.SL.wav" />
<WMENC_STRING Name="BackRight" Value="C:\Users\Public\Videos\HD Transcodes\vob\audio.SR.wav" />
</UserData>
</Source>
<EncoderProfile id="Multiple bit rates audio (CBR)" />
<UserData >
</UserData>
</SourceGroup>
</SourceGroups>
<File LocalFileName="C:\Users\Public\Videos\HD Transcodes\vob\audio.wma" />
<WMEncoder_Profile id="Multiple bit rates audio (CBR)" >
<![CDATA[ <profile version="589824"
storageformat="1"
name="Multiple bit rates audio (CBR)"
description="">
<streamconfig majortype="{73647561-0000-0010-8000-00AA00389B71}"
streamnumber="1"
streamname="Audio Stream"
inputname="Audio409"
bitrate="640008"
bufferwindow="-1"
reliabletransport="0"
decodercomplexity=""
rfc1766langid="en-us"
>
<wmmediatype subtype="{00000162-0000-0010-8000-00AA00389B71}"
bfixedsizesamples="1"
btemporalcompression="0"
lsamplesize="27307">
<waveformatex wFormatTag="354"
nChannels="6"
nSamplesPerSec="48000"
nAvgBytesPerSec="80001"
nBlockAlign="27307"
wBitsPerSample="24"
codecdata="18003F0000000000000000000000E0000000"/>
</wmmediatype>
</streamconfig>
</profile>
]]>
</WMEncoder_Profile>
<UserData >
<WMENC_LONG Name="Encoding\Bitrate0\Video0\CustomW" Value="320" />
<WMENC_LONG Name="Encoding\Bitrate0\Video0\CustomH" Value="240" />
<WMENC_STRING Name="Encoding\Audio0" />
<WMENC_STRING Name="Encoding\Video0" />
<WMENC_STRING Name="Encoding\Script0" />
</UserData>
</WMEncoder>
The error message I get is:
------------Start Encode-----------
Failure in CASFFileWriter::LoadCustomProfile
hr = 80070002
Failure in CASFFileWriter::Init
hr = 80070002
Failure in VC1Enc::InitFileWriter
hr = 80070002
VC1 SDK Error = 0
Failure in CASFFileWriter::Destroy
hr = c00d002b
Failure in CVC1EncASF::DestroyFileReader
hr = c00d002b
Failure in Encode
hr = 80070002
VC1 SDK Error = 0
Total elapsed time in seconds = 18.557000
The command I am using is:
C:\Users\John\Downloads\Software\Multimedia\AVS2ASF-0.3_20080312\Release>avs2asf
-i "C:\Users\Public\Videos\HD Transcodes\vob\video.avs" -o "C:\Users\Public\Videos\HD Transcodes\Serenity-VC1.asf"
-rate 8000 -framerate 23.976 -peakrate 12000 -maxkeydist 4 -profiletype 2
-bframes 2 -vbv 300000 -pr "C:\Users\Public\Videos\HD Transcodes\vob\audioencode.prx"
NorthPole
23rd January 2009, 17:09
@Celeritas
add this to your avs file will give you 5.1 audio:
audio1 = WavSource("fl.wav")
audio2 = WavSource("fr.wav")
audio3 = WavSource("c.wav")
audio4 = WavSource("lfe.wav")
audio5 = WavSource("sl.wav")
audio6 = WavSource("sr.wav")
fl = GetChannel(audio1, 1)
fr = GetChannel(audio2, 1)
c = GetChannel(audio3, 1)
lfe = GetChannel(audio4, 1)
sl = GetChannel(audio5, 1)
sr = GetChannel(audio6, 1)
b = MergeChannels(fl, fr,c, lfe, sl, sr)
Not sure how that will work with avs2asf because I don't us the audio options.
ss3
23rd January 2009, 19:28
Alex and I both used to be on the codec team. He's now on the Silverlight evangelism team:
http://www.alexzambelli.com/blog
Anyway, SP and MP simply aren't part about the VC-1 elementary stream spec. Can you explain what you're trying to do? Perhaps you could just make AP with SP/MP feature subsets?
Ben,
this is what I cam looking for
A VC1 encoder which can encode in ES (i.e VC1) the AP Profile with multiple slices
and SP/MP based elementary stream encoder i.e with RCV encapsulation.
the reason I am looking for multiple slices is I need to compare the performance of error concealment of VC1 and 264 multiple slices
And SP/MP because I need to use ref decoder which doesnot accept wmv format
Any pointers/help please?
NorthPole
24th January 2009, 22:45
Here is a modified version of Nic's program:
I fixed the aspectratio error described on page 5 of this thread. Also, I fixed the rate control CBR modes 0 & 2 and the 1 pass VBR mode 1. Previously you could only use modes 3 and 4.
Works fine for me in all modes.
http://www.mediafire.com/?3m5x8mmn0rt
b66pak
24th January 2009, 23:47
thanks a lot...but no documentation?...could you post some examples with the new modes?
_
NorthPole
25th January 2009, 00:40
The encoder defaults to mode 1... which is 1-pass VBR with a quantizier setting of 8. You only need to supply the input and output files and these switches
-framerate <xxxx> -profiletype <x> -bframes <x> -maxkeydist <x>
Examples are at the end of the command line help.
This is from the command line help
*************************************
VC-1 AVS2ASF v0.4 Encoding Sample
Original Sample AVI2ASF code Copyright (C) Microsoft Corporation.
All rights reserved.
Avisynth, YV12 & Raw support added by Nic.
Aspect Ratio, Help and Rate Control Mode changes by Northpole.
*************************************
The required parameters are based on the default rate control mode 1,
1-pass VBR with a Fixed QP of 8.
If you change the rate control mode, simply specify appropriate values
for the required parameters.
Syntax:
AVS2ASF.exe -i <inputfile> -o <outputfile>
-framerate <frame rate> -profiletype <profile type>
-bframes <number of b frames> -maxkeydist <maximum key frame distance>
[Optional 1] <value1> [Optional 2] <value2> ...
Command line options:
-i <input AVI file name>
-o <output ASF file name>
[-rate] <output rate (kilobits per second)>
The range is 1 to 135000.
Not used when Rate Control Mode equals 1.
[-complexity] <encoder complexity>
0 to 5, 0 = best performance, 5 = best quality.
[-qp] <quantization parameter (QP)>
Fixed QP if -ratecontrol equals 1 (1-pass VBR)
Max QP if -ratecontrol equals 0 or 2 (CBR)
The range is 1 to 31.
Not applicable when Rate Control Mode equals 3 or 4.
[-framerate] <source frame rate>
[-interlaced] Specifies interlaced source.
[-maxkeydist] <maximum distance between key frames>
[-bframes] <number of B-frames per P-frame>
Range is 0 to 7.
[-peakrate] <peak bit rate (kilobits per second)>
The range is 1 to 135000.
Not used when Rate Control Mode equals 0, 1, 2, or 4.
[-profiletype] <type specifier>
0 = Simple, 1= Main, 2 = Advanced.
[-ratecontrol]
0 = 1-pass CBR
1 = 1-pass VBR fixed QP
2 = 2-pass CBR
3 = 2-pass peak constrained VBR
4 = 2-pass unconstrained VBR.
[-vbv] <size of vbv buffer>
The range is 1 to 157696 for Simple profile, 1 to 5001216 for Main profile
and 1 to 33792000 for Advanced profile.
VBVBuffer = Bit rate in kbps x buffer duration in seconds x 125.
Recommended buffer duration = 8 seconds.
Not used when Rate Control Mode equals 1 or 4.
[-colorformatflags] <colorformatflag> <colorprimaries> <transferchar>
<matrixcoef>
- If colorformatflag is 1, then you must specify colorprimaries,
transferchar, and matrixcoef.
- If colorformatflag is 0, then no need to specify colorprimaries,
transferchar, and matrixcoef because the decoder will generate them
for you.
[-denoise] <0 or 1>
Turn on or off denoise filter.
[-inloop] <0 or 1>
Turn on or off in-loop filter.
[-median] <0 or 1>
Turn on or off median filter.
[-overlap] <0 or 1>
Turn on or off overlap smoothing.
[-noiseedge] <0 or 1>
Turn on or off noise edge removal.
[-deltamvrange] <delta mv range index>
0 = off, 1= horizontal, 2= vertical, 3 = h + v.
[-motionsearchlevel] <level>
0 = Luma only. (Default)
1 = Luma w/ nearest-int chroma.
2 = Luma w/ true chroma.
3 = Macroblock-adaptive with true chroma.
4 = Macroblock adaptive with nearest int chroma.
[-mesearchmethod] <phase>
0 = off, 1 = always use hadamard, 2 = adaptive sad/hadamard
[-mbcost] <cost method>
0 = SAD/Hadamard, 1 = RD cost.
[-mvcost] <cost method>
0 = static, 1 = dynamic.
[-mvrange] <mv range>
0 to 3 are increasing ranges. 4 is macroblock adaptive.
[-dquantoption] <level>
0 to 3, 0 = off, 1 = I frame only, 2 = I/P frame only, 3 = I/P/B frame.
[-adaptivequant] <adaptive quantization>
0 to 21
[-dquantpstrength] <level>
Range is 0 to 2.
0 = VC-1 encoder-managed setting.
Only valid when -dquantoption > 0.
[-dquantbstrength] <level>
Range is 0 to 4.
0 = VC-1 encoder-managed setting.
Only valid when -dquantoption > 0.
[-bdeltaqp] <qp increase for B-frames>
0 to 30
[-closedentrypt] <closed entry point value.
[-dw] <display width (pixels)>
[-dh] <display height (pixels)>
[-ew] <encode width (pixels)>
[-eh] <encode height (pixels)>
[-lbpresent]
Indicates letterboxing is present.
[-lookahead]
Indicates use lookahead.
-ratecontrolmode must equal 0.
[-adaptiveGOP]
Indicates use adaptive GOP.
[-keyPop] <key pop level>
Indicates use key frame pulse reduction.
Range is 0 to 4. 0 = Off, 1 -4 are strength levels.
[-threads] <num threads>
Maximum is 4.
[-affinity] <affinity mask>
Processor mapping.
[-aspectratio] <aspectratioindex> <aspectratiowidth> <aspectratioheight>
If aspectratioindex is 15, then you must specify aspectratiowidth and
aspectratioheight
ie. if video is 720x480 at 16x9 aspect ratio, use -aspectratio 15 40 33
[-videotype] <type>
0 = progressive, 1 = interlaced frames, 2= interlaced fields
3 = detect interlacing type, 4 = automatic.
[-tff]
Indicates top field first.
[-rff]
Indicates repeat first field.
[-pr] <path to .prx file>
Specifies a .prx file to use for audio profile data.
By default, the sample looks for an appropriate audio codec.
Example: Mode 0
AVS2ASF.exe -i video.avs -o encoded.asf -framerate 25 -profiletype 2
-bframes 2 -maxkeydist 6 -ratecontrol 0 -rate 3000 -vbv 3000000
Example: Mode 1
AVS2ASF.exe -i video.avs -o encoded.asf -framerate 25 -profiletype 2
-bframes 2 -maxkeydist 6
Example: Mode 2
AVS2ASF.exe -i video.avs -o encoded.asf -framerate 25 -profiletype 2
-bframes 2 -maxkeydist 6 -ratecontrol 2 -rate 3000 -vbv 3000000
Example: Mode 3
AVS2ASF.exe -i video.avs -o encoded.asf -framerate 25 -profiletype 2
-bframes 2 -maxkeydist 6 -ratecontrol 3 -rate 3000 -peakrate 25000 -vbv 3000000
Example: Mode 4
AVS2ASF.exe -i video.avs -o encoded.asf -framerate 25 -profiletype 2
-bframes 2 -maxkeydist 6 -ratecontrol 4 -rate 3000
Use an output filename with a suffix of .vc1 for VC1 Elementry Stream encoding
b66pak
25th January 2009, 00:44
thanks...i will give it a try...
_
Celeritas
27th January 2009, 02:30
@NorthPole, thank you. I can get it to play 5.1 with your help, but the 5.1 WAVE_EXTENSIBLE audio is not welcome in WME, so the .prx file can't process it. I've decided to bag the idea of trying to get avs2asf to take 5.1 audio in through a .prx file. I'll just create the 5.1 wma file separately and mux it with Windows Stream Editor.
NorthPole
30th January 2009, 04:03
@celeritas
How did you create your 5.1 wma file? what tool?
Sagittaire
30th January 2009, 06:52
Here is a modified version of Nic's program:
I fixed the aspectratio error described on page 5 of this thread. Also, I fixed the rate control CBR modes 0 & 2 and the 1 pass VBR mode 1. Previously you could only use modes 3 and 4.
Works fine for me in all modes.
http://www.mediafire.com/?3m5x8mmn0rt
You can fix the thread mode bug? (impossible to use more than one thread here).
There are probleme with dquant mode too (impossible to use more than level 1 for dequant)
NorthPole
30th January 2009, 14:56
You can fix the thread mode bug? (impossible to use more than one thread here. There are probleme with dquant mode too (impossible to use more than level 1 for dequant)
I'll look into it... On the thread bug, I don't have a duo core so I'm not sure how successful I will be.
buzzqw
30th January 2009, 15:45
would be awesome if you can use the audio options as wmcmd.vbs in avs2vc1
also fixing audio encoidng (5.1)
BHH
NorthPole
30th January 2009, 16:27
would be awesome if you can use the audio options as wmcmd.vbs in avs2vc1
also fixing audio encoidng (5.1)
BHH
I have been looking at it but I can't get a 5.1 wma file from wmcmd yet. What profile works with wmcmd or what is your command line. I know nic got it to work but I have not had any luck.
NorthPole
30th January 2009, 16:31
Ok here is a new build v0.5...
http://www.mediafire.com/?dcx3lmtygu8
Fixed the quantization problem.
I tried these option and they worked.
-adaptivequant 5 -dquantoption 2 -dquantpstrength 2 -dquantbstrength 0
-adaptivequant 1 -dquantoption 3 -dquantpstrength 2 -dquantbstrength 2
Still working on the thread bug...
Also update the command line help
buzzqw
30th January 2009, 16:42
well at least including audio support will be very GOOD!
BHH
NorthPole
30th January 2009, 17:43
@Sagittaire
Have you tried setting both the -threads and -affinity switches when doing an encode? Also, if you use the Dquant option, you have to have the mvcost = 0.
Sagittaire
31st January 2009, 21:09
@Sagittaire
Have you tried setting both the -threads and -affinity switches when doing an encode? Also, if you use the Dquant option, you have to have the mvcost = 0.
Yes -threads 2 don't work. I have error when I use it.
*************************************
Encoding in ES (Elementry Stream) mode
Failure in CVC1EncASF::set_advancedProps
error = -20
Failure in CVC1EncASF::Init
hr = 0
VC1 SDK Error = -20
Final error code: -20
D:\Mes dossiers\Codec\VC1 SDK>pause
Appuyez sur une touche pour continuer...
NorthPole
31st January 2009, 22:10
@satittaire
I looked at the code and I believe it is sending the correct command line values (ie thread, affinity etc) to the encoder. The error occurs when the encoder gets the info and tries to apply them. What type of cpu do you have?
This is the info from the SDK
Each instance of the VC-1 encoder can use up to four threads to distribute encoding tasks. Each thread runs on a separate processor. Each thread processes a different horizontal portion of the frame. Each horizontal portion should be at least 64 rows in height.
Motion search operations only happen within each horizontal portion. Because most motion in video is typically horizontal, such as panning, motion estimation usually works well. However, if the content contains a lot of vertical motion, some slight loss of coding efficiency may occur.
Note that specifying higher values will not raise an error. The encoder will simply use four threads.
The affinity mask specifies which processors to use. Each binary digit (bit) in the affinity mask represents an individual processor. Setting a bit to one makes the VC-1 encoder use the corresponding processor to run an encoding thread. For example, to make the VC-1 encoder use processors zero, one, two, and three, the low-order byte of the affinity mask would be:
00001111
This affinity mask has a corresponding decimal value of 15
So for the four processors example shown above with the low-order byte of 00001111,
I believe that you obtain the affinity value is decimals by
(1 * 2^3) + (1 * 2^2) + (1 * 2^1) + (1 * 2^0) = 8 + 4 + 2 + 1 = 15
Don't know if that helps (or makes any difference) but the SetNumThreads command used within the program passes both the thread and affinity to the encoder. You may try different combinations to see if anything works. Sorry I couldn't be of more help.
Sagittaire
31st January 2009, 23:01
I have c2d ...
-threads 2 -affinity 00000011 don't work
NorthPole
31st January 2009, 23:44
@sagittarie
You need to enter a decimal number for the affinity so try:
-threads 2 -affinity -3
or
-threads 2 -affinity -2
or
-threads 2 -affinity -1
or
-threads 2 -affinity -0
That about all the ideas I have... Good Luck.
Celeritas
1st February 2009, 00:36
@celeritas
How did you create your 5.1 wma file? what tool?
I will likely just use 6 wav files and create a 5.1 wma10 file with WME9 by removing the video section from what I already use to make wmv files. Then I can mux it with the asf file from avs2asf. Using avs to create a 5.1 soundtrack the file generate an audio stream that WME9 can't decode, and a .prx file just defines the output. I'm starting to wonder if I should just stick with the old Format Encoder, as I was already producing VC-1 output via the advanced profile. I'm not looking to create elementary streams, I just want to play movies back on my Xbox.
b66pak
1st February 2009, 23:06
@sagittaire...may be this fix will help:
http://support.microsoft.com/kb/945170
_
L.E. the source:
http://on10.net/blogs/benwagg/Best-practices-for-Windows-Media-Encoder-in-2009/
_
hellrasinbrasom
7th February 2009, 01:56
I've been having a field day with VC-1 Encoder by using it for my Video Game Projects.:sly:
benwaggoner
9th February 2009, 03:37
I've been having a field day with VC-1 Encoder by using it for my Video Game Projects.:sly:
For recording game activity, or for doing cut scenes in games?
I've been doing some encoding from FRAPS lately, and would love to hear what your experience was like and what settings you've used.
As expected, good modern game footage with nice anti-aliasing looks good. It's the old pixelated Quake/Counterstrike caps full of blocks that aren't aligned with block boundaries that are the killer :).
hellrasinbrasom
9th February 2009, 17:05
In answer to your que benwaggoner its for Cutscenes from 2 game series. The results I got from encoding with VC-1 as a 1st time encoder has been uncanny. As far as settings went I mainly stuck with the HD format for all VOB encodes.
OS: Vista 32 bit
W/H: 1280 x 720
Total Bitrate: 6241
Audio: 192
benwaggoner
19th February 2009, 18:52
@kurtnoise (or anyone else with insight)
I've been trying to get AVS2ASF working, and I keep erroring out. Certainly user error, but here's my (super-simple) command:
"C:\Program Files\AVS2ASF\AVS2ASF.exe" -i BBB.avs -o BBB_Zunecompat.wmv -rate 2000 -peakrate 3000 -framerate 23.976 -maxkeydist 96 -bframes 1 -profiletype 1 -vbv 1500000
And it returns:
Encoding in ASF mode
Failure in CVC1EncASF::set_advancedProps
error = -30
Failure in CVC1EncASF::Init
hr = 0
VC1 SDK Error = -30
Final error code: -30
Total elapsed time in seconds = 0.045000
An expected advanced property not being passed on? I've got all the required ones on there, I believe.
Kurtnoise
19th February 2009, 19:17
profiletype 1/2 have never worked for me with this tool and I don't know why as I said earlier...Hope someone else knows.
benwaggoner
19th February 2009, 19:25
profiletype 1/2 have never worked for me with this tool and I don't know why as I said earlier...Hope someone else knows.
Interesting. If I just switch -profiletype to 2, I fail with a -20 instead of a -30, but I still fail. There's probably a clue in there.
Darn it, I guess I'll have to file a bug on my own product :).
Are you planning any more updates? It could be useful to have a debug mode where it dumps out the exact parameters it's passing off to the SDK.
ss3
19th February 2009, 19:38
oops i too faced frustration using 1/2 profile settings, attemps to work didnot succeed
Looks like problem from MS [:(]
Sagittaire
19th February 2009, 20:35
Interesting. If I just switch -profiletype to 2, I fail with a -20 instead of a -30, but I still fail. There's probably a clue in there.
Darn it, I guess I'll have to file a bug on my own product :).
Are you planning any more updates? It could be useful to have a debug mode where it dumps out the exact parameters it's passing off to the SDK.
work for me ...
@REM Source file name (suffit de mettre la source ici)
set E_SRC=Test.avs
@REM Set of bitrates (ici le bitrate)
set E_BR=2000
@REM Set of max bitrates (ici le bitrate max)
set MAX_BR=3000
@REM Set of Buffer (ici le buffer)
set BUF_BR=1500000
@REM Profil (ici le nom des fichiers de sortie)
AVS2ASF.exe -i %E_SRC% -o azerty.asf -rate %E_BR% -peakrate %MAX_BR% -vbv %BUF_BR% -framerate 23.976 -ratecontrol 3 -profiletype 2 -maxkeydist 96 -bframes 1 -adaptiveGOP -inloop 1 -overlap 0 -complexity 4 -motionsearchlevel 2 -mesearchmethod 1 -mbcost 1 -mvcost 1 -mvrange 4 -adaptivequant 1 -threads 1
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.