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 > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 24th April 2015, 10:40   #1  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,183
q264 - an AVC encoder using Intel® Quick Sync Video

Quote:
q264 is a Windows command-line program that uses Intel® Quick Sync Video hardware to encode video using the H.264 (AVC) encoding algorithm.

Features

The following are primary features of q264:
Very fast H.264 encoding using Intel® Quick Sync hardware.
Relatively low CPU load during encoding.
Reads .avi, .avs (avisynth.org), raw NV12 and YV12 files, .m2v, .mkv, .mp4, .m2ts, and many more formats.
Supports the following input color formats: RGB24 (RGB3), RGB32 (RGB4), NV12, YV12, I420, YUY2, and YUV422P.
Lets you control the low level Quick Sync parameters for flexible encoding.
This uses the FFmpeg libraries (libavformat, libavcodec, etc) under the LGPLv2.1 to read non-raw input files. FFmpeg supports a very large number of input file formats, and relatively few have been tested in q264, so they may or may not work. See ffmpeg.org for more information about the FFmpeg project.


Platform Requirements
q264 is a command line program built with the Intel® Media SDK to use the special Quick Sync hardware built into newer Intel® CPUs. Only 2nd and later generation Intel® Core architecture microprocessors (Sandy Bridge, Ivy Bridge, and Haswell) have this capability. See the Wikipedia article and the Intel® web site for more information.
http://www.tetrachromesoftware.com/

http://www.tetrachromesoftware.com/H...full-help.html

not tried yet...

Last edited by Kurtnoise; 24th April 2015 at 10:43.
Kurtnoise is offline   Reply With Quote
Old 24th April 2015, 18:11   #2  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 2,619
This is probably a better link to show which processors have the required GPU level.

http://en.wikipedia.org/wiki/Intel_HD_and_Iris_Graphics

The lookahead requires at least Haswell. Which is annoying, as the readily available dual-socket workstations ideal for software encoding are still Ivy Bridge. I don't actually have any computers to run an complete speed/quality test on. I'd love to see what the quality and speed in its highest quality mode would be v. x264. It's probably most interesting for laptop use.

Anyway, it looks interesting. Trellis, a CRF equivalent, lookahead. Scene cut reducing encoding speed by 50% at 1080p is pretty striking. It'd be nice if there was a min GOP size parameter.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Instant Video

My Compression Book

Amazon Instant Video is hiring! PM me if you're interested.
benwaggoner is offline   Reply With Quote
Old 25th April 2015, 07:16   #3  |  Link
NikosD
Registered User
 
Join Date: Aug 2010
Location: Athens, Greece
Posts: 2,463
q264 is an interesting app, as I have written elsewhere in Doom9, but QSVEncC is still the most advanced QuickSync encoder out there.

It's included in transcoding apps like Hybrid and StaxRip.

You can get it also from here:
http://rigaya34589.blog135.fc2.com/b...tegory-10.html
__________________
Win 10 x64 (17763.55) - Core i3-4170/ iGPU HD 4400 (v.5058)
HEVC decoding benchmarks
H.264 DXVA Benchmarks for all
NikosD is offline   Reply With Quote
Old 25th April 2015, 19:39   #4  |  Link
iSunrise
Registered User
 
Join Date: Dec 2008
Posts: 497
Quote:
Originally Posted by benwaggoner View Post
...I'd love to see what the quality and speed in its highest quality mode would be v. x264. It's probably most interesting for laptop use.
Same here. Unfortunately there doesn't seem to be anyone interested with capable HW to compare it to x264. StaxRip is great for it, since it also has a great comparator tool included.

I would especially be interested in a comparison with several bitrates, like 5mbit, 10mbit and 20mbit for use with a live-transcoding application (which can read every input container/format/codec).

Unfortunately, I currently lack the necessary HW or I would do it myself.

Last edited by iSunrise; 25th April 2015 at 19:47.
iSunrise is offline   Reply With Quote
Old 25th April 2015, 20:22   #5  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 2,619
Well, my 2012 MacBook Pro's GPU has just started causing GPU panics, so It's time for me to get some new hardware anyway. I need to get a system that can play out UHD anyway.


-Ben Waggoner (via TapaTalk)
__________________
Ben Waggoner
Principal Video Specialist, Amazon Instant Video

My Compression Book

Amazon Instant Video is hiring! PM me if you're interested.
benwaggoner is offline   Reply With Quote
Old 25th April 2015, 23:49   #6  |  Link
vivan
/人 ◕ ‿‿ ◕ 人\
 
Join Date: May 2011
Location: Russia
Posts: 649
On i5-4670K (no OC):
Code:
q264 -i crowd_run_1080p.y4m -o q264_36.h264 -u 1 -la 100 -icq 36
22 FPS 18896 kbps
Code:
x264 crowd_run_1080p.y4m --preset medium --crf 25.1 -o x264_251.mp4
23.93 fps, 18719.52 kb/s

http://s23.postimg.org/g41t2xqex/q26...6_00_45_34.png
http://s3.postimg.org/t0xki4xk1/x264...6_00_54_38.png
http://s23.postimg.org/vo96th0jd/cro...15_04_26_0.png

q264 http://rghost.ru/private/6HTG7Dbmn/2...9d8ea4c8731eb2
x264 http://rghost.ru/private/87B9yMCPD/4...ffb5a16621dde8

Slower and worse than --preset medium. With better cpu you could even go with --preset slow at this speed.

q264 20.2 FPS 38393 kbps
http://rghost.ru/private/7vFmnLb6l/c...efa0ce134a68b4

x264 19.58 fps, 38564.22 kb/s
http://rghost.ru/private/6Kmrdsygz/4...8d2abca2cae27d
http://rghost.ru/private/7tRLwJ5Rj/d...0753a69cd2d200
(sorry for 2 parts, it just refuses to store it for some reason).

Quote:
Originally Posted by iSunrise View Post
I would especially be interested in a comparison with several bitrates, like 5mbit, 10mbit and 20mbit for use with a live-transcoding application (which can read every input container/format/codec).

Unfortunately, I currently lack the necessary HW or I would do it myself.
Want me to encode something different?

Last edited by vivan; 25th April 2015 at 23:54.
vivan is offline   Reply With Quote
Old 26th April 2015, 00:27   #7  |  Link
Nevilne
Registered User
 
Join Date: Aug 2010
Posts: 134
http://www.tetrachromesoftware.com/q...264test_1.html
Nevilne is offline   Reply With Quote
Old 26th April 2015, 03:43   #8  |  Link
aegisofrime
Registered User
 
Join Date: Apr 2009
Posts: 452
Quote:
Originally Posted by vivan View Post
On i5-4670K (no OC):
Code:
q264 -i crowd_run_1080p.y4m -o q264_36.h264 -u 1 -la 100 -icq 36
22 FPS 18896 kbps
Code:
x264 crowd_run_1080p.y4m --preset medium --crf 25.1 -o x264_251.mp4
23.93 fps, 18719.52 kb/s

http://s23.postimg.org/g41t2xqex/q26...6_00_45_34.png
http://s3.postimg.org/t0xki4xk1/x264...6_00_54_38.png
http://s23.postimg.org/vo96th0jd/cro...15_04_26_0.png

q264 http://rghost.ru/private/6HTG7Dbmn/2...9d8ea4c8731eb2
x264 http://rghost.ru/private/87B9yMCPD/4...ffb5a16621dde8

Slower and worse than --preset medium. With better cpu you could even go with --preset slow at this speed.

q264 20.2 FPS 38393 kbps
http://rghost.ru/private/7vFmnLb6l/c...efa0ce134a68b4

x264 19.58 fps, 38564.22 kb/s
http://rghost.ru/private/6Kmrdsygz/4...8d2abca2cae27d
http://rghost.ru/private/7tRLwJ5Rj/d...0753a69cd2d200
(sorry for 2 parts, it just refuses to store it for some reason).

Want me to encode something different?
Looking at the speed of your q264 encode I wonder if it's running in software mode. On QSVEnc (different software I know, but in theory they are both using QuickSync right?) I get in excess of 200 fps with those settings.
aegisofrime is offline   Reply With Quote
Old 26th April 2015, 04:12   #9  |  Link
vivan
/人 ◕ ‿‿ ◕ 人\
 
Join Date: May 2011
Location: Russia
Posts: 649
Nope, cpu load is ~20% (while it runs at ~2 Ghz).

I've tried QSVEnc in Hybrid (with maxing out what I could) - it was ~50 fps but quality was much worse (and I have to adjust quality to match bitrate). The resulting cli was
Quote:
QSVEnc --y4m -i - --input-buf 3 --slices 0 --fps 5000000/100000 --la-icq 37 --profile auto --level auto --quality best --bframes 16 --gop-len 0 --sar 1:1 --b-pyramid --scenechange --trellis all --mbbrc --extbrc --colormatrix undef
Actually it was even worse than q265 with -u 7 and without -la (which runs at ~150 fps, probably being limited by SSD speed) o_O

Last edited by vivan; 26th April 2015 at 05:00. Reason: pls fix code tag
vivan is offline   Reply With Quote
Old 26th April 2015, 05:24   #10  |  Link
aegisofrime
Registered User
 
Join Date: Apr 2009
Posts: 452
Quote:
Originally Posted by vivan View Post
Nope, cpu load is ~20% (while it runs at ~2 Ghz).

I've tried QSVEnc in Hybrid (with maxing out what I could) - it was ~50 fps but quality was much worse (and I have to adjust quality to match bitrate). The resulting cli was

Actually it was even worse than q265 with -u 7 and without -la (which runs at ~150 fps, probably being limited by SSD speed) o_O
Interesting, I should probably try out q265. Thanks for replying
aegisofrime is offline   Reply With Quote
Old 26th April 2015, 06:24   #11  |  Link
NikosD
Registered User
 
Join Date: Aug 2010
Location: Athens, Greece
Posts: 2,463
Some useful information:

QSVEncC in Hybrid is a lot slower than QSVEncC in StaxRip x86 on my system.
QSVEncC is used in a different way and with some defaults on with Hybrid that they delay the encoding.

Also, never use -u 1, it is just abnormally slow.

The command that vivan used with -u 1 and -la 100, it's like someone is trying hard to make QuickSync look as slow as possible.

I almost never use LA and if I do, I use it with the default value.

Try -u 3 or -u 4 without LA with StaxRip x86 and tell me the differences in speed and quality with your settings and app.
__________________
Win 10 x64 (17763.55) - Core i3-4170/ iGPU HD 4400 (v.5058)
HEVC decoding benchmarks
H.264 DXVA Benchmarks for all
NikosD is offline   Reply With Quote
Old 26th April 2015, 06:37   #12  |  Link
aegisofrime
Registered User
 
Join Date: Apr 2009
Posts: 452
I have been having some fun playing with q264, seems to have some potential. Now, if only I can figure out how to pipe Avisynth output to it. Anyone help me out? I have tried AVS2YUV but q264 seems to require an actual file for input.
aegisofrime is offline   Reply With Quote
Old 26th April 2015, 13:36   #13  |  Link
kalehrl
Registered User
 
Join Date: Feb 2011
Posts: 284
I encoded a 5-minute video clip using QSVEncC in staxrip with la-icq, crf23, quality-best settings and the resulting file was almost the same size as the source file
Source 158mb, encode 155mb. Encoding speed 176fps.
The same file encoded using x264 with the same script, crf 23, preset slow ended with a 55,2mb file. Encoding speed 35fps.
As far as I'm concerned, HW encoding makes no sense.
kalehrl is offline   Reply With Quote
Old 26th April 2015, 13:42   #14  |  Link
NikosD
Registered User
 
Join Date: Aug 2010
Location: Athens, Greece
Posts: 2,463
For ICQ encoding mode, which is close to CRF don't use LA.
Also as I said before NEVER USE BEST QUALITY (it is very slow and increases the size)

Use something around balanced (-u 4).

I transcoded a HEVC file with large bitrate to H.264 using only ICQ without LA and in balanced speed the result was HALF BITRATE with very good quality.

HW encoding is not like SW encoding.
It has its secrets. I told you some.
__________________
Win 10 x64 (17763.55) - Core i3-4170/ iGPU HD 4400 (v.5058)
HEVC decoding benchmarks
H.264 DXVA Benchmarks for all
NikosD is offline   Reply With Quote
Old 26th April 2015, 16:14   #15  |  Link
aegisofrime
Registered User
 
Join Date: Apr 2009
Posts: 452
Quote:
Originally Posted by NikosD View Post
For ICQ encoding mode, which is close to CRF don't use LA.
Also as I said before NEVER USE BEST QUALITY (it is very slow and increases the size)

Use something around balanced (-u 4).

I transcoded a HEVC file with large bitrate to H.264 using only ICQ without LA and in balanced speed the result was HALF BITRATE with very good quality.

HW encoding is not like SW encoding.
It has its secrets. I told you some.
Well that is interesting I will give it a go. But it's disappointing that the settings are so misleading in their use. I guess we are used to x264 like you say where typically the use of slower presets will also result in a smaller file.
aegisofrime is offline   Reply With Quote
Old 26th April 2015, 17:08   #16  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 9,418
Increasing the size in best quality isn't necessarily a bad thing, if it preserves more quality in the same process. That whole statement is just misleading, and nothing else.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 26th April 2015, 17:16   #17  |  Link
vivan
/人 ◕ ‿‿ ◕ 人\
 
Join Date: May 2011
Location: Russia
Posts: 649
Quote:
Originally Posted by kalehrl View Post
I encoded a 5-minute video clip using QSVEncC in staxrip with la-icq, crf23, quality-best settings and the resulting file was almost the same size as the source file
Source 158mb, encode 155mb. Encoding speed 176fps.
The same file encoded using x264 with the same script, crf 23, preset slow ended with a 55,2mb file. Encoding speed 35fps.
As far as I'm concerned, HW encoding makes no sense.
Even comparing x264 with different settings makes no sense, comparing different encoders with wildly different definition of "crf" is even worse.
You have to match bitrate and compare them visually.

Quote:
Originally Posted by aegisofrime View Post
Well that is interesting I will give it a go. But it's disappointing that the settings are so misleading in their use. I guess we are used to x264 like you say where typically the use of slower presets will also result in a smaller file.
They are not misleading, even with x264 slower preset could give larger file. See above, such comparison is wrong.

Quote:
Originally Posted by NikosD View Post
The command that vivan used with -u 1 and -la 100, it's like someone is trying hard to make QuickSync look as slow as possible.
We were interested in how it compares with x264, you know.

Quote:
Originally Posted by NikosD View Post
HW encoding is not like SW encoding.
It has its secrets. I told you some.
OH LOOK, FASTER PRESET GIVES FASTER ENCODING SPEED.
Thank you for sharing this secret secret.

With -u 3 (~100 fps in staxrip, ~90 fps in q264) it hardly can compare with --preset veryfast (~80 fps). With -u 4 (~120 fps in q264) it's even worse.

staxrip with --quality high --icq 27
http://rghost.ru/private/6ry2wHpVH/1...b63b3febf22f7b

q264 -u 3 -icq 28
http://rghost.ru/private/8rY4BBRgT/e...86de8a75a6004f

q264 -u 4 -icq 28
http://rghost.ru/private/6tTQPZrzh/8...8f6fab40bdbba9

x264 --preset veryfast --crf 24.2
http://rghost.ru/private/6J97F46qJ/e...a9490502275668

source http://s21.postimg.org/pkne4gkmt/cro...15_04_26_1.png
staxrip --quality high http://s21.postimg.org/48bat1bat/cro...15_04_26_1.png
q264 -u 3 http://s21.postimg.org/h7hp9slf9/q26...4_26_19_05.png
q264 -u 4 http://s21.postimg.org/6r1l7gmet/q26...4_26_19_05.png
x264 --preset veryfast http://s21.postimg.org/l017pj0xh/x26...6_19_05_36.png
x264 --preset medium http://s21.postimg.org/8b6x5uut1/x26...6_19_05_43.png

Quote:
Originally Posted by NikosD View Post
I transcoded a HEVC file with large bitrate to H.264 using only ICQ without LA and in balanced speed the result was HALF BITRATE with very good quality.
Great comparison. Try encode with --preset veryfast next, and then claim how terrible slower presets are (because you got great quality and it was fast).
vivan is offline   Reply With Quote
Old 26th April 2015, 17:34   #18  |  Link
NikosD
Registered User
 
Join Date: Aug 2010
Location: Athens, Greece
Posts: 2,463
Quote:
Originally Posted by vivan View Post

We were interested in how it compares with x264, you know.
And who told you that in order to compare HW encoding with SW encoding you have to use the worst case scenario with HW encoding pushing the LA to max value 100 and pushing the speed parameter (-u) to its slowest value (1) ?

Quote:
Originally Posted by vivan View Post
OH LOOK, FASTER PRESET GIVES FASTER ENCODING SPEED.
Thank you for sharing this secret secret.
Quote:
Originally Posted by nevcairiel View Post
Increasing the size in best quality isn't necessarily a bad thing, if it preserves more quality in the same process. That whole statement is just misleading, and nothing else.

The secret, that you didn't understand, is that balanced speed/quality of (-u 4) gives a very good quality a lot of faster than best quality (-u 1 ) and with smaller file.

So, it's not that faster preset gives faster encoding, but that faster preset gives faster encoding, smaller file and similar quality.

AVOID USING -u 1 in your comparisons with anything.

Quote:
Originally Posted by vivan View Post
Great comparison. Try encode with --preset veryfast next, and then claim how terrible slower presets are (because you got great quality and it was fast).
Again it seems that you don't understand.
I looked at the figures again, the HEVC file was ~6.2Mbps and the similar quality H.264 file produced by -ICQ and balanced speed (-u 4) is ~4.4Mbps (not half bitrate actually but smaller).
__________________
Win 10 x64 (17763.55) - Core i3-4170/ iGPU HD 4400 (v.5058)
HEVC decoding benchmarks
H.264 DXVA Benchmarks for all
NikosD is offline   Reply With Quote
Old 26th April 2015, 17:58   #19  |  Link
kalehrl
Registered User
 
Join Date: Feb 2011
Posts: 284
Quote:
For ICQ encoding mode, which is close to CRF don't use LA.
Encoded the same file with the same script using just ICQ, crf 23, best quality and the encoded file is 81,2mb and the bitrate is half of that produced by LA-ICQ.
The speed was around 205fps, so just a little faster.
I'll experiment with other quality settings.
kalehrl is offline   Reply With Quote
Old 26th April 2015, 23:38   #20  |  Link
aegisofrime
Registered User
 
Join Date: Apr 2009
Posts: 452
Quote:
Originally Posted by kalehrl View Post
Encoded the same file with the same script using just ICQ, crf 23, best quality and the encoded file is 81,2mb and the bitrate is half of that produced by LA-ICQ.
The speed was around 205fps, so just a little faster.
I'll experiment with other quality settings.
In my own tests the quality produced by ICQ is inferior to LA-ICQ (tons of blocking!).

I think Quick Sync has potential but a lot of work needs to be done to drill down on good settings.
aegisofrime 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:21.


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