Graphics
Intel® graphics drivers and software, compatibility, troubleshooting, performance, and optimization
21574 Discussions

Using scale_qsv to change pixel format

asheimo
Beginner
16,744 Views

I am trying to transcode a video in ffmpeg and use a complete hardware pipeline and also convert the video for 8bit to 10bit. It seems that scale_qsv should be able to do this using the format option but I have yet to be able to successfully do this. I am looking for guidance as to how to move forward. 

when using -vf scale_qsv-format-p010le ffmpeg errors with the following message:

[Parsed_scale_qsv_0 @ 000001beba542980] Error synchronizing the operation: -21kbits/s speed=N/A
Error while filtering: Unknown error occurred
Failed to inject frame into filter network: Unknown error occurred
Error while processing the decoded data for stream #0:0

0 Kudos
28 Replies
Sebastian_M_Intel
Moderator
11,162 Views

Hello asheimo, 

 

Thank you for posting on the Intel® communities.   

 

In order to better assist you, please provide the following: 

 

  • Are you designing a type of software/hardware?  
  • Also, what is the Intel® product that you are working with? 

 

This information can help us to guide you to the correct support place.  

 

Regards, 

 

Sebastian M  

Intel Customer Support Technician  


0 Kudos
asheimo
Beginner
11,157 Views

I am currently using an i7-10700k but really this question applies to qsv in general, I want to be able to create a full hardware pipeline via ffmpeg and convert an 8bit input to a 10bit output. 

0 Kudos
Sebastian_M_Intel
Moderator
11,150 Views

Hello asheimo,  

 

Thanks for the update.  

 

Please let me review this information internally, and kindly wait for an update. 

 

Once we have more information to share we will post it on this thread.  

 

Regards,  

  

Sebastian M  

Intel Customer Support Technician   


0 Kudos
Sebastian_M_Intel
Moderator
11,139 Views

Hello asheimo,   

  

Thank you for patiently waiting. 

 

After double-checking internally, we understand that you are looking to transcode a video using QuickSync, mainly the function "scale_qsv", however; access to the hardware encoder is provided through the FFmpeg application. Since you have usability questions, they need to be addressed by the app developer or even perhaps their own community: https://lists.ffmpeg.org/mailman/listinfo/ffmpeg-user/ 

  

We can only confirm the hardware encoder is there as you can check here under Processor Graphics, Intel® Quick Sync Video: https://ark.intel.com/content/www/us/en/ark/products/199335/intel-core-i7-10700k-processor-16m-cache-up-to-5-10-ghz.html  

 

You will need to check with the FFmpeg app support for more help. 

 

Regards,   

   

Sebastian M   

Intel Customer Support Technician   


Links to third-party sites and references to third-party trademarks are provided for convenience and illustrative purposes only. Unless explicitly stated, Intel® is not responsible for the contents of such links, and no third-party endorsement of Intel or any of its products is implied. 


0 Kudos
asheimo
Beginner
11,134 Views

Let me ask the question differently. Is QuickSync capable of converting an 8bit input to a 10bit output or can that not be done completely in hardware?

0 Kudos
Sebastian_M_Intel
Moderator
11,124 Views

Hello asheimo,   

 

Thank you for your reply. 

 

Please let me confirm this internally as well. Once we have an update we will share it here also. 

 

Please kindly wait for a response.  

 

Regards,    

    

Sebastian M    

Intel Customer Support Technician    


0 Kudos
Sebastian_M_Intel
Moderator
11,102 Views

Hello asheimo, 

 

Thank you for patiently waiting. 

 

I would like to let you know that the answer to your previous question is yes, you can use Quick Sync to convert from 8bit to 10bit video for HEVC as long as the application is optimized for Quick Sync. We tested it recently with Handbrake version 1.3.3. 

 

Regards,     

     

Sebastian M     

Intel Customer Support Technician    


0 Kudos
Sebastian_M_Intel
Moderator
11,088 Views

Hello asheimo,  

 

Were you able to check the previous post and see our outcome? Please let me know if you need more assistance.   

 

Regards,  

  

Sebastian M  

Intel Customer Support Technician  


0 Kudos
asheimo
Beginner
11,082 Views

It is frustrating that after telling me to ask over at ffmpeg for help you tell me that handbrake works fine so you were willing to test handbrake but not ffmpeg. Regardless, can you point me towards any instruction about how to do the conversion. Is scale_qsv the proper way to do so? Should I be able to just specify the pixel format in the output and qsv does the rest? 

0 Kudos
asheimo
Beginner
11,079 Views

Further digging into your answer that handbrake supports this functionality is false, per the documentation; HandBrake Documentation — Intel QuickSync Video

Only video encoding is performed by the hardware encoder. Every stage prior to and after video encoding including decoding, filters, audio/video sync, audio encoding, muxing, etc., is performed by the CPU.

My request was asking about a complete hardware pipeline for decoding and encoding and doing the conversion from 8 to 10 bit in the process.

0 Kudos
Sebastian_M_Intel
Moderator
11,057 Views

Hello asheimo,   

  

Thanks for your reply. 

 

Please allow me to check this with the team in charge of this testing one more time and kindly wait for a response. 

  

Regards,   

   

Sebastian M  

Intel Customer Support Technician   


0 Kudos
Sebastian_M_Intel
Moderator
10,948 Views

Hello asheimo,    

   

Thank you for patiently waiting.  

  

Internally we are looking into this, however, we would like to confirm some information: 

 

  • Could you share the file and detailed command(s) you are using with us? 
  • Also, we would like to better understand the context of why you are pushing to convert 8 to 10 bits, since it will occupy your space and not give you any quality benefit 

 

Regards,    

    

Sebastian M   

Intel Customer Support Technician 


0 Kudos
asheimo
Beginner
10,933 Views

You are incorrect about the quality benefit, converting from 8bit to 10bit reduces if not resolves in most cases color banding associated with transcoding. This alone makes the conversion worth it.

any 8bit file can be used. command is as follows:

ffmpeg -loglevel error -stats -hwaccel qsv -qsv_device 1 -c:v vc1_qsv -i <path to mkv input> -map 0:0 -c:v h264_qsv -pix_fmt:v p010le -b:v 6000k -look_ahead:v 1 -color_primaries:v bt709 -color_trc:v bt709 -colorspace:v bt709 -metadata:s:v title= -disposition:v default -map 0:1 -c:a:0 copy -metadata:s:a:0 title= -disposition:a:0 default -sn -metadata:g title= -default_mode passthrough <path to mkv output>

which results in the following error message.

Impossible to convert between the formats supported by the filter 'Parsed_null_0' and the filter 'auto_scaler_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0

0 Kudos
Sebastian_M_Intel
Moderator
10,937 Views

Hello asheimo,  

 

Were you able to check the previous post and get the information requested? Please let me know if you need more assistance.   

 

Regards,  

  

Sebastian M  

Intel Customer Support Technician  


0 Kudos
Sebastian_M_Intel
Moderator
10,927 Views

Hello asheimo,     

 

Thanks for the information. 

 

Kindly wait while we review this inquiry.  

  

Regards,     

     

Sebastian M    

Intel Customer Support Technician


0 Kudos
Sebastian_M_Intel
Moderator
10,901 Views

Hello asheimo,   

 

Thank you for your patience. 

 

We would like you to try the command below: 

  

ffmpeg -v verbose -stats -hwaccel qsv -qsv_device /dev/dri/renderD128 -c:v h264_qsv -i ./AUD_MW_E.264 -map 0:0 -vf 'vpp_qsv=w=1920:h=1080,format=yuv420p10le' -c:v hevc_qsv -b:v 6000k -look_ahead:v 1 -color_primaries:v bt709 -color_trc:v bt709 -colorspace:v bt709 -metadata:s:v title= -disposition:v default test.mkv 

 

Sebastian M     

Intel Customer Support Technician 

 

0 Kudos
Sebastian_M_Intel
Moderator
10,864 Views

Hello asheimo,  

 

Were you able to test the previously recommended command? Please let me know if you need more assistance.   

 

Regards,  

  

Sebastian M  

Intel Customer Support Technician  


0 Kudos
asheimo
Beginner
10,856 Views

The linked clip is missing could you please send it again.

0 Kudos
asheimo
Beginner
10,852 Views

This is the output  received, it is failing

 

[h264_qsv @ 000001eb8cdb7040] Error initializing the MFX video decoder: invalid video parameters (-15)
Error while decoding stream #0:0: Invalid argument
[h264_qsv @ 000001eb8cdb7040] Decoder: output is video memory surface
[h264_qsv @ 000001eb8cdb7040] Error initializing the MFX video decoder: unsupported (-3)
Error while decoding stream #0:0: Function not implemented
0 Kudos
Sebastian_M_Intel
Moderator
10,647 Views

Hello asheimo,   

  

Please find the test clip attached. 

 

Can you please check it and let us know? 

  

Regards,   

   

Sebastian M  

Intel Customer Support Technician

 

0 Kudos
Reply