Hardware Decoding (Assist)

Here you can ask your questions on how to use Comskip for the detection of commercials. Also questions on how to remove commercials are welcome
Post Reply
arrmo
Posts: 5
Joined: Sun Feb 24, 2019 1:36 am

Hardware Decoding (Assist)

Post by arrmo » Sun Feb 24, 2019 1:40 am

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!

erik
Site Admin
Posts: 3302
Joined: Sun Aug 21, 2005 3:49 pm

Re: Hardware Decoding (Assist)

Post by erik » Sun Feb 24, 2019 8:33 am

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.

arrmo
Posts: 5
Joined: Sun Feb 24, 2019 1:36 am

Re: Hardware Decoding (Assist)

Post by arrmo » Sun Feb 24, 2019 1:37 pm

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!

erik
Site Admin
Posts: 3302
Joined: Sun Aug 21, 2005 3:49 pm

Re: Hardware Decoding (Assist)

Post by erik » Sun Feb 24, 2019 3:29 pm

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

arrmo
Posts: 5
Joined: Sun Feb 24, 2019 1:36 am

Re: Hardware Decoding (Assist)

Post by arrmo » Sun Feb 24, 2019 5:51 pm

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!

erik
Site Admin
Posts: 3302
Joined: Sun Aug 21, 2005 3:49 pm

Re: Hardware Decoding (Assist)

Post by erik » Sun Feb 24, 2019 6:13 pm

That sounds promising!

arrmo
Posts: 5
Joined: Sun Feb 24, 2019 1:36 am

Re: Hardware Decoding (Assist)

Post by arrmo » Sun Feb 24, 2019 6:52 pm

Agreed! I have to think detection could be faster than transcoding. Will take a look.

TobiasB
Posts: 1
Joined: Mon Apr 08, 2019 10:07 am

Re: Hardware Decoding (Assist)

Post by TobiasB » Tue Apr 09, 2019 2:24 pm

I thought detection and transcoding take about the same time. What did you find, Arrmo?

erik
Site Admin
Posts: 3302
Joined: Sun Aug 21, 2005 3:49 pm

Re: Hardware Decoding (Assist)

Post by erik » Tue Apr 09, 2019 2:42 pm

Decoding generally takes less time than encoding to detection can be faster than transcoding

arrmo
Posts: 5
Joined: Sun Feb 24, 2019 1:36 am

Re: Hardware Decoding (Assist)

Post by arrmo » Tue Apr 09, 2019 3:15 pm

erik wrote:Decoding generally takes less time than encoding to detection can be faster than transcoding
Yes, agreed - same finding here. With HW accel, MPEG2TS ... is see decoding (comskip) ~ 2x faster than transcoding.

Post Reply