tibi38
Posts: 42
Joined: Sat Nov 10, 2012 8:46 am
Location: Europe
Contact: Website

ffplay / ffmpeg

Mon Sep 09, 2013 2:50 am

Hello,
I rebuild X264 and ffmpeg in the way as it was described on the ffmpeg-site-pages.
when I start ffplay to show a mpeg4-video (without sound) it is to slow. It only Plays 0.5 Frames per second in full-hd.
How should I set the Parameters by compiling or which misstake had I done?
Br
Tibi
Admin of http://bed-and-breakfast-ungarn.de

User avatar
rpdom
Posts: 16965
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: ffplay / ffmpeg

Mon Sep 09, 2013 6:30 am

ffmpeg will always be slow to play videos on the Pi because it will be doing all the decoding in software and the CPU isn't fast enough. Use omxplayer to play mpeg4 video, it uses the GPU hardware decoder and barely touches the CPU at all.

tibi38
Posts: 42
Joined: Sat Nov 10, 2012 8:46 am
Location: Europe
Contact: Website

Re: ffplay / ffmpeg

Mon Sep 09, 2013 7:18 am

I need a library, not a program.
On which lib base the omxplayer? As I could read, it is the ffmpeg. So there seems to be the same way.
Admin of http://bed-and-breakfast-ungarn.de

User avatar
topguy
Posts: 6420
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: ffplay / ffmpeg

Mon Sep 09, 2013 12:00 pm

Sourcecode is here:
https://github.com/popcornmix/omxplayer
make your own lib.

OtherCrashOverride
Posts: 582
Joined: Sat Feb 02, 2013 3:25 am

Re: ffplay / ffmpeg

Mon Sep 09, 2013 12:01 pm

tibi38 wrote:On which lib base the omxplayer?
omxplayer uses two (2) libraries to accomplish the work: 1) libav [ffmpeg] and 2) openmaxil
The former provides demux and sound decoding. The latter provides video decoding.

Ideally, openmaxil would be the single library to use for media processing. The implementation on the Raspberry Pi lacks the ability to demux a stream and decode audio compression. This is why both libraries are required to make a functioning media player for it. FFmpeg by itself does not know how to use the hardware video decoder (GPU) so it uses the much slower CPU on the PI.

[Edit]
omxplayer source code is here: https://github.com/huceke/omxplayer

[Edit 2]
as pointed out above, its also here https://github.com/popcornmix/omxplayer
Not sure what the difference is.

tibi38
Posts: 42
Joined: Sat Nov 10, 2012 8:46 am
Location: Europe
Contact: Website

Re: ffplay / ffmpeg

Mon Sep 09, 2013 12:34 pm

Thanks a lot for this clear Information about omxplayer.
This realy help to understand the behavior.
I'll try it.
Best regards
Tibi
Admin of http://bed-and-breakfast-ungarn.de

Return to “Graphics programming”