MoviePlayer playback at 1/10th the speed

Hello Everyone,

When playing back an h264 video on the Raspberry Pi using the MoviePlayer in Xojo play’s the video back at 1/10th of the speed, meaning a 3 second video plays back in 30 seconds.

When the same file is played on Raspberry Pi’s omxplay, the video is played back at the correct speed.

It looks like MoviePlayer.Rate is deprecated. What can I do to play the video back at normal speed? Here is the code for the Pi:

[code] //Clear the listbox
Listbox1.DeleteAllRows

//Get the filename and path of the video file
Dim MyFile as FolderItem
MyFile = New FolderItem("/home/pi/Desktop/cam.h264", FolderItem.PathTypeShell)

//Make sure the picture file is there and exists
If MyFile <> Nil then
If MyFile.Exists then

  MoviePlayer1.Speaker = True
  MoviePlayer1.AutoPlay = True
  MoviePlayer1.Width = 442
 MoviePlayer1.Movie = MyFile.OpenAsMovie

Else
Listbox1.AddRow “File does not exist”
End If
Else
Listbox1.AddRow “File is nil”
End If
[/code]

Thanks for your thoughts.

raw.h264 ? Better make mp4 from that. You should be able to convert the file using ffmpeg or some other commandline tool.

Hi Derk,

I successfully converted the h264 file to mp4 with avconv, and movieplayer was at 1/10th the speed.

Do you have any other possible thoughts? Thanks for your suggestion.

Is it the amount of power the Pi has?
I’m not an expert on Pi, but I do remember videos on my old IIsi playing really slow that the Performa could handle.

Hi Tim,

This is a possibility. The Raspberry Pi plays the videos with the Raspberry Pi omxplayer at full speed in both mp4 and h264 formats. The problem seems to happen when attempting to play these same files with the MoviePlayer control in Xojo. Is it possible that the Xojo program is taking more power on the Raspberry Pi, but the omxplayer is taking less power on the Pi?

I don’t know the answer, just asking :slight_smile:

From http://elinux.org/Omxplayer

Looks like omxplayer is benefiting from hardware acceleration and I have no idea what Xojo is using but I doubt it is using anything but software.

Thanks for your help Bob. If omxplayer is using hardware acceleration and Xojo is not, then should I file a feedback report, or just ignore MoviePlayer and use omxplayer?

Thanks for your help everyone.

A Feedback report was created:
<https://xojo.com/issue/43570>