User avatar
x09
Posts: 9
Joined: Tue Sep 11, 2012 10:44 am
Location: Russia, Tyumen

ffmpeg video encoder doesn't work with GPU

Sun Sep 16, 2012 8:38 am

Hi,

I compiled last ffmpeg (+ x264 libs) and tried recode divx\mpg\other to mkv..
But.. average fps is 3-5fps.. Why GPU for encoding not used?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 17889
Joined: Sat Jul 30, 2011 7:41 pm

Re: ffmpeg + GPU encode = worked?

Sun Sep 16, 2012 9:26 am

Because nobody has writen the code to do it. There needs to be some sort of plugin interface (or similar) to redirect encoding to the GPU. Which doesn't currently exist.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

User avatar
x09
Posts: 9
Joined: Tue Sep 11, 2012 10:44 am
Location: Russia, Tyumen

Re: ffmpeg + GPU encode = worked?

Sun Sep 16, 2012 1:44 pm

Ok.. What x264 encoder will be use hardware acceleration?

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 9563
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: ffmpeg doesn't work with GPU

Sun Sep 16, 2012 1:55 pm

I assume you mean what encoder will use the GPU?

As said, one that will be written to do so!


Also, as moderator, I changed the subject header to something more sensible.

User avatar
x09
Posts: 9
Joined: Tue Sep 11, 2012 10:44 am
Location: Russia, Tyumen

Re: ffmpeg doesn't work with GPU

Sun Sep 16, 2012 2:02 pm

I mean any other encoder (if ffmpeg not support GPU, may be exists other app? )

Ok, i undestand you.
Sorry for my bad english =) Maybe you will create Russian forum in 'Communtity' section ?))

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 9563
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: ffmpeg video encoder doesn't work with GPU

Sun Sep 16, 2012 2:14 pm

No problem with your bad English, we, the forum moderators, are here to help with that.

My answer meant that AFAIK (as far as I know) no encoder interface at all seems to exist at the moment that takes advantage of the GPU. If one exited it would be trivial to choose which hardware encoder to use.

But also AFAIK it also remains to be seen if simultaneous encoding and decoding (both hardware accelerated) is possible with this GPU.

more info can be found here: http://www.raspberrypi.org/phpBB3/viewt ... 63&t=15523

The raspberry PI foundation (charity) is busy designing a camera module for the CSI connector on the board (the one behind the Ethernet connector). I'm assuming they will also write interface code to to video encoding for it, and will release it simultaneously with the camera module.

A Russian forum can only be created when we can find a Russian speaking forum moderator, one that is also fluent in English. :roll:

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5100
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: ffmpeg video encoder doesn't work with GPU

Sun Sep 16, 2012 2:20 pm

The h264 encoder is accessible through OpenMAX. This should be enough information to make use of it:
http://www.khronos.org/openmax/il/
https://github.com/raspberrypi/firmware ... components
along with the decoder code in /opt/vc/src/hello_pi/hello_video.

However we are waiting for someone to have a go.

User avatar
x09
Posts: 9
Joined: Tue Sep 11, 2012 10:44 am
Location: Russia, Tyumen

Re: ffmpeg video encoder doesn't work with GPU

Mon Sep 17, 2012 1:45 pm

Hello again, )

I contacted with ffmpeg developers, and them promise help us ))
If we give them GPU API\SPEC information - ffmpeg will be support GPU encoding .
Where i can find this info?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5100
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: ffmpeg video encoder doesn't work with GPU

Mon Sep 17, 2012 1:50 pm

x09 wrote:Hello again, )

I contacted with ffmpeg developers, and them promise help us ))
If we give them GPU API\SPEC information - ffmpeg will be support GPU encoding .
Where i can find this info?
The links in previous post.

User avatar
x09
Posts: 9
Joined: Tue Sep 11, 2012 10:44 am
Location: Russia, Tyumen

Re: ffmpeg video encoder doesn't work with GPU

Tue Sep 18, 2012 3:08 am

links ok, but official API documentation\specification anywhere exists?

ghans
Posts: 7362
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: ffmpeg video encoder doesn't work with GPU

Tue Sep 18, 2012 7:07 am

THAT IS THE API.
It is an industry standard. The Broadcom specifics are shown by the sample code.
You have to browse around a little !

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

1080p_at_35b
Posts: 48
Joined: Fri Jun 22, 2012 6:07 pm

Re: ffmpeg video encoder doesn't work with GPU

Fri Dec 28, 2012 4:56 pm

ghans wrote:THAT IS THE API.
It is an industry standard. The Broadcom specifics are shown by the sample code.
You have to browse around a little !

ghans
There is no need for this sort of tone IMHO. x09 is clearly making an effort to communicate in his non-native language. How is your Russian ghans? Have a bit of patience!

ghans
Posts: 7362
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: ffmpeg video encoder doesn't work with GPU

Sat Dec 29, 2012 10:35 am

To anybody still following this , there has been some
progess on the transcoding front :

https://github.com/arjenv/omxtx/

Keyword "omxtx" will get you the main thread.
Let's see if some ffmpeg hacker is interested ...


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4208
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: ffmpeg video encoder doesn't work with GPU

Sat Dec 29, 2012 10:41 am

On a similar line, I downloaded two versions of Big Buck Bunny yesterday, and neither of them work with hello-video. The H264 one seems to be in a quicktime wrapper, which I suppose is a bad idea. I have mencoder on my PC, but I have no idea of what mystical incantation to use to produce something playable on the RPi. Can anyone enlighten me?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5100
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: ffmpeg video encoder doesn't work with GPU

Sat Dec 29, 2012 1:10 pm

rurwin wrote:On a similar line, I downloaded two versions of Big Buck Bunny yesterday, and neither of them work with hello-video. The H264 one seems to be in a quicktime wrapper, which I suppose is a bad idea. I have mencoder on my PC, but I have no idea of what mystical incantation to use to produce something playable on the RPi. Can anyone enlighten me?
Have you tried mkvextract?
http://www.raspberrypi.org/phpBB3/viewt ... 47&p=92801

MindChild
Posts: 7
Joined: Sat Dec 29, 2012 12:41 pm

Re: ffmpeg video encoder doesn't work with GPU

Sat Dec 29, 2012 10:32 pm

Why not pay someone to write it?

ghans
Posts: 7362
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: ffmpeg video encoder doesn't work with GPU

Sat Dec 29, 2012 11:11 pm

Who should pay ?

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

MindChild
Posts: 7
Joined: Sat Dec 29, 2012 12:41 pm

Re: ffmpeg video encoder doesn't work with GPU

Sun Dec 30, 2012 12:59 am

The people who want it done. Open Source != free. I'll happily write the code if someone is willing to pay for my time

ghans
Posts: 7362
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: ffmpeg video encoder doesn't work with GPU

Sun Dec 30, 2012 11:44 am

Kickstarter !
Even VideoLAN is doing it !

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

memphis
Posts: 2
Joined: Wed Jan 09, 2013 9:18 pm

Re: ffmpeg video encoder doesn't work with GPU

Sat Jan 12, 2013 12:38 pm

MindChild wrote:The people who want it done. Open Source != free. I'll happily write the code if someone is willing to pay for my time
Hi MindChild, how much do you want for code it. Probably i would donate you too.

Dee63
Posts: 6
Joined: Tue Dec 04, 2012 7:28 am

Re: ffmpeg video encoder doesn't work with GPU

Mon Feb 18, 2013 6:41 am

memphis wrote:
MindChild wrote:The people who want it done. Open Source != free. I'll happily write the code if someone is willing to pay for my time
Hi MindChild, how much do you want for code it. Probably i would donate you too.
i'm intrested in it too

Return to “General programming discussion”

Who is online

Users browsing this forum: No registered users and 3 guests