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 4th July 2011, 15:49   #1  |  Link
nusrat1990
Registered User
 
Join Date: Feb 2011
Location: Azerbaijan, Baku
Posts: 5
VC1 pro sdk Encoder speed

Hello.
I am using VC1 pro SDK encoder.
my app transcodes mpeg2 elementary stream ->vc1 AP.
The app must work in realtime (live broadcasting).
mpeg2 es source is 20 mbit/s 1920x1080
I do mpeg2 decoding using libmpeg2, it's very fast.
Bottleneck in vc1 encoder part, which is at least 3-5 times slower than decoder.
my processor is : i7 920(2.6 ghz)
I tried to decrease encoder definition from 1920x1080 to 960x540. it worked. Decoded frames count equal to encoded, but I need to use 1-pass CBR with bitrate specifying, so decreasing definition is not suitable.
also app uses 4 - 10 threads of encoding. i send to each encoder thread 15-35 frames.
current settings are:

-peakrate 0
-rate 0
-profiletype 2
-bframes 7
-maxkeydist 1000
-vbv 0
-ratecontrol 1
-qp 8
-maxw 1920
-maxh 1080
-complexity 0
-framerate 30

Are there any other settings which can increase speed of encoding?
If here are professionals about vc1 pro encoder sdk, please help me.

Thanks,
Nusrat
nusrat1990 is offline   Reply With Quote
Old 4th July 2011, 16:18   #2  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,480
I am not a pro, but while Ben Waggoner is not around...

Quote:
Originally Posted by nusrat1990 View Post
I tried to decrease encoder definition from 1920x1080 to 960x540. it worked. Decoded frames count equal to encoded, but I need to use 1-pass CBR with bitrate specifying, so decreasing definition is not suitable.

Quote:
also app uses 4 - 10 threads of encoding. i send to each encoder thread 15-35 frames.
current settings are:

-peakrate 0
-rate 0
-profiletype 2
-bframes 7
-maxkeydist 1000
-vbv 0
-ratecontrol 1
-qp 8
-maxw 1920
-maxh 1080
-complexity 0
-framerate 30
try -bframes 1 and -maxkeydist 300
Midzuki is offline   Reply With Quote
Old 4th July 2011, 16:38   #3  |  Link
kieranrk
Registered User
 
Join Date: Jun 2009
Location: London, United Kingdom
Posts: 707
Quote:
Originally Posted by nusrat1990 View Post
The app must work in realtime (live broadcasting).
Are you serious? Using a dead codec for live broadcasting?
kieranrk is offline   Reply With Quote
Old 4th July 2011, 16:58   #4  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,480
Quote:
Originally Posted by kieranrk View Post
Are you serious? Using a dead codec for live broadcasting?
Ooops, I hadn't noticed that detail

Anyway

-bframes 0 and -maxkeydist 60
Midzuki is offline   Reply With Quote
Old 4th July 2011, 21:14   #5  |  Link
nusrat1990
Registered User
 
Join Date: Feb 2011
Location: Azerbaijan, Baku
Posts: 5
Quote:
Originally Posted by kieranrk View Post
Are you serious? Using a dead codec for live broadcasting?
Are there any other vc1 codec?
I tried intel codec in IPP. Its perfomance is even worse.

Quote:
Originally Posted by Midzuki View Post
Ooops, I hadn't noticed that detail

Anyway

-bframes 0 and -maxkeydist 60
I tested to set bframes to zero.
But I got error code: -30.
That means only one thing: this setting conflicts with something. very strange.

Why decreasing definition is not suitable.
in 1-pass CBR i specify
-rate 5000
-vbv 2500000
which means half second buffer
Now bitrate will be less than 5000 because i decreased definition, so how can i predict how less it will be?
Performance should be enough to use low buffer.

as i unsderstand from documentation:
-->
lim(real_bitrate) = specified_bitrate;
(vbv -> 0)

I will try to guess, with what "-bframes 0" conflicts.
nusrat1990 is offline   Reply With Quote
Old 4th July 2011, 21:42   #6  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by nusrat1990 View Post
Are there any other vc1 codec?
It seems MainConcept has an VC-1 SDK for sale:
http://www.mainconcept.com/products/...ideo/vc-1.html

I have no idea about it's quality/performance through...
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 4th July 2011, 23:17   #7  |  Link
mp3dom
Registered User
 
Join Date: Jul 2003
Location: Italy
Posts: 1,135
MainConcept VC-1 implementation is quite poor (at least with previous SDK). Even if PSE/PEP is dead and slow, I think it's still the best implementation available.

If nusrat is obliged to use VC-1 for streaming he can think to go with hardware. There are some solutions from Inlet (hardware board encoders).
more info: http://www.compumodules.com/professi...les/fathom.pdf
mp3dom is offline   Reply With Quote
Old 5th July 2011, 00:12   #8  |  Link
kieranrk
Registered User
 
Join Date: Jun 2009
Location: London, United Kingdom
Posts: 707
Quote:
Originally Posted by nusrat1990 View Post
Are there any other vc1 codec?
I tried intel codec in IPP. Its perfomance is even worse.
Why don't you use MPEG-4/AVC like everyone else using a post-MPEG-2 codec? No television broadcasts have ever been done in production with VC-1.
kieranrk is offline   Reply With Quote
Old 5th July 2011, 01:08   #9  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,480
Quote:
Originally Posted by nusrat1990 View Post
Are there any other vc1 codec?
I tried intel codec in IPP. Its perfomance is even worse.

...
I tested to set bframes to zero.
But I got error code: -30.
That means only one thing: this setting conflicts with something. very strange.

...

I will try to guess, with what "-bframes 0" conflicts.
TinTime built a mod of AVS2ASF which fixed that problem and others as well. Download it (source-code included) from:

http://www.mediafire.com/file/ztl0tdilg4n/AVS2ASF.zip

or from:

http://forum.videohelp.com/threads/3...=1#post2067819

BUT, in the end, I have to agree with both kieranrk and mp3dom VC-1 was poisoned by Microsoft's incurable "ASF-mania", this is the reason why it sux pig time

Last edited by Midzuki; 5th July 2011 at 01:11. Reason: typo
Midzuki is offline   Reply With Quote
Old 5th July 2011, 08:17   #10  |  Link
nusrat1990
Registered User
 
Join Date: Feb 2011
Location: Azerbaijan, Baku
Posts: 5
Quote:
Originally Posted by Midzuki View Post
TinTime built a mod of AVS2ASF which fixed that problem and others as well. Download it (source-code included) from:

http://www.mediafire.com/file/ztl0tdilg4n/AVS2ASF.zip

or from:

http://forum.videohelp.com/threads/3...=1#post2067819

BUT, in the end, I have to agree with both kieranrk and mp3dom VC-1 was poisoned by Microsoft's incurable "ASF-mania", this is the reason why it sux pig time
Midzuki,
Yes, in original vc1 sample encoder has error. bdeltaqp conflicts with bframes.
But performance is still bad.
Hardware solution is not flexible,
there is no udp based input and output.
Also my app should work like pipeline, no file using allowed.
MainConcept is slow.
I have to use 1-pass VBR with definition decreasing...
Thanks to everybody for help.
Project completed.

P.S. it's not my decision of using vc1. It's actually not television broadcasting, it's rather comp to comp broadcasting.
nusrat1990 is offline   Reply With Quote
Old 3rd August 2011, 23:12   #11  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Hmmm. A few questions
  • How many milliseconds of latency can you live with?
  • What OS are you running on? Would it be feasible to run on Windows 7?
  • Have you looked at licensing the VC-1 Encoder SDK Enterprise version instead? That's the one with all the IPTV broadcast tuning

The Pro SDK is relatively old code at this point. The encoder in Windows 7 has substantial performance improvemence (8-way threaded, and 40% faster when using B-frames). So if you're trying to do a live HD broadcast of WMV, that would do the job better and more easily. Just make sure to set the PropertyBucket parameters optimally.

Alternatively the Enterprise version of the SDK is the one with the good live encoding tuning, including Lookahead Rate Control and Dynamic Complexity. That's what gets used for all the Silverlight HD live sports broadcasting (Olympics, Wimbleton, and so on). Inlet's Spinnaker VC-1 live encoder runs this library on a bunch of Intel cores.

Your settings could also use some tuning
  • 1 B-frame is generally optimal for film/video content. Using 7 will hurt quality and probably performance as well.
  • Don't set BdeltaQP. If you leave the parameter unset, you'll get the dynamic mode which is almost always best.
  • Why QP=8?
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Reply

Tags
encoding, performance, vc1prosdk

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 15:13.


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