ffmpeg video encoder doesn't work with GPU

General programming chat and advice for beginners

21 posts
by x09 » 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?
User avatar
Posts: 9
Joined: Tue Sep 11, 2012 10:44 am
Location: Russia, Tyumen
by jamesh » 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.
Raspberry Pi Engineer
Raspberry Pi Engineer
Posts: 10590
Joined: Sat Jul 30, 2011 7:41 pm
by x09 » Sun Sep 16, 2012 1:44 pm
Ok.. What x264 encoder will be use hardware acceleration?
User avatar
Posts: 9
Joined: Tue Sep 11, 2012 10:44 am
Location: Russia, Tyumen
by mahjongg » 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
Forum Moderator
Forum Moderator
Posts: 4506
Joined: Sun Mar 11, 2012 12:19 am
by x09 » 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
Posts: 9
Joined: Tue Sep 11, 2012 10:44 am
Location: Russia, Tyumen
by mahjongg » 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/viewtopic.php?f=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:
User avatar
Forum Moderator
Forum Moderator
Posts: 4506
Joined: Sun Mar 11, 2012 12:19 am
by dom » 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.
Raspberry Pi Engineer
Raspberry Pi Engineer
Posts: 3864
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by x09 » 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?
User avatar
Posts: 9
Joined: Tue Sep 11, 2012 10:44 am
Location: Russia, Tyumen
by dom » 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.
Raspberry Pi Engineer
Raspberry Pi Engineer
Posts: 3864
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by x09 » Tue Sep 18, 2012 3:08 am
links ok, but official API documentation\specification anywhere exists?
User avatar
Posts: 9
Joined: Tue Sep 11, 2012 10:44 am
Location: Russia, Tyumen
by ghans » 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
Posts: 3931
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by 1080p_at_35b » 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!
Posts: 42
Joined: Fri Jun 22, 2012 6:07 pm
by ghans » 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
Posts: 3931
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by rurwin » 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?
User avatar
Forum Moderator
Forum Moderator
Posts: 2890
Joined: Mon Jan 09, 2012 3:16 pm
by dom » 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?
viewtopic.php?f=38&t=7547&p=92801
Raspberry Pi Engineer
Raspberry Pi Engineer
Posts: 3864
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by MindChild » Sat Dec 29, 2012 10:32 pm
Why not pay someone to write it?
Posts: 7
Joined: Sat Dec 29, 2012 12:41 pm
by ghans » 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
Posts: 3931
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by MindChild » 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
Posts: 7
Joined: Sat Dec 29, 2012 12:41 pm
by ghans » 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
Posts: 3931
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by memphis » 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.
Posts: 2
Joined: Wed Jan 09, 2013 9:18 pm
by Dee63 » 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
Posts: 6
Joined: Tue Dec 04, 2012 7:28 am