SDL + libvlc choppy full screen on Pi 3, but VLC player is fine
Posted: 08 Apr 2019 05:25
Under Raspbarian, using the included VLC app, playing videos full screen on my 800x480 display works great, at full speed, no frames dropped. But in my app compiled with SDL 1.2 and libvlc, the full screen playback is choppy!
More detail: I'm making an app with video playback in it, and using the SDL1.2 example from the libvlc docs, found here https://wiki.videolan.org/LibVLC_SampleCode_SDL/ NOTE: there are 2 examples given on that page, the first one for SDL 1.2, and the second one for SDL2. Both examples play the video in a small 320x240 picture within side the main window. I'm using the SDL 1.2 one, because the SDL2 one was choppy on the Pi 3. But I've since tweaked the SDL 1.2 one to be fullscreen, and now it is choppy also. I gathered from some prior error messages that it's scaling in software. Here's my code for reference... (it requires the SDL and libvlc libraries)
My question:I was told here that VLC is doing extra things to speed up rendering on the Raspberry Pi. Is it possible for me to get that kind of video playback speed on the Pi in my own application? I don't actually care what libraries or language I have to use (eg. I had some success with the python wrapper), I just need smooth full screen playback on the 800x480 display on my Pi, and the ability to control the playback from within my app. Whatever language / framework I have to write my app in, doesn't matter!
More detail: I'm making an app with video playback in it, and using the SDL1.2 example from the libvlc docs, found here https://wiki.videolan.org/LibVLC_SampleCode_SDL/ NOTE: there are 2 examples given on that page, the first one for SDL 1.2, and the second one for SDL2. Both examples play the video in a small 320x240 picture within side the main window. I'm using the SDL 1.2 one, because the SDL2 one was choppy on the Pi 3. But I've since tweaked the SDL 1.2 one to be fullscreen, and now it is choppy also. I gathered from some prior error messages that it's scaling in software. Here's my code for reference... (it requires the SDL and libvlc libraries)
My question:I was told here that VLC is doing extra things to speed up rendering on the Raspberry Pi. Is it possible for me to get that kind of video playback speed on the Pi in my own application? I don't actually care what libraries or language I have to use (eg. I had some success with the python wrapper), I just need smooth full screen playback on the 800x480 display on my Pi, and the ability to control the playback from within my app. Whatever language / framework I have to write my app in, doesn't matter!