janob
Posts: 5
Joined: Tue Apr 08, 2014 7:13 am

MPG2 acceleration doesn't work

Thu Jan 11, 2018 11:41 am

Hi all,

I have RPi3, MPG2 licence, modified config.txt.

pi@raspberrypi:~ $ vcgencmd codec_enabled MPG2
MPG2=enabled
pi@raspberrypi:~ $ vcgencmd get_mem gpu
gpu=128M

But output from "glxgears" is approx. 10 - 11 fps in both cases (doesn't matter if MPG2 enabled / disabled), CPU is working on 100% on that time.. When I try to display movie file with omxplayer, it lags, or is frozen (vlcplayer as well).

I checked serial number with my order and everything seems to be OK.

What should I do?

Heater
Posts: 15949
Joined: Tue Jul 17, 2012 3:02 pm

Re: MPG2 acceleration doesn't work

Thu Jan 11, 2018 11:52 am

I would not expect a coded, for decoding some video format, to make any difference to 3D rendering performance.

Can't account for the video player lock ups.

Do you have 3D rendering disabled? I think you should.
Memory in C++ is a leaky abstraction .

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

Re: MPG2 acceleration doesn't work

Thu Jan 11, 2018 12:43 pm

As above, glxgear is not affected by a codec.

What specific video format is the file you are trying to play? Use omxplayer btw, that is the HW accelerated player.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

janob
Posts: 5
Joined: Tue Apr 08, 2014 7:13 am

Re: MPG2 acceleration doesn't work

Thu Jan 11, 2018 1:13 pm

As I wrote already - I used omxplayer (tried vlcplayer as well). The file was mpeg2 format. OS raspbian.

What was surprising me - the CPU load 100% in both cases (acceleration on / off) ...

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8918
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: MPG2 acceleration doesn't work

Thu Jan 11, 2018 2:50 pm

The standard VLC doesn't use the hardware acceleration.
Omxplayer ONLY uses the hardware acceleration, so if you get anything then it is using it.

NB MPEG2 is a video codec, unless your talking of an MPEG2 transport stream. A file will typically be a container with multiple encoded streams in it.

What resolution and frame rate is your video clip? And what audio codec (audio is decoded on the ARM). "avprobe filename.mp4" ("sudo apt-get install libav-tools" if you haven't already installed it).
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

janob
Posts: 5
Joined: Tue Apr 08, 2014 7:13 am

Re: MPG2 acceleration doesn't work

Fri Jan 12, 2018 9:16 am

I'm not at my RPi right now - I will try today evening (CET).

Return to “General discussion”