Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OMXplayer + speed like argument (New feature) #208

Open
jmorenod opened this issue May 16, 2014 · 3 comments
Open

OMXplayer + speed like argument (New feature) #208

jmorenod opened this issue May 16, 2014 · 3 comments

Comments

@jmorenod
Copy link

Hi everybody!

My name is Juan, I would like to propose a new feature.

I saw that I can change the video speed using the key 1 and 2. but OMXPlayer don't accept speed like argument for example:

omxplayer -speed 110

to reproduce 10% faster.

it's could be util, if you want reprocuce all videos faster. You can create an alias:

alias mxplayer='mxplayer -speed 110

and all your videos will be reproduced faster.

I use this in VLC in PC, but in raspberry pi, OMXPlayer is better.

Thanks for your time.
Thanks for your help

Regards.

@himijendrix24
Copy link

Hello,

I am also desperately looking for a solution to playback Video on the raspberry with variable framerate. I used PureData and Gem, but it doesn't support Hardware decoding. OpenCV and Python was my next try, but it also only uses software decoding.
Being able to change framerate "on the fly" with omxPlayer (for example from within python) would solve all this problems!

Does anybody else now other possible solutions if nothing happens here?

Many Greetings and thanks,
Himi

  • I also tried using uncompressed video, but the SD card limits fps even worse

@himijendrix24
Copy link

To start with something in OMXReader.cpp I changed:
if(m_speed > 4*DVD_PLAYSPEED_NORMAL) discard = AVDISCARD_NONKEY;
to
if(m_speed > 16*DVD_PLAYSPEED_NORMAL) discard = AVDISCARD_NONKEY;
which should increase maximum possible playback speed

I then ran the script
sudo bash ./prepare-native-raspbian.sh

and make ffmpeg which gives me this error:
arm-unknown-linux-gnueabi-gcc is unable to create an executable file. C compiler test failed. If you think configure made a mistake, make sure you are using the latest version from Git. If the latest version fails, report the problem to the [email protected] mailing list or IRC #ffmpeg on irc.freenode.net. Include the log file "config.log" produced by configure as this will help solving the problem. Makefile.ffmpeg:18: recipe for target 'configure' failed make[1]: *** [configure] Error 1 make[1]: Leaving directory '/home/pi/videotest/omxplayer' Makefile:60: recipe for target 'ffmpeg' failed make: *** [ffmpeg] Error 2

make also returns
In file included from OMXOverlayCodecText.cpp:25:0: OMXStreamInfo.h:46:3: error: ‘CodecID’ does not name a type OMXOverlayCodecText.cpp: In member function ‘virtual bool COMXOverlayCodecText::Open(COMXStreamInfo&)’: OMXOverlayCodecText.cpp:44:21: error: ‘class COMXStreamInfo’ has no member named ‘codec’ OMXOverlayCodecText.cpp:45:12: error: ‘class COMXStreamInfo’ has no member named ‘codec’ OMXOverlayCodecText.cpp:45:21: error: ‘AV_CODEC_ID_SUBRIP’ was not declared in this scope OMXOverlayCodecText.cpp:45:49: error: ‘class COMXStreamInfo’ has no member named ‘codec’ Makefile:41: recipe for target 'OMXOverlayCodecText.o' failed make: *** [OMXOverlayCodecText.o] Error 1

@vcrocher
Copy link

Hi himijendrix24, you can have a look here . In this fork I did change some of the DBus controls and among others, implemented a Rate property allowing you to drive the playing rate through DBus.
You can thus control the rate from a Python script using DBus or see an example in C here.
Note that:

  • Sound is also played faster/slower, you may want to mute it depending on what you want
  • It's not extremely reactive, but should be ok if you change the rate, say, only every a few seconds
  • You can try to get rid of the 4*DVD play limit (which corresponds to x10.125) by editing line 12 in OMXControl.h but I do not guarantee the behavior for high speeds...

Regarding the errors you got it seems to be a pure compiling issue not related to your modification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants