mdhiggins / sickbeard_mp4_automator

Automatically convert video files to a standardized format with metadata tagging to create a beautiful and uniform media library
MIT License
1.52k stars 201 forks source link

Add support for av1_vaapi (and/or av1_qsv) #1689

Closed nobodyshome closed 3 months ago

nobodyshome commented 10 months ago

Is your feature request related to a problem? Please describe. Would love support for Intel Arc GPU (av1_vaapi and/or av1_qsv) in mp4automator and inside "sma-mod" if possible (apologies if that should be a feature request on that repo instead)

Describe the solution you'd like Implement AV1 decoding (and encoding maybe) with via vaapi (and/or qsv)

Describe alternatives you've considered Writing a temporary script for manually converting files but would love to integrate it into my existing mp4automator setup instead

Additional context More than happy to test/give feedback in anyway possible

tankerkiller125 commented 3 months ago

Got this working by adding the following:

class AV1QSVCodec(AV1Codec):
    """
    QSV AV1 Codec
    """
    codec_name = 'av1qsv'
    ffmpeg_codec_name = 'av1_qsv'

Adding it to the list of classes at the bottom of the file.

And then using av1qsv in the autoprocess.ini config file.

I've tested this on probably 100+ files at this point with zero issues.

mdhiggins commented 3 months ago

7d8fa2396dd97ac367e4e04d5c7603c15a28fe3d

Sorry this took so long been very busy but added prelim support

Many of the QSV encoders have custom options and parameters that need to be accounted for beyond their base encoder counterparts. I couldn't much documentation on AV1 QSV so it might not need much. Currently this inherits from the base AV1 encoder so the same options should all apply. If you find anything special (quality parameters or resizing/scalers being the most common things) that needs to be added on top of the general options let me know. Just open up a new issue