GPU decoding of H.264?

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
Reddwarf
Posts: 10
Joined: Wed Dec 29, 2010 12:42 am

GPU decoding of H.264?

Post by Reddwarf »

What's the status of using the GPU for faster decoding of h.264 recordings? Or is there another trick I can use?

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

Re: GPU decoding of H.264?

Post by erik »

Busy implementing

Reddwarf
Posts: 10
Joined: Wed Dec 29, 2010 12:42 am

Re: GPU decoding of H.264?

Post by Reddwarf »

That's great news! Will it work both with AMD and Nvidia?

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

Re: GPU decoding of H.264?

Post by erik »

DXVA2 based

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

Re: GPU decoding of H.264?

Post by erik »

I released build 0.81.077 today with HW decoding for donators

Add the following line to your comskip.ini to enable HW decoding
hardware_decode=1

It should work on DXVA2 compatible HW and h.264 video, possible MPEG2

Don't bother about HW decoding if you have a very fast CPU and slow graphics (like intel HD3000 grahics)

Please test and report back:
- type of CPU
- Type of Graphics HW
- Speed with/ without HW decoding
- Any detection quality differences

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

Re: GPU decoding of H.264?

Post by erik »

Dont try 0.81.077, there is a bug that can cause a crash.

blade
Posts: 5
Joined: Tue Mar 25, 2014 10:50 pm

Re: GPU decoding of H.264?

Post by blade »

I hope you can get it fixed. My media server is over 8 years old so to say the processor is weak by today's standards is an understatement. Throwing in a new video card and offloading some of the workload of processing h.264 files to the GPU would really free up the CPU on my machine.

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

Re: GPU decoding of H.264?

Post by erik »

Bug fixed.
WARNING: Still very experimental
Feel free to test hardware decoding in donator build of 0.81.077 and report back with your findings, in particular:
- type of CPU
- Type of Graphics HW
- Speed with/ without HW decoding
- Any detection quality differences

Jagad
Posts: 131
Joined: Wed Dec 07, 2011 12:37 am

Re: GPU decoding of H.264?

Post by Jagad »

erik wrote:Bug fixed.
WARNING: Still very experimental
Feel free to test hardware decoding in donator build of 0.81.077 and report back with your findings, in particular:
- type of CPU
- Type of Graphics HW
- Speed with/ without HW decoding
- Any detection quality differences
Seems this is not for my hardware. I got very slow GPU decoding compared to CPU decoding.
- Intel Core i7-2600K 3.40 GHz
- AMD Radeon HD 7900 Series
- MPEG-2 with HW decoding= 368 fps
- MPEG-2 without HW decoding= 2140 fps
- H.264 with HW decoding= 160 fps
- H.264 without HW decoding= 700 fps
- Any detection quality differences - don't know yet

blade
Posts: 5
Joined: Tue Mar 25, 2014 10:50 pm

Re: GPU decoding of H.264?

Post by blade »

I know this is ancient hardware, but I guess the few of us with stuff this old are the ones most likely to benefit.

Using 0.81.077

Opteron 165 @ 1.8 ghz (dual core)
Radeon HD 4650 PCI-e card (RV730)
H.264 with HW decoding (using a thread count of 2) = 93.54 fps
H.264 without HW decoding (using a thread count of 2) = 71.80 fps

Out of curiosity I bumped the thread count up to 24 just to see what would happen:
H.264 with HW decoding (using a thread count of 24) = 117.13 fps

When I tried processing MPEG-2 with HW decoding comskip crashed and I got the following message in the log file:
Assertion frame->format == AV_PIX_FMT_DXVA2_VLD failed at C:\work\x\avcomskip\src\ffmpeg_dxva2.c:211
Last edited by blade on Tue Jun 02, 2015 3:34 am, edited 1 time in total.

blade
Posts: 5
Joined: Tue Mar 25, 2014 10:50 pm

Re: GPU decoding of H.264?

Post by blade »

Using 0.81.077

Opteron 175 overclocked to 2.75 ghz (dual core)
Radeon HD 3450 PCI-e card (RV620)

H.264 with HW decoding (using a thread count of 2) - during the early part of detection I was getting 6.19 fps so I didn't let comskip finish processing
H.264 without HW decoding (using a thread count of 2) = 133.66 fps

When I tried processing MPEG-2 with HW decoding comskip crashed and I got the following message in the log file:
Assertion frame->format == AV_PIX_FMT_DXVA2_VLD failed at C:\work\x\avcomskip\src\ffmpeg_dxva2.c:211

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

Re: GPU decoding of H.264?

Post by erik »

I removed build 0.81.078 because of bug

Post Reply