This forum has been archived. All content is frozen. Please use KDE Discuss instead.

State of GPU video decoding in Kdenlive/FFMPEG

Tags: None
(comma "," separated)
LeHomard
Registered Member
Posts
100
Karma
0
Hi everyone,

I'm looking into making the switch to Kdenlive for all my video editing (using Blender for compositing), and I'll probably also purchase a new HD camera (likely a Canon HF200). What still make me hesitate is the state of GPU video decoding in FFMPEG, and editing in Kdenlive.

So far I've gathered that :

- For nvidia cards, VDPAU is supported by ffmpeg so any recent build of ffmpeg should decode AVCHD with no problem, staight out of the box and editing should also work fine. Is this true ? Will it work with the standard ffmpeg package in Ubuntu 9.10 ?

- for Ati cards, a XVBA backend has been added to VA-API (the xvba-video library), and VA-API is supported by ffmpeg. So it should now be possible to decode video using Ati UVD2 engine. But how does one actually get this working ? What version of ffmpeg, what additionnal libraries ? Would it support AVCHD video decoding ?


I actually have an ATI card (and an ATI video chip on my motherboard too...) so I'm mostly interested in the Va-api/xvba support in ffmpeg and Kdenlive. If anyone has some information about this, I'd be very grateful !

Thanks.


tidris
Registered Member
Posts
90
Karma
0
OS
Speaking of GPU acceleration, I would like to know what's the status of GPU video Encoding too. That would be using something like CUDA or OpenCL to accelerate the application of transitions and special effects and also to accelerate the compression of the final video.

I understand the Badaboom Media Converter is getting some impressive speed improvements for video encoding using the GPU.
LeHomard
Registered Member
Posts
100
Karma
0
I would say video encoding is a different subject altogether. In order to use the GPU power there we would need some implementation of OpenCL (or CUDA, but OpenCL would be more likely) in FFMPEG.

I don't know of any developer actually working on that implementation and I suspect implementing OpenCL would imply a LOT more work than VDPAU for instance (VDPAU having a well defined API specifically designed for video decoding), maybe even a rewrite of the ffmpeg core code, so I wouldn't expect this to come before quite a while (maybe a year, maybe two, I don't know...).



ArtInvent
Registered Member
Posts
85
Karma
0
I have an HF100 that I edit with Kdenlive.

Playback - Editing - Encoding - all different things.

The AVCHD straight out of the camera (MTS files) can be played (generally) with acceleration with an nvidia card, an nvidia vdpau enabled driver (the proprietary ones) and driver vdpau extensions. AFAIK really only mplayer supports this right now, and you better make sure you have a VDPAU compiled myplayer. Totem and VLC for instance do not. VLC supposedly has patches you can apply before compile or something- definitely not an 'out of the box' thing. I really don't know how well any player works with the AMD acceleration - that's rather newer.

Editing. Well, you can sort of edit the straight MTS files in Kdenlive. But there's no seeking. I end up transcoding to a near lossless codec. Do a search for DNxHD on these forums for more info. It takes some time and a lot of disk space for the intermediate files. But it edits quite well.

gnopak
Registered Member
Posts
10
Karma
0
Could you share mencoder or ffmpeg parameters you use for transcoding MTS files?

My MTS files captured by Canon HF10 cause problems even after transcoding to XviD with mencoder. When I pause the clip and press rewind, the picture remains frozen (displays the last frame after pressing pause). Whem I move the triangle time pointer, the picture remains frozen. When I click the Play button again, the picture remains frozen but I can hear the correct sound.
geoffrey
Registered Member
Posts
100
Karma
0
@gnopak - maybe your file problem is something else? Have you made sure that pulseaudio is completely removed from your system?


gnopak
Registered Member
Posts
10
Karma
0
No. Do I need to give up pulseaudio completely even in future linux versions? Pulseaudio is supposed to be the future of sound on Linux. It seems unwise to remove it just for Kdenlive.
geoffrey
Registered Member
Posts
100
Karma
0
I removed pulseaudio and my system works fine without it. KDE doesn't need it. Note however that I'm running mostly all KDE apps rather than gnome. If you are running gnome stuff you will likely need to keep it.

I was having all sorts of weird issues with ffmpeg/melt/kdenlive that I thought were file format issues, but turned out that ffmpeg wasn't working well with pulseaudio.

See these links and do a search on the website for pulseaudio. Some say that installing libsdl1.2debian-pulseaudio works, but removing pulse worked better for me. I have not had any problems with kdenlive since doing this. If you do try removing it make sure you do a reboot.

http://kdenlive.org/forum/audio-distorsion-during-playing
http://kdenlive.org/forum/remember-remove-pulseaudio-if-using-kubuntu-karmic
http://kdenlive.org/user-manual/troubleshooting-and-common-problems/sound-bad-and-delayed




oldcpu_drupal
Registered Member
Posts
87
Karma
0
I have a Canon HF S10. I typically reduce all the .mts videos in one directory from 1920x1080 to 1280x720 with:

for i in *.mts; do ffmpeg -y -i "$i" -f avi -vcodec mpeg4 -b 8000000 -acodec ac3 -ab 128000 -s 1280x720 year_month_day_${i/%mts/avi}; done

... where I select/change the "year", "month", "day" in the above line before running it.

Kdenlive can handle that ffmpeg reduced format with no problem.

I also have virtual dub with the deshaker plugin running under wine, and I run a bash shell loop with it, deshaking (stabilizing) all the files in one directory using virtual dub.



ArtInvent
Registered Member
Posts
85
Karma
0
I've never had a problem with pulseaudio and kdenlive. I use gnome Ubuntu 9.10 x64.

I always shoot in 1080p30 progressive on the HF100. I transcode with Kdenlive's built in transcode feature, it will batch encode all the files you select. The stock 220 Mb/s preset which has the parameters

-s 1920x1080 -r ntsc -b 220000k -threads 2 -vcodec dnxhd -acodec copy %1.mov

or for 1280p I made this preset consulting the Avid DNxHD specs -

-s 1280x720 -r ntsc -b 110000k -threads 2 -vcodec dnxhd -acodec copy %1.mov


gnopak
Registered Member
Posts
10
Karma
0
geoffrey, I do not have pulseaudio installed.

I tried to remove libpulseaudio. In Kubuntu, it has dependencies to KDE and many if not all KDE applications. Removing libpulse0 would remove the whole KDE, digikam, amarok... and even kdenlive.

So I am not sure if I am supposed to remove lipulse0, but I just cannot do it. And I never had the pulseaudio package installed.

Note that another user reports this problem at http://www.kdenlive.org/forum/high-definition-file-freezes-clip-monitor-project-monitor
gnopak
Registered Member
Posts
10
Karma
0
I posted a short high definition file that causes problems in kdenlive at http://www.tvojeimage.cz/aukro/easystar/00011.avi

This file imports flawlessly into kdenlive. When you press play, it plays OK. When you stop playback and rewind and then play, it does not play video. It only plays audio.
arthursucks
Registered Member
Posts
35
Karma
0
This is a script I put together for all the dudes in the states that want pulldown on their 24p cameras that shoot in 60i. I've tested it with the Canon AVCHD clips and it works great, and it is smooth in Kdenlive too.

mencoder 00106.mts -noaspect -noskip -o 00106.avi -fps 60000/1001 -ofps 24000/1001 -oac pcm -srate 44100 -ovc lavc -vf softskip,detc,harddup,scale=1280:720 -lavcopts vcodec=mpeg4:vbitrate=8000:mbd=0:trell
geoffrey
Registered Member
Posts
100
Karma
0
@gnopak - thanks for trying the pulseaudio thing. I can try out your file on my system probably tomorrow evening or the next day when I get back from a work trip. I probably can't fix anything, but might be able to give "me too".

Have you tried playing the file from a terminal using melt or ffplay? If not you should try this also. There is guidance on the forum about how to do that if unsure.
Geoff


gnopak
Registered Member
Posts
10
Karma
0
geoffrey, thanks for the tip. ffplay can play the clip and seek in it. melt can play the clip and any seek action such as pressing g to seek the beginning of the clip causes the same problem as the Clip Monitor in kdenlive.



Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]