Hardware Decoding (Assist)
Hardware Decoding (Assist)
Hi,
Really happy with comskip overall - it does clip well, quite reliable. I would just like to speed it up a bit, it's running about the same speed as transcoding for me (from MPEG2 TS to HEVC). I do have a relative quick GPU, trying to make use of that.
I did try setting hardware_decode=1 in the ini file, but it really didn't speed things up ... if anything, this is slightly slower. Or, do I also need to add --cuvid or --hwassist to the command line?
Thanks!
Really happy with comskip overall - it does clip well, quite reliable. I would just like to speed it up a bit, it's running about the same speed as transcoding for me (from MPEG2 TS to HEVC). I do have a relative quick GPU, trying to make use of that.
I did try setting hardware_decode=1 in the ini file, but it really didn't speed things up ... if anything, this is slightly slower. Or, do I also need to add --cuvid or --hwassist to the command line?
Thanks!
Re: Hardware Decoding (Assist)
For some strange not understood reason I was not able to give comskip the right HW acceleration performance.
It is something I need to dive into when I have substantial more time.
It is something I need to dive into when I have substantial more time.
Re: Hardware Decoding (Assist)
Completely understand. I'd be more than willing to help out, if I can. I do have some programming experience, but don't claim to be an expert.
Is there a particular place to hunt in the code?
Thanks!
Is there a particular place to hunt in the code?
Thanks!
Re: Hardware Decoding (Assist)
If you are familiar with how ffmpeg implements HW acceleration you are welcome to take the comskip source from github and find out why it is not delivering the expected improvement on Windows
On Linux it seems to work as exptected
On Linux it seems to work as exptected
Re: Hardware Decoding (Assist)
OK, will dig into it. FYI, I'm running on Linux - that's where I'm seeing the issues.
I did run comskip and ffmpeg on a file yesterday (~ 4 hours of video, golf) - comskip took ~ 1.5 hours to complete, ffmpeg (transcoding to HEVC) ~ 30 min.
Thanks!
I did run comskip and ffmpeg on a file yesterday (~ 4 hours of video, golf) - comskip took ~ 1.5 hours to complete, ffmpeg (transcoding to HEVC) ~ 30 min.
Thanks!
Re: Hardware Decoding (Assist)
That sounds promising!
Re: Hardware Decoding (Assist)
Agreed! I have to think detection could be faster than transcoding. Will take a look.
Re: Hardware Decoding (Assist)
I thought detection and transcoding take about the same time. What did you find, Arrmo?
Last edited by TobiasB on Thu Dec 14, 2023 9:47 pm, edited 1 time in total.
Re: Hardware Decoding (Assist)
Decoding generally takes less time than encoding to detection can be faster than transcoding
Re: Hardware Decoding (Assist)
Yes, agreed - same finding here. With HW accel, MPEG2TS ... is see decoding (comskip) ~ 2x faster than transcoding.erik wrote:Decoding generally takes less time than encoding to detection can be faster than transcoding
Re: Hardware Decoding (Assist)
I'm on Linux, and thinking of buying a video card or CPU with integrated video capability for the purpose of accelerating Comskip.
I cloned the Git repo and built without issues. Running from the CLI with --help params I see that there is HW support, but it doesn't look like the VAAPI is supported:
So that would suggest to me that getting a new CPU with an Intel GPU onboard wouldn't be of any assistance. Do I understand that right?
Erik, is implementing VAAPI support anywhere on your radar? My guess would be that that's not trivial, but my understanding is also that the VAAPI has good documentation and support for Linux.
Thanks,
I cloned the Git repo and built without issues. Running from the CLI with --help params I see that there is HW support, but it doesn't look like the VAAPI is supported:
Code: Select all
% comskip --help
Usage:
comskip [-h|--help] [-w|--debugwindow] [-n|--playnice] [--zpcut] [--zpchapter] [--scf] [--videoredo] ...
...
--hwassist Activate Hardware Assisted video decoding
--cuvid Use NVIDIA Video Decoder (CUVID), if available
--vdpau Use NVIDIA Video Decode and Presentation API (VDPAU), if available
--dxva2 Use DXVA2 Video Decode and Presentation API (DXVA2), if available
Erik, is implementing VAAPI support anywhere on your radar? My guess would be that that's not trivial, but my understanding is also that the VAAPI has good documentation and support for Linux.
Thanks,
Re: Hardware Decoding (Assist)
It looks like ffmpeg supports VAAPI out of the box pretty well: https://trac.ffmpeg.org/wiki/HWAccelIntro . So could it be enabled in Comskip just by building with the right ffmpeg?
Re: Hardware Decoding (Assist)
Oh nevermind . Turns out it's pretty easy to find an old nVidia card with the full VDPAU feature set. There are a bunch for $25 on eBay.
Re: Hardware Decoding (Assist)
Yep, I'm looking at GeForce 520's with a PCI-e x16 interface: https://www.ebay.com/sch/i.html?_from=R40&_nkw=GeForce+GT+520&_sacat=0&LH_TitleDesc=0&_fsrp=1&_sop=15
I'm too new on these forums; can't use url tags yet. Also, I need to set my default setting to follow threads I post to ... #derp
Here's the list of nVidia cards that are supported under Linux and what feature set of the VDPAU API they implement: https://download.nvidia.com/XFree86/Linux-x86_64/304.137/README/supportedchips.html
To understand what's available/not available in the feature set, head to https://download.nvidia.com/XFree86/Linux-x86_64/304.137/README/vdpausupport.html#vdpau-implementation-limits-decoder
When the time comes I'm leaning towards the nouveau driver over nvidia's, based on https://wiki.archlinux.org/index.php/Hardware_video_acceleration which says says "Nouveau open-source driver supports both VA-API and VDPAU" and "NVIDIA proprietary driver supports via nvidia-utils". There's also info there to help verifying that the driver stack is loaded.
I'm too new on these forums; can't use url tags yet. Also, I need to set my default setting to follow threads I post to ... #derp
Here's the list of nVidia cards that are supported under Linux and what feature set of the VDPAU API they implement: https://download.nvidia.com/XFree86/Linux-x86_64/304.137/README/supportedchips.html
To understand what's available/not available in the feature set, head to https://download.nvidia.com/XFree86/Linux-x86_64/304.137/README/vdpausupport.html#vdpau-implementation-limits-decoder
When the time comes I'm leaning towards the nouveau driver over nvidia's, based on https://wiki.archlinux.org/index.php/Hardware_video_acceleration which says says "Nouveau open-source driver supports both VA-API and VDPAU" and "NVIDIA proprietary driver supports via nvidia-utils". There's also info there to help verifying that the driver stack is loaded.