how do I know if hardware acceleration is at work?

Started by zhangweiwu, August 23, 2014, 01:38:26 PM

Previous topic - Next topic

zhangweiwu

I enabled libav on my avidemux3_qt 2.6.8 (openSUSE), the message on the config page says I should enable the output driver corresponding to it, but there isn't one, so I chose XVideo.

After the setting I still cannot edit 1080p h264 video on my Core 2 Duo: video too slow, judging by the fact that audio finishes 25% ahead of video, I would say the CPU is 25% too slow.

I read the log file a few times, trying to fathom whether or not hardware acceleration is already at work. If not, I should try to fix it; if it  is still not working, I should look for ways to continue editing despite video/audio out of sync.

libav-intel driver (OpenSUSE) is said to be supporting hardware acceleration for cards GMA4500 and beyond. Mine is "Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller". Although I do not know if this is better than GMA4500, judging by the date of purchase I expect it to support some hardware acceleration.

Thanks.

Jan Gruuthuse

hardware  acceleration is only on decoding: not encoding .. You should see this improvement when using the slider: select with mouse and move forward/backward in the movie: thos should work fluently even with 1080p video. Your audio delay could be caused if you are using multichannel instead of mono/stereo ac3 on digital output. Try analogue audio output on your computer.
Do check in preferences on Audio TAB: Local playback downmixing: Stereo or any other setting here and see what works best for you.
Avidemux is not intended for playback as such: try VLC.
If issues still exists with avidemux on Suze. Consider creating an extra primary partition. And install ubuntu 14.04 LTS (64-bit) for using avidemux. It should provide you with Xvideo (best) or OpenGL (best) for video display. See if this helps.
You're stating dual core cpu, Intel Core I5 and I7 should not pose any problem. VDPAU (best) is geared to NVIDIA cards.

zhangweiwu

#2
Thanks for quick responses.

Quote from: Jan Gruuthuse on August 23, 2014, 02:32:11 PM
hardware  acceleration is only on decoding: not encoding ..

I know. I meant decoding. I said "audio finishes 25% ahead of video" with a link. In that linked article the detail problem is: "audio finishes 25% ahead of video when I play the source media before attempting to edit at all".

Quote
You should see this improvement when using the slider: select with mouse and move forward/backward in the movie: thos should work fluently even with 1080p video. Your audio delay could be caused if you are using multichannel instead of mono/stereo ac3 on digital output.

For the first part: I do not know if it is "fluently", it's a bit subjective, I wouldn't call it fluently I guess.
For the second part: no, I do not have audio delay at all. "Audio finishes 25% before video finishes" means there is a video delay.

Quote
Do check in preferences on Audio TAB: Local playback downmixing: Stereo or any other setting here and see what works best for you.
Avidemux is not intended for playback as such: try VLC.

I assume this is the answer to "audio delay problem", so I can skip it?

Quote
If issues still exists with avidemux on Suze. Consider creating an extra primary partition. And install ubuntu 14.04 LTS (64-bit) for using avidemux. It should provide you with Xvideo (best) or OpenGL (best) for video display. See if this helps.

I tried Ubuntu on another computer of mine using avidemux 2.5.4, unfortunately it perform even worse. Even equiped with AMD Athlon 3000+ (4-cores), using fglrx driver on dual-Radeon HD5830, with 8GB of RAM, the 1080p videos still could not playback at full speed. However I guess that one is another problem for another thread to discuss (because testing environment changed).

Quote
You're stating dual core cpu, Intel Core I5 and I7 should not pose any problem. VDPAU (best) is geared to NVIDIA cards.

I must be having some serious writing skill problem, because your kind answer seems to be addressing many problems that I do not have. I explained rather early on that in decoding I chose libva (not VDPAU) and in playback I chose XVideo (not VDPAU) hence VDPAU has nothing to do with me, it can't be the culprit. The same happened in every other part: I did not have audio delay problem, I did not have problem saving and encoding files. Every possible problem mentioned in your answer happens on the things that I did not do. Perhaps those problems reoccures too frequently here.

Since there are so many misunderstandings, I think I can assume nobody noticed that I also attached console output as a log in the first post, which should have said whether or not hardware acceleration is at work, but in enigma language that I cannot fathom.

Jan Gruuthuse

#3
"audio finishes 25% ahead of video when I play the source media before attempting to edit at all".
Do check in Avidemux preferences on Audio TAB: Local playback downmixing: Stereo or any other setting here and see what works best for you.

Check if this 720p4audioTracks3sat video is playing without audio delay correct audio. 69 MB: https://www.dropbox.com/s/a8scxh0m134zxh0/720p4audioTracks3sat.ts?dl=1
Video is multi track if audio delay, switch to track 1, track 0 is AC3

most likely the language is my issue: I'm not Nativ english speaking.

zhangweiwu



Quote from: Jan Gruuthuse on August 23, 2014, 02:52:23 PM
To give you impression of video decoding en slider action: download this video Avidemux263EditCutTrim.mp4 34.8 MB https://www.dropbox.com/s/3idao0bju5j5mbm/Avidemux263EditCutTrim.mp4?dl=1

Thank you for sharing the video. I did watch it through. On my avidemux, configured to use libva decoder, the slide react to mouse movement by only stopping on the keyframes. I guess it is by design: dragging the slide with mouse will only get me the five fixed key-frames one after another. The slide will 'snap' on the key frames, refusing to stop between keyframes no matter how slow I drag my mouse and how few CPU is utilitized.

Jan Gruuthuse

#5
In Avidemux Prefences enable/disable in following tabs:
[Display]
Video display: VDPAU (best) select here XVideo (best) or OpenGL (best)
[HW Accel]
[ ] Decode video using VDPAU (NVIDIA)
[ ] Decode video using XVBA (AMD)
[v] Decode video using  LIBVA (INTEL)

or switch from INTEL to AMD.

for one or another reason avidemux uses VDPAU according to your log?

If still an audio issue playing video, provide a 5 seconds recording/video posing the audio problem. Upload to an publicly available download.
Will check if the issue is here to. And report results back.

zhangweiwu

Thank you for reading the log file. I felt sure that I did not choose VDPAU in neither of the two places, but it seems I was wrong, otherwise how to explain that they are in the long:) This time I did strictly according to your instruction, chose XVideo and LIBVA. The behaviour of avidemux3_qt4 remain the same. New log file is attached.

In the log file this segment repteated 276 times:

[MP4Audio] : index max :384/384
[getPacket]  AudioGetPacket failed, audioSegment=0
  [getPacket]  ..and this is the last segment
DeviceStopped -> DeviceStopped

mean

you should use the same display as video accel so that all the processing is done by the video card
Look at the Video decoder text on top left
If it says lavcodec -> software decoder
If it says vdpau/libva/.. -> hw decoder

zhangweiwu

Okay, so that is where to look. My configuration is to use libva, but the UI says lavcodec, hence, hw decoder does not work, but I was not informed so upon saving config file. Now there is a way to tell whether or not hd decoder is at work, to make hw decoder actually work will be another seperate thread. Thank you for your help.

mean

If it is says lavcodec, hw decoder is not used
Make sure you have libva enabled at build time & selected in preferences