Re: [FFmpeg-user] nvenc h264 encoding

2016-10-14 Thread Sven C. Dack

On 13/10/16 14:01, tyt xtreme wrote:

And what can i do on Windows to check these capabilities?
Btw the GPU is a Gainward 6 Gb nVidia GTX 980 Ti so i think this should
support the above formats.

Any idea why this encoding doesn't work?

$ ffmpeg -i perspective.mp4 -c:v h264_nvenc -profile:v high444p
-pixel_format yuv444p -preset default perspective_out.mp4

...
[h264_nvenc @ 01d84640] No free surfaces
Video encoding failed
Conversion failed!

I've now tried it on a GTX 960 (Maxwell GM 206) and there you can encode with 
yuv444p. The chip was the last of the Maxwell-series iirc and doesn't support 
10-bit depth. So either they snuck it in at the very last or it's an issue with 
the driver or libraries. This is with Video SDK 7.0.1 and CUDA 8.0. You can try 
to update the Nvidia driver and libraries and see if this changes anything.


$ ffmpeg -i 
../U-HD-Test-Videos/Harmonic_Snow_Monkeys_4k_\(Ultra_HD\)_-_DASH.webm -c:v 
h264_nvenc -pix_fmt:v yuv444p -profile:v high444p -preset:v default out5.mp4

ffmpeg version N-81995-ge62165b Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 6.2.1 (GCC) 20161013
  configuration: --prefix=/home/sven/av --enable-gpl --enable-version3 
--enable-nonfree --arch=x86_64 --cpu=native --enable-debug --enable-shared 
--enable-static --enable-libvorbis --enable-libopus --enable-libx264 
--enable-libx265 --enable-opengl --enable-opencl --enable-vaapi --enable-vdpau 
--enable-cuda --enable-cuvid --enable-nvenc --enable-libnpp 
--extra-cflags='-I/home/sven/av/include -I/usr/local/cuda/include 
-I/usr/local/Video_Codec_SDK_7.0.1/Samples/common/inc' 
--extra-ldflags='-L/home/sven/av/lib -L/usr/local/cuda/lib64' --ar=gcc-ar 
--nm=gcc-nm --ranlib=true

  libavutil  55. 32.100 / 55. 32.100
  libavcodec 57. 61.103 / 57. 61.103
  libavformat57. 52.100 / 57. 52.100
  libavdevice57.  0.102 / 57.  0.102
  libavfilter 6. 64.100 /  6. 64.100
  libswscale  4.  1.100 /  4.  1.100
  libswresample   2.  2.100 /  2.  2.100
  libpostproc54.  0.100 / 54.  0.100
Input #0, matroska,webm, from 
'../U-HD-Test-Videos/Harmonic_Snow_Monkeys_4k_(Ultra_HD)_-_DASH.webm':

  Metadata:
encoder : google
  Duration: 00:01:00.04, start: 0.00, bitrate: 25305 kb/s
Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv, 
bt709/unknown/unknown), 3840x2160, SAR 1:1 DAR 16:9, 59.94 fps, 59.94 tbr, 1k 
tbn, 1k tbc (default)

File 'out5.mp4' already exists. Overwrite ? [y/N] y
Output #0, mp4, to 'out5.mp4':
  Metadata:
encoder : Lavf57.52.100
Stream #0:0(eng): Video: h264 (*h264_nvenc*) (*High 4:4:4 Predictive*) 
([33][0][0][0] / 0x0021), *yuv444p*, 3840x2160 [SAR 1:1 DAR 16:9], q=-1--1, 2000 
kb/s, 59.94 fps, 19001 tbn, 59.94 tbc (default)

Metadata:
  encoder : Lavc57.61.103 h264_nvenc
Side data:
  cpb: bitrate max/min/avg: 0/0/200 buffer size: 400 vbv_delay: -1
Stream mapping:
  Stream #0:0 -> #0:0 (vp9 (native) -> h264 (h264_nvenc))
Press [q] to stop, [?] for help


___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] nvenc h264 encoding

2016-10-13 Thread Sven C. Dack

On 13/10/16 16:05, Nicolas George wrote:

Le duodi 22 vendémiaire, an CCXXV, Sven C. Dack a écrit :

If I'm not mistaken then yuv444p is linked to 10-bit depth encoding

Not necessarily. ...


Sorry if I wasn't clear enough. I didn't say yuv444p was a 10-bit format. I said 
it is /linked/ to 10-bit depth encoding.


Of course can one use and convert basically any format into whatever the 
hardware needs as input. It's just not being done here.


___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] nvenc h264 encoding

2016-10-13 Thread Nicolas George
Le duodi 22 vendémiaire, an CCXXV, Sven C. Dack a écrit :
> If I'm not mistaken then yuv444p is linked to 10-bit depth encoding

Not necessarily. yuv444 is opposed to yuv420: with 420, pixels are grouped
as 2×2 squares, where all four pixels have their brightness ("y" =
"luminance") encoded, while the color ("u"/"v" = "chrominance") is the same
for all four; with 444, pixels have all three components coded individually.
That means that in 444, each pixels use three components, while in 420 they
only use 1.5 on average, half as much. This makes sense because the eye is
more sensitive to brightness changes than color changes.

10-bits depth is opposed to 8-bits depth, it measures the accuracy for each
component.

All four combinations are possible: yuv420p8, yuv420p10, yuv444p8,
yuv444p10. The 8 is usually not printed because it was for a long time the
only possible choice and is still the default. Of course, because of
compatibility problems, once you decide to ditch yuv420p8, you might as well
go all the way to yuv444p10, therefore the two intermediate ones are more
rarely seen. But yuv444p8 makes sense for screencasts, to avoid color
bleeding.

The p means that libavcodec stores the three components in three separate
memory areas rather than interleaved all together like rgb24.

Regards,

-- 
  Nicolas George


signature.asc
Description: Digital signature
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] nvenc h264 encoding

2016-10-13 Thread Sven C. Dack

On 13/10/16 14:01, tyt xtreme wrote:

And what can i do on Windows to check these capabilities?
Btw the GPU is a Gainward 6 Gb nVidia GTX 980 Ti so i think this should
support the above formats.
If I'm not mistaken then yuv444p is linked to 10-bit depth encoding, which is 
only possible on the newer Pascal cards (the 10x0 series). The Video SDK page 
only mentions HEVC/H.265, but I believe it also applies to AVC/H.264. See here: 
https://developer.nvidia.com/nvidia-video-codec-sdk


Try using "high" instead of "high444p" for the profile and "nv12" or "yuv420p" 
for the pixel format.


If you want best quality for compression then add "-rc vbr_2pass -rc-lookahead 
32" to the command line. The encoder cannot actually do two full passes, but it 
can look ahead up to 32 frames, which acts as a substitute for 2-pass encoding 
and can improve the picture quality a lot especially around I-frames.




On Thu, Oct 13, 2016 at 1:52 PM, Sven C. Dack  wrote:


On 13/10/16 11:34, tyt xtreme wrote:


Dear All,

Any idea why this encoding doesn't work?

$ ffmpeg -i perspective.mp4 -c:v h264_nvenc -profile:v high444p
-pixel_format yuv444p -preset default perspective_out.mp4

...
[h264_nvenc @ 01d84640] No free surfaces
Video encoding failed
Conversion failed!


Surfaces are a reference to the memory buffers used by the encoder. You
can find out about which surfaces your graphics card supports by opening
the Nvidia settings panel, -> "VDPAU Information", -> "Surface Limits".

If your card doesn't support the pixel format or the picture exceeds the
surface limit might this already explain why you get this error message.
Although I would expect to see a different error message...

You can also check with "nvidia-smi" which applications are currently
using your graphics card. Suspended processes, zombie processes or just
multiple processes can also exhaust the amount of available surfaces.

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".



___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] nvenc h264 encoding

2016-10-13 Thread tyt xtreme
And what can i do on Windows to check these capabilities?
Btw the GPU is a Gainward 6 Gb nVidia GTX 980 Ti so i think this should
support the above formats.

On Thu, Oct 13, 2016 at 1:52 PM, Sven C. Dack  wrote:

> On 13/10/16 11:34, tyt xtreme wrote:
>
>> Dear All,
>>
>> Any idea why this encoding doesn't work?
>>
>> $ ffmpeg -i perspective.mp4 -c:v h264_nvenc -profile:v high444p
>> -pixel_format yuv444p -preset default perspective_out.mp4
>>
>> ...
>> [h264_nvenc @ 01d84640] No free surfaces
>> Video encoding failed
>> Conversion failed!
>>
> Surfaces are a reference to the memory buffers used by the encoder. You
> can find out about which surfaces your graphics card supports by opening
> the Nvidia settings panel, -> "VDPAU Information", -> "Surface Limits".
>
> If your card doesn't support the pixel format or the picture exceeds the
> surface limit might this already explain why you get this error message.
> Although I would expect to see a different error message...
>
> You can also check with "nvidia-smi" which applications are currently
> using your graphics card. Suspended processes, zombie processes or just
> multiple processes can also exhaust the amount of available surfaces.
>
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] nvenc h264 encoding

2016-10-13 Thread Sven C. Dack

On 13/10/16 11:34, tyt xtreme wrote:

Dear All,

Any idea why this encoding doesn't work?

$ ffmpeg -i perspective.mp4 -c:v h264_nvenc -profile:v high444p
-pixel_format yuv444p -preset default perspective_out.mp4

...
[h264_nvenc @ 01d84640] No free surfaces
Video encoding failed
Conversion failed!
Surfaces are a reference to the memory buffers used by the encoder. You can find 
out about which surfaces your graphics card supports by opening the Nvidia 
settings panel, -> "VDPAU Information", -> "Surface Limits".


If your card doesn't support the pixel format or the picture exceeds the surface 
limit might this already explain why you get this error message. Although I 
would expect to see a different error message...


You can also check with "nvidia-smi" which applications are currently using your 
graphics card. Suspended processes, zombie processes or just multiple processes 
can also exhaust the amount of available surfaces.


___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".