Hi cats
I try to understand if there is a way to do an h264 hardware encoding with my notebook HP i7 J113EL
that have a Intel HD4600 + NVidia GT750M graphic cards
If I don't mistake using ffmpeg with -vcodec h264_nvenc is used the GT750M
but maybe it's usable also the quicksync function? or other hardware encoding method?
and if I use the NVidia encoding can I set to use -crf XY to do a Costant Rate Factor encoding?
thanks
		
			+ Reply to Thread
			
		
		
		
			 
		
			
	
	
				Results 1 to 30 of 54
			
		- 
	
- 
	It' s in the help 
 ffmpeg -h full 1>ffmpeg_fullhelp.txt
 quicksync
 -c:v h264_qsv
 
 nvenc doesn't have eqivalent "crf", but has cqp mode. For nvenc rate control options
 Code:-rc <int> E..V.... Override the preset rate-control (from -1 to INT_MAX) (default -1) constqp E..V.... Constant QP mode vbr E..V.... Variable bitrate mode cbr E..V.... Constant bitrate mode vbr_minqp E..V.... Variable bitrate mode with MinQP (deprecated) ll_2pass_quality E..V.... Multi-pass optimized for image quality (deprecated) ll_2pass_size E..V.... Multi-pass optimized for constant frame size (deprecated) vbr_2pass E..V.... Multi-pass variable bitrate mode (deprecated) cbr_ld_hq E..V.... Constant bitrate low delay high quality mode cbr_hq E..V.... Constant bitrate high quality mode vbr_hq E..V.... Variable bitrate high quality mode
- 
	Try convert it to 420 , qsv doesn't support 422 encoding . If that doesn't work, try update driver 
- 
	and alternalitevly using the nvenc what parameter is more close to the CRF 22? 
 "-rc constqp" but in what way the quality value?
- 
	"crf 22" is from a different encoder , different quality, different method of rate control. There won't be anything completely comparable 
 
 You have try some values and check if you like it
- 
	ok but it there a practical example of use of - for example - the -rc constqp? 
- 
	I could not get it to work until I found this thread 
 Option "-q" etc does not work, defaults to very low quality.Code:-c:v h264_nvenc -rc:v constqp -global_quality 20 
- 
	exactlly I don't why but yesteday the -c:v h264_nvenc works, and today I get this error 
 
 
 [Attachment 42287 - Click to enlarge]
 
 using:
 
 Code:ffmpeg.exe -y -i c0113.mxf -vf scale=interl=1 -c:v h264_nvenc out.mp4 
- 
	You have a notebook, don't you - and doesn't the nVidia notebook GPU shut down (reverting to CPU graphics) sometimes to save power? If so, you might want to force the GPU to stay active when connected to AC power, using power profiles. 
- 
	ffmpeg version N-81646-gc19da0c Copyright (c) 2000-2016 the FFmpeg developers 
 built with gcc 5.4.0 (GCC)
 configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
 libavutil 55. 29.100 / 55. 29.100
 libavcodec 57. 55.101 / 57. 55.101
 libavformat 57. 48.103 / 57. 48.103
 libavdevice 57. 0.102 / 57. 0.102
 libavfilter 6. 62.100 / 6. 62.100
 libswscale 4. 1.100 / 4. 1.100
 libswresample 2. 1.100 / 2. 1.100
 libpostproc 54. 0.100 / 54. 0.100
 Guessed Channel Layout for Input Stream #0.1 : mono
 Guessed Channel Layout for Input Stream #0.2 : mono
 Guessed Channel Layout for Input Stream #0.3 : mono
 Guessed Channel Layout for Input Stream #0.4 : mono
 Guessed Channel Layout for Input Stream #0.5 : mono
 Guessed Channel Layout for Input Stream #0.6 : mono
 Guessed Channel Layout for Input Stream #0.7 : mono
 Guessed Channel Layout for Input Stream #0.8 : mono
 Input #0, mxf, from 'c0113.mxf':
 Metadata:
 uid : d9611000-5277-05c1-0270-08004602023b
 generation_uid : d9611000-5277-05c2-0270-08004602023b
 company_name : SONY
 product_name : Opt
 product_version : 1.22
 product_uid : 060e2b34-0401-0103-0e06-012002010300
 modification_date: 2016-12-30T11:55:30.000000Z
 material_package_umid: 0x060A2B340101010501010D4313000000549A160016780580 08004602023B0270
 timecode : 00:29:35:14
 Duration: 00:00:12.72, start: 0.000000, bitrate: 60347 kb/s
 Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 50000 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
 Metadata:
 file_package_umid: 0x060A2B340101010501010D431301D8874960100052770580 08004602023B0270
 Stream #0:1: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
 Metadata:
 file_package_umid: 0x060A2B340101010501010D431301D8874960100052770580 08004602023B0270
 Stream #0:2: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
 Metadata:
 file_package_umid: 0x060A2B340101010501010D431301D8874960100052770580 08004602023B0270
 Stream #0:3: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
 Metadata:
 file_package_umid: 0x060A2B340101010501010D431301D8874960100052770580 08004602023B0270
 Stream #0:4: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
 Metadata:
 file_package_umid: 0x060A2B340101010501010D431301D8874960100052770580 08004602023B0270
 Stream #0:5: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
 Metadata:
 file_package_umid: 0x060A2B340101010501010D431301D8874960100052770580 08004602023B0270
 Stream #0:6: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
 Metadata:
 file_package_umid: 0x060A2B340101010501010D431301D8874960100052770580 08004602023B0270
 Stream #0:7: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
 Metadata:
 file_package_umid: 0x060A2B340101010501010D431301D8874960100052770580 08004602023B0270
 Stream #0:8: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
 Metadata:
 file_package_umid: 0x060A2B340101010501010D431301D8874960100052770580 08004602023B0270
 [h264_nvenc @ 0000000002368b80] No NVENC capable devices found
 Output #0, mp4, to 'out.mp4':
 Metadata:
 uid : d9611000-5277-05c1-0270-08004602023b
 generation_uid : d9611000-5277-05c2-0270-08004602023b
 company_name : SONY
 product_name : Opt
 product_version : 1.22
 product_uid : 060e2b34-0401-0103-0e06-012002010300
 modification_date: 2016-12-30T11:55:30.000000Z
 material_package_umid: 0x060A2B340101010501010D4313000000549A160016780580 08004602023B0270
 timecode : 00:29:35:14
 Stream #0:0: Unknown: none, SAR 1:1 DAR 0:0
 Metadata:
 file_package_umid: 0x060A2B340101010501010D431301D8874960100052770580 08004602023B0270
 encoder : Lavc57.55.101 h264_nvenc
 Stream #0:1: Unknown: none
 Metadata:
 file_package_umid: 0x060A2B340101010501010D431301D8874960100052770580 08004602023B0270
 encoder : Lavc57.55.101 aac
 Stream mapping:
 Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (h264_nvenc))
 Stream #0:1 -> #0:1 (pcm_s24le (native) -> aac (native))
 Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
- 
	
- 
	Please consider this 422 source: 
 
 https://www.dropbox.com/s/829iziwuetpdqm4/source422.MXF?dl=0
 
 I have try to encode with libx264 using:
 
 and with NVENC using:Code:ffmpeg64bitmar2017.exe -threads 12 -y -i source422.MXF -pix_fmt yuv420p -vf scale=interl=1,format=pix_fmts=yuv420p -c:v libx264 -profile:v high -level:v 4.1 -g 33 -bf 2 -crf 21.6 -flags +ildct+ilme -top 1 -aspect 16:9 -an x264_420.MP4 
 
 Here I have attach x264_420.MP4 and outNVENC.MP4Code:v:\automazioneclip\core\ffmpeg64bitmar2017.exe -threads 12 -y -i source422.mxf -pix_fmt yuv420p -vf scale=interl=1,format=pix_fmts=yuv420p -c:v h264_nvenc -rc:v constqp -global_quality 26 -level:v 4.1 -flags +ildct+ilme -top 1 -aspect 16:9 -an outNVENC.MP4 
 
 the x264 have more quality : the nvenc have a little "croma ghost" or an out of color in details... it's not the same quality of the x264.
 
 Is there a way to have or to seems the "same" quality?
- 
	The chroma notching errors look like not sending NV12 (NVEnc expects "NV12" , not yuv420p ) . 
 
 It is encoded with I-frame only . Try a slower preset -preset slow , which is an internal 2pass HQ mode for NVEnc, and includes bframes (unless constqp overrrides it, not sure)
- 
	[h264_nvenc @ 0000000001cf7360] Using global_quality with nvenc is deprecated. Use qp instead. 
 
 -qp or -global_quality seem to override control and place I-frame only . Adding -bf 2 or some number doesn't overrride.
 
 So I recommend using VBR RC instead with -preset slow, that's NVEnc's best mode . You're not going to get something analogous to "CRF"
- 
	mmmm 
 
 in this moment I cannot verify at CRT monitor the output however -BF 2 causes a wrong green color for 1/2 seconds at the beginning of the output, I'm forced to set to 0.Code:v:\automazioneclip\core\ffmpeg64bitmar2017.exe -threads 12 -y -i source422.mxf -pix_fmt yuv420p -vf scale=interl=1,format=pix_fmts=yuv420p -c:v h264_nvenc -rc vbr_2pass -cq 30 -qmin 28 -qmax 30 -preset slow -bf 0 -global_quality 26 -level:v 4.1 -flags +ildct+ilme -top 1 -aspect 16:9 -an outNVENC.MP4 
 
 In the meantime I have try also the QSV encoder that seems resolve the problem of the "out of color"
 
 but randomly I get this errorCode:ffmpeg64bitsett2016.exe -threads 12 -y -i c0113.mxf -filter_complex "[0:1] [0:2] amerge" -pix_fmt yuv420p -vf scale=interl=1,format=pix_fmts=yuv420p -c:v h264_qsv -global_quality 27 -level:v 4.1 -flags +ildct+ilme -top 1 -c:a ac3 -b:a 320k -ar 48000 -aspect 16:9 out56.MP4 
 
 
 [Attachment 42308 - Click to enlarge]
 
 ffmpeg version N-81646-gc19da0c Copyright (c) 2000-2016 the FFmpeg developers
 built with gcc 5.4.0 (GCC)
 configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
 libavutil 55. 29.100 / 55. 29.100
 libavcodec 57. 55.101 / 57. 55.101
 libavformat 57. 48.103 / 57. 48.103
 libavdevice 57. 0.102 / 57. 0.102
 libavfilter 6. 62.100 / 6. 62.100
 libswscale 4. 1.100 / 4. 1.100
 libswresample 2. 1.100 / 2. 1.100
 libpostproc 54. 0.100 / 54. 0.100
 Guessed Channel Layout for Input Stream #0.1 : mono
 Guessed Channel Layout for Input Stream #0.2 : mono
 Guessed Channel Layout for Input Stream #0.3 : mono
 Guessed Channel Layout for Input Stream #0.4 : mono
 Guessed Channel Layout for Input Stream #0.5 : mono
 Guessed Channel Layout for Input Stream #0.6 : mono
 Guessed Channel Layout for Input Stream #0.7 : mono
 Guessed Channel Layout for Input Stream #0.8 : mono
 Input #0, mxf, from 'c0113.mxf':
 Metadata:
 uid : d9611000-5277-05c1-0270-08004602023b
 generation_uid : d9611000-5277-05c2-0270-08004602023b
 company_name : SONY
 product_name : Opt
 product_version : 1.22
 product_uid : 060e2b34-0401-0103-0e06-012002010300
 modification_date: 2016-12-30T11:55:30.000000Z
 material_package_umid: 0x060A2B340101010501010D4313000000549A160016780580 08004602023B0270
 timecode : 00:29:35:14
 Duration: 00:00:12.72, start: 0.000000, bitrate: 60347 kb/s
 Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 50000 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
 Metadata:
 file_package_umid: 0x060A2B340101010501010D431301D8874960100052770580 08004602023B0270
 Stream #0:1: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
 Metadata:
 file_package_umid: 0x060A2B340101010501010D431301D8874960100052770580 08004602023B0270
 Stream #0:2: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
 Metadata:
 file_package_umid: 0x060A2B340101010501010D431301D8874960100052770580 08004602023B0270
 Stream #0:3: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
 Metadata:
 file_package_umid: 0x060A2B340101010501010D431301D8874960100052770580 08004602023B0270
 Stream #0:4: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
 Metadata:
 file_package_umid: 0x060A2B340101010501010D431301D8874960100052770580 08004602023B0270
 Stream #0:5: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
 Metadata:
 file_package_umid: 0x060A2B340101010501010D431301D8874960100052770580 08004602023B0270
 Stream #0:6: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
 Metadata:
 file_package_umid: 0x060A2B340101010501010D431301D8874960100052770580 08004602023B0270
 Stream #0:7: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
 Metadata:
 file_package_umid: 0x060A2B340101010501010D431301D8874960100052770580 08004602023B0270
 Stream #0:8: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
 Metadata:
 file_package_umid: 0x060A2B340101010501010D431301D8874960100052770580 08004602023B0270
 [Parsed_amerge_0 @ 00000000022c5480] No channel layout for input 1
 [Parsed_amerge_0 @ 00000000022c5480] Input channel layouts overlap: output layout will be determined by the number of distinct input channels
 Incompatible pixel format 'yuv420p' for codec 'h264_qsv', auto-selecting format 'nv12'
 [mp4 @ 00000000022e3b00] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
 Last message repeated 1 times
 Output #0, mp4, to 'out56.MP4':
 Metadata:
 uid : d9611000-5277-05c1-0270-08004602023b
 generation_uid : d9611000-5277-05c2-0270-08004602023b
 company_name : SONY
 product_name : Opt
 product_version : 1.22
 product_uid : 060e2b34-0401-0103-0e06-012002010300
 modification_date: 2016-12-30T11:55:30.000000Z
 material_package_umid: 0x060A2B340101010501010D4313000000549A160016780580 08004602023B0270
 timecode : 00:29:35:14
 encoder : Lavf57.48.103
 Stream #0:0: Audio: ac3 ([165][0][0][0] / 0x00A5), 48000 Hz, stereo, fltp, 320 kb/s (default)
 Metadata:
 encoder : Lavc57.55.101 ac3
 Stream #0:1: Video: h264 (h264_qsv) ([33][0][0][0] / 0x0021), nv12, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 1000 kb/s, 0.04 fps, 12800 tbn, 25 tbc
 Metadata:
 file_package_umid: 0x060A2B340101010501010D431301D8874960100052770580 08004602023B0270
 encoder : Lavc57.55.101 h264_qsv
 Side data:
 cpb: bitrate max/min/avg: 0/0/1000000 buffer size: 0 vbv_delay: -1
 Stream mapping:
 Stream #0:1 (pcm_s24le) -> amerge:in0 (graph 0)
 Stream #0:2 (pcm_s24le) -> amerge:in1 (graph 0)
 amerge (graph 0) -> Stream #0:0 (ac3)
 Stream #0:0 -> #0:1 (mpeg2video (native) -> h264 (h264_qsv))
 Press [q] to stop, [?] for help
 [h264_qsv @ 00000000025a3560] EncodeFrameAsync returned -17
 Video encoding failed
 Conversion failed!
 
   
- 
	This is wrong for ffmpeg NVEnc 
 This is right for ffmpeg NVEnc (NV12)Code:-pix_fmt yuv420p -vf scale=interl=1,format=pix_fmts=yuv420p 
 Code:-vf scale=interl=1,format=pix_fmts=nv12 
 
 
 Did you try update intel driver for QSV ? Are you using other application that is accessing QSV at same time ?
 
 Have you ever been able to successfully encode using ffmepg QSV ? Did you try rigaya's QSVENCC? If you can encode with that you know it's not a hardware/driver issue
- 
	Do you see difference? 
 
 Here is 1:1 cropped
 
 Left is yuv420p , right is nv12
- 
	ffmpeg -h encoder=h264_nvenc 
 ffmpeg version 3.3.2 Copyright (c) 2000-2017 the FFmpeg developers
 built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
 
 libavutil 55. 58.100 / 55. 58.100
 libavcodec 57. 89.100 / 57. 89.100
 libavformat 57. 71.100 / 57. 71.100
 libavdevice 57. 6.100 / 57. 6.100
 libavfilter 6. 82.100 / 6. 82.100
 libswscale 4. 6.100 / 4. 6.100
 libswresample 2. 7.100 / 2. 7.100
 libpostproc 54. 5.100 / 54. 5.100
 Encoder h264_nvenc [NVIDIA NVENC H.264 encoder]:
 General capabilities: delay
 Threading capabilities: none
 Supported pixel formats: yuv420p nv12 p010le yuv444p yuv444p16le bgr0 rgb0 cuda
 h264_nvenc AVOptions:
 -preset <int> E..V.... Set the encoding preset (from 0 to 11) (default medium)
 default E..V....
 slow E..V.... hq 2 passes
 medium E..V.... hq 1 pass
 fast E..V.... hp 1 pass
 hp E..V....
 hq E..V....
 bd E..V....
 ll E..V.... low latency
 llhq E..V.... low latency hq
 llhp E..V.... low latency hp
 lossless E..V....
 losslesshp E..V....
 -profile <int> E..V.... Set the encoding profile (from 0 to 3) (default main)
 baseline E..V....
 main E..V....
 high E..V....
 high444p E..V....
 -level <int> E..V.... Set the encoding level restriction (from 0 to 51) (default auto)
 auto E..V....
 1 E..V....
 1.0 E..V....
 1b E..V....
 1.0b E..V....
 1.1 E..V....
 1.2 E..V....
 1.3 E..V....
 2 E..V....
 2.0 E..V....
 2.1 E..V....
 2.2 E..V....
 3 E..V....
 3.0 E..V....
 3.1 E..V....
 3.2 E..V....
 4 E..V....
 4.0 E..V....
 4.1 E..V....
 4.2 E..V....
 5 E..V....
 5.0 E..V....
 5.1 E..V....
 -rc <int> E..V.... Override the preset rate-control (from -1 to INT_MAX) (default -1)
 constqp E..V.... Constant QP mode
 vbr E..V.... Variable bitrate mode
 cbr E..V.... Constant bitrate mode
 vbr_minqp E..V.... Variable bitrate mode with MinQP
 ll_2pass_quality E..V.... Multi-pass optimized for image quality (only for low-latency presets)
 ll_2pass_size E..V.... Multi-pass optimized for constant frame size (only for low-latency presets)
 vbr_2pass E..V.... Multi-pass variable bitrate mode
 -rc-lookahead <int> E..V.... Number of frames to look ahead for rate-control (from -1 to INT_MAX) (default -1)
 -surfaces <int> E..V.... Number of concurrent surfaces (from 0 to 64) (default 32)
 -cbr <boolean> E..V.... Use cbr encoding mode (default false)
 -2pass <boolean> E..V.... Use 2pass encoding mode (default auto)
 -gpu <int> E..V.... Selects which NVENC capable GPU to use. First GPU is 0, second is 1, and so on. (from -2 to INT_MAX) (default any)
 any E..V.... Pick the first device available
 list E..V.... List the available devices
 -delay <int> E..V.... Delay frame output by the given amount of frames (from 0 to INT_MAX) (default INT_MAX)
 -no-scenecut <boolean> E..V.... When lookahead is enabled, set this to 1 to disable adaptive I-frame insertion at scene cuts (default false)
 -forced-idr <boolean> E..V.... If forcing keyframes, force them as IDR frames. (default false)
 -b_adapt <boolean> E..V.... When lookahead is enabled, set this to 0 to disable adaptive B-frame decision (default true)
 -spatial-aq <boolean> E..V.... set to 1 to enable Spatial AQ (default false)
 -temporal-aq <boolean> E..V.... set to 1 to enable Temporal AQ (default false)
 -zerolatency <boolean> E..V.... Set 1 to indicate zero latency operation (no reordering delay) (default false)
 -nonref_p <boolean> E..V.... Set this to 1 to enable automatic insertion of non-reference P-frames (default false)
 -strict_gop <boolean> E..V.... Set 1 to minimize GOP-to-GOP rate fluctuations (default false)
 -aq-strength <int> E..V.... When Spatial AQ is enabled, this field is used to specify AQ strength. AQ strength scale is from 1 (low) - 15 (aggressive) (from 1 to 15) (default 8)
 -cq <int> E..V.... Set target quality level (0 to 51, 0 means automatic) for constant quality mode in VBR rate control (from 0 to 51) (default 0)
 -aud <boolean> E..V.... Use access unit delimiters (default false)
 -bluray-compat <boolean> E..V.... Bluray compatibility workarounds (default false)
 -init_qpP <int> E..V.... Initial QP value for P frame (from -1 to 51) (default -1)
 -init_qpB <int> E..V.... Initial QP value for B frame (from -1 to 51) (default -1)
 -init_qpI <int> E..V.... Initial QP value for I frame (from -1 to 51) (default -1)
 -qp <int> E..V.... Constant quantization parameter rate control method (from -1 to 51) (default -1)
 
 
 As you can see there is the "-cq" command to set target quality.
- 
	
- 
	I used 
 andCode:-c:v h264_nvenc -preset slow -cq 16 -rc-lookahead 16 -qmin 10 -qmax 23 -refs 4 
 I got very different bitrates on a very small test video.Code:-c:v h264_nvenc -preset slow -cq 20 -rc-lookahead 16 -qmin 10 -qmax 23 -refs 4 
 
 -cq 16 => 848.2kbits/s and q=9.0
 -cq 20 => 592.8kbits/s and q=13.0
 
 I might be wrong but I think -cq option only works with FFmpeg 3.3 or newer.Last edited by gregalan; 14th Jul 2017 at 10:55. 
- 
	Where source is this 422 video file: 
 
 https://www.dropbox.com/s/829iziwuetpdqm4/source422.MXF?dl=0
 
 I get this x264.MP4 (attached) using:
 quality is good: encoder is x264, file size 22 MB.Code:ffmpeg64bitjuly2017.exe -threads 12 -y -i source422.mxf -pix_fmt yuv420p -vf scale=interl=1 -c:v libx264 -profile:v high -level:v 4.1 -g 33 -bf 2 -crf 22 -flags +ildct+ilme -top 1 -aspect 16:9 -an x264.MP4 
 
 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 
 Try to encode using QSV (attached):
 
 quality is good: encoder is Quick Sync, file size almost 22 MBCode:ffmpeg64bitjuly2017.exe -threads 12 -y -i source422.mxf -pix_fmt nv12 -vf scale=interl=1,format=pix_fmts=nv12 -c:v h264_qsv -global_quality 27.5 -level:v 4.1 -flags +ildct+ilme -top 1 -aspect 16:9 -an QSV.MP4 
 
 But: using the same untouched commandline sometimes work, sometimes freeze during encoding, sometimes return error (error during encoding: device failed (-17)) also changing the Intel HD4600 graphic drivers on my pc
 
 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 
 Try to encode using NVENC (attached):
 
 file size is alwais 22MB. Quality is not bed but in the frame by frame comparison, seems that there is too many loss of details.Code:ffmpeg64bitjuly2017.exe -threads 12 -y -i source422.mxf -pix_fmt nv12 -vf scale=interl=1,format=pix_fmts=nv12 -c:v h264_nvenc -preset slow -cq 20 -qmin 10 -qmax 26 -refs 4 -profile:v high -level:v 4.1 -flags +ildct+ilme -top 1 -aspect 16:9 -an NVENC.MP4 
 
 If I try to add -rc-lookahead 16 in the commandline I get [h264_nvenc @ 00000000023ac520] No NVENC capable devices found
 
 However the problem is the loss of details
 
 So is there a way to improove the quality of this NVENC encoding? thanks
- 
	I try -cq at different value but does not change the final size: seems that the bitrate change changing the -qmax value   
- 
	And there is a strange things in the NVENC output: 
 
 General
 Complete name : V:\C0122\NVENC.MP4
 Format : MPEG-4
 Format profile : Base Media
 Codec ID : isom
 File size : 22.1 MiB
 Duration : 14s 80ms
 Overall bit rate mode : Variable
 Overall bit rate : 13.2 Mbps
 Writing application : Lavf57.75.100
 
 Video
 ID : 1
 Format : AVC
 Format/Info : Advanced Video Codec
 Format profile : Main@L4.1
 Format settings, CABAC : Yes
 Format settings, ReFrames : 4 frames
 Codec ID : avc1
 Codec ID/Info : Advanced Video Coding
 Duration : 14s 80ms
 Bit rate mode : Variable
 Bit rate : 13.2 Mbps
 Width : 1 920 pixels
 Height : 1 080 pixels
 Display aspect ratio : 16:9
 Frame rate mode : Constant
 Frame rate : 25.000 fps
 Original frame rate : 50.000 fps
 Color space : YUV
 Chroma subsampling : 4:2:0
 Bit depth : 8 bits
 Scan type : Interlaced
 Bits/(Pixel*Frame) : 0.254
 Stream size : 22.1 MiB (100%)
 
 
 Is there a way to don't see the Original Framerate = 50 ?
- 
	
- 
	Your GT 750M is first gen nvenc so it may not support some options, also quality wasn't very good with Kepler GPUs.Originally Posted by
 
 file size is alwais 22MB. Quality is not bed but in the frame by frame comparison, seems that there is too many loss of details.
 
 If I try to add [B
Similar Threads
- 
  H264 video cutter with smart re-encoding (alternative to VideoRedo H264)By cheerful in forum Newbie / General discussionsReplies: 1Last Post: 22nd Jul 2014, 09:42
- 
  Hardware acceleration demos in FFMPEG!!!!!!!By Stears555 in forum Video ConversionReplies: 1Last Post: 21st Jun 2014, 14:17
- 
  Encoding For Better Quality? Codec: H264 - MPEG-4 AVC (part 10) (H264)By derek123 in forum Video ConversionReplies: 7Last Post: 20th Jan 2014, 05:01
- 
  (FFMPEG) Muxing h264 and aacBy Simon_ in forum Video ConversionReplies: 5Last Post: 7th Sep 2013, 10:24
- 
  how can i mux to mp4 from h264/aac using ffmpegBy DKhanh in forum Video ConversionReplies: 3Last Post: 24th Aug 2013, 12:50


 
		
		 View Profile
				View Profile
			 View Forum Posts
				View Forum Posts
			 Private Message
				Private Message
			 
 
			
			
 Quote
 Quote

 
			 I dont' know but not sure is a problem of the power profile however I keep alwais the maximum power in the pc using
 I dont' know but not sure is a problem of the power profile however I keep alwais the maximum power in the pc using oh I think you are right cat
 oh I think you are right cat
						