VLCJ and Hardware acceleration
Posted: Wed Jul 13, 2016 6:41 pm
Hi guys. I hope you can help me, even if my english isn't excellent.
Soo... for last exam I have to write a program in Java to speed up or reduce speed video on RPi. Idea is, that when the video is playing, you can write a number in terminal, and if you write 2, the video start to play at double speed, if you write 0.5, the speed is reduce by 0.5.
I wrote a program in Eclipse using VLC program and VLCJ libraries on laptop and everything works OK, but when I moved the program on RPi, I realized, the biggest problem will be hardware acceleration.
So I bought official RPi codecs MPEG-2 and VC-1 and installed it, but nothing happened. Then I found out, that there has to be enabled GL driver in raspi-config menu. And now the problem started:
If i leave GL driver disabled:
-- if I start MPEG2 video using VLC program from accessories menu, the video starts play, but is playing very slow (every 5 sec one frame).
-- if I start MPEG2 video using my java program, the video starts play, but is also played very slow.
But when I enable GL driver:
-- when I start MPEG2 video using VLC program from accessories menu, the video works fine, running normally, as it should.
-- but when I start MPEG2 video using my java program, the VLCJ player window is shown for a second and then appears grey logon screen, saying to write username and password. If I write them in boxes and hit enter, my desktop is shown such the RPi is booted for the first time. And this is never ending story.
So the solution for smooth playing of video is GL driver enabled. But that logon screen is making me crazy.
Has anyone idea how to play video using hardware acceleration from my java program?
Thanks for your help.
Jan
Soo... for last exam I have to write a program in Java to speed up or reduce speed video on RPi. Idea is, that when the video is playing, you can write a number in terminal, and if you write 2, the video start to play at double speed, if you write 0.5, the speed is reduce by 0.5.
I wrote a program in Eclipse using VLC program and VLCJ libraries on laptop and everything works OK, but when I moved the program on RPi, I realized, the biggest problem will be hardware acceleration.
So I bought official RPi codecs MPEG-2 and VC-1 and installed it, but nothing happened. Then I found out, that there has to be enabled GL driver in raspi-config menu. And now the problem started:
If i leave GL driver disabled:
-- if I start MPEG2 video using VLC program from accessories menu, the video starts play, but is playing very slow (every 5 sec one frame).
-- if I start MPEG2 video using my java program, the video starts play, but is also played very slow.
But when I enable GL driver:
-- when I start MPEG2 video using VLC program from accessories menu, the video works fine, running normally, as it should.
-- but when I start MPEG2 video using my java program, the VLCJ player window is shown for a second and then appears grey logon screen, saying to write username and password. If I write them in boxes and hit enter, my desktop is shown such the RPi is booted for the first time. And this is never ending story.
So the solution for smooth playing of video is GL driver enabled. But that logon screen is making me crazy.
Has anyone idea how to play video using hardware acceleration from my java program?
Thanks for your help.
Jan