Re: [FFmpeg-user] Trouble selecting a pixel format/colorspace while trying to encode a video using ffmpeg and HW accelerated vaapi or qsv interfaces

2022-12-11 Thread caetano
  The second link in my last message is wrong, the correct one with the
summary of the media features for Intel GPUs is:

https://github.com/intel/media-driver/blob/master/docs/media_features.md

On Sun, 11 Dec 2022 at 18:44,  wrote:

>   My question is not related to post-processing or color-space
> transformation. It is about how to hardware encode using a pixel format
> that provides high color accuracy for screen capture, differently from what
> NV12 is capable of offering.
>
>   Regarding hardware encoding support, accordingly to this:
>
> https://github.com/intel/media-driver/blob/master/README.md
>
>   Hardware support has been added since Ice Lake (2019, 10th generation) to
> HEVC and VP9 codecs for 4:4:4 chroma for both 8 and 10 bits modes and also
> for both encoding and decoding.
>
>   This other page gives more details:
>
> https://github.com/intel/media-driver/blob/master/README.md
>
>   Accordingly to the above link , the following 4:4:4 formats are supported
> for hardware decoding when using HEVC or VP9: AYUV (8 bits) and Y410 (10
> bits) and the following  4:4:4 formats are supported for hardware encoding
> when using HEVC or VP9: AYUV and RGB (8 bits) and Y410 (10 bits).
>
>   I've found out that gstreamer in my system (ubuntu version 1.20.1) is
> able to perform 4:4:4 10 bits encoding when using the Y410 format and the
> following command (ffprobe for the generated file reports pixel format
> as yuv444p10le):
>
> 
> gst-launch-1.0 ximagesrc display-name=:0.0 show-pointer=false
> use-damage=false num-buffers=2400 ! video/x-raw,framerate=20/1 !
> videoconvert ! video/x-raw,format=RGBx ! vaapipostproc !
> video/x-raw,format=Y410 ! vaapih265enc rate-control=cqp quality-level=1
> quality-factor=18 ! video/x-h265 ! h265parse ! matroskamux ! filesink
> location=desktop.mkv
> 
>
> and hardware decoding of the above generated file can be achieved with the
> following command:
>
> 
> gst-play-1.0 desktop.mkv
> 
>
> Unfortunately, gstreamer version I have has no support for the AYUV pixel
> format with hardware acceleration, therefore I could not test 8 bits
> hardware encoding and decoding, but at least for 10 bits it is working
> properly and colors looks just great.
>
> ===
>
> I believe it would be great to add support in ffmpeg for hardware encoding
> and decoding for at least the following 4:4:4 pixel formats: AYUV, RGB
> and Y410 as this is available in Intel hardware since 2019.
>
>
>
> On Sat, 10 Dec 2022 at 17:00, Carl Eugen Hoyos  wrote:
>
> > I wanted to write "no hardware encoders support full chroma" and
> > "no hardware encoders support RGB" - Wenbin's answer seems
> > to indicate that I was wrong but in any case the qsv code in FFmpeg
> > currently neither allows full-chroma encoding nor RGB encoding.
> >
> > I don't know if mxf (the library used for qsv encoding) support
> > full-chroma and RGB.
> >
> > No idea how your question could be related to post-processing
> > or colour-space transformation.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

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


Re: [FFmpeg-user] Trouble selecting a pixel format/colorspace while trying to encode a video using ffmpeg and HW accelerated vaapi or qsv interfaces

2022-12-11 Thread caetano
  My question is not related to post-processing or color-space
transformation. It is about how to hardware encode using a pixel format
that provides high color accuracy for screen capture, differently from what
NV12 is capable of offering.

  Regarding hardware encoding support, accordingly to this:

https://github.com/intel/media-driver/blob/master/README.md

  Hardware support has been added since Ice Lake (2019, 10th generation) to
HEVC and VP9 codecs for 4:4:4 chroma for both 8 and 10 bits modes and also
for both encoding and decoding.

  This other page gives more details:

https://github.com/intel/media-driver/blob/master/README.md

  Accordingly to the above link , the following 4:4:4 formats are supported
for hardware decoding when using HEVC or VP9: AYUV (8 bits) and Y410 (10
bits) and the following  4:4:4 formats are supported for hardware encoding
when using HEVC or VP9: AYUV and RGB (8 bits) and Y410 (10 bits).

  I've found out that gstreamer in my system (ubuntu version 1.20.1) is
able to perform 4:4:4 10 bits encoding when using the Y410 format and the
following command (ffprobe for the generated file reports pixel format
as yuv444p10le):


gst-launch-1.0 ximagesrc display-name=:0.0 show-pointer=false
use-damage=false num-buffers=2400 ! video/x-raw,framerate=20/1 !
videoconvert ! video/x-raw,format=RGBx ! vaapipostproc !
video/x-raw,format=Y410 ! vaapih265enc rate-control=cqp quality-level=1
quality-factor=18 ! video/x-h265 ! h265parse ! matroskamux ! filesink
location=desktop.mkv


and hardware decoding of the above generated file can be achieved with the
following command:


gst-play-1.0 desktop.mkv


Unfortunately, gstreamer version I have has no support for the AYUV pixel
format with hardware acceleration, therefore I could not test 8 bits
hardware encoding and decoding, but at least for 10 bits it is working
properly and colors looks just great.

===

I believe it would be great to add support in ffmpeg for hardware encoding
and decoding for at least the following 4:4:4 pixel formats: AYUV, RGB
and Y410 as this is available in Intel hardware since 2019.



On Sat, 10 Dec 2022 at 17:00, Carl Eugen Hoyos  wrote:

> I wanted to write "no hardware encoders support full chroma" and
> "no hardware encoders support RGB" - Wenbin's answer seems
> to indicate that I was wrong but in any case the qsv code in FFmpeg
> currently neither allows full-chroma encoding nor RGB encoding.
>
> I don't know if mxf (the library used for qsv encoding) support
> full-chroma and RGB.
>
> No idea how your question could be related to post-processing
> or colour-space transformation.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

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


Re: [FFmpeg-user] ffmpeg command required to convert MPEG TS to HLS with transcoding to aac

2022-12-11 Thread Dave Blanchard
On Sun, 11 Dec 2022 04:56:46 +0100
Robin van der Linden via ffmpeg-user  wrote:

> Second, the solution Dave suggested in his previous post, please correct 
> me if I'm wrong Dave, but I guess he is referring to: 
> https://github.com/kaltura/nginx-vod-module . This solution is fine if 
> you really just have plenty amount of users. If you have many users, 
> this solution will rip every CPU apart and is not suitable if you want 
> to build a Netflix like application as you will have to transcode every 
> playback of every user in real time.

I actually meant the nginx-ts module. With this module, you just send an 
MPEG2-TS stream to nginx from ffmpeg, and the -ts module handles creating all 
the HLS metadata etc. No reencoding occurs. I used this setup briefly before 
switching to SRT, so didn't test it thoroughly, but it seemed to work well, 
other than the usual latency of HLS.

Thanks for your detailed email as there is a lot of good info there.

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

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