Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Key bindings
- Key Action
- 1 Increase Speed
- 2 Decrease Speed
- j Previous Audio stream
- k Next Audio stream
- i Previous Chapter
- o Next Chapter
- n Previous Subtitle stream
- m Next Subtitle stream
- s Toggle subtitles
- q Exit OMXPlayer
- Space or p Pause/Resume
- - Decrease Volume
- + Increase Volume
- Left Seek -30
- Right Seek +30
- Down Seek -600
- Up Seek +600
- I could not JeffHoogland's solution to work in Raspbian, but a couple of changes made it work for me:
- sudo nano /usr/share/applications/omxplayer.desktop
- For it's contents paste:
- [Desktop Entry]
- Type=Application
- Name=OMXPlayer
- Categories=AudioVideo;Player;
- Exec=lxterminal --command "omxplayer -o hdmi %f"
- Terminal=false
- Icon=/usr/share/icons/nuoveXT2/96x96/categories/applications-multimedia.png
- Save and close the file (ctrl+x in nano)
- You can choose your own icon. Note that 'lxterminal' is the default terminal on Pi - change that if you are using something else.
- tried framil's solution on my copy of Raspian wheezy. it worked as described.
- thanks framil. ;-)
- they only thing i changed was adding the -y option to the command line arguments. i have a 1680x1050 monitor I connected with an DVI-to-HDMI cable. for some reason nothing plays with omxplayer unless I use the -y option.
- framil variant works well for me!
- I'm just stuck on how to extend the menu option to .mpg files...
- Code: Select all
- Categories=AudioVideo;Player;
- is a bit generic, I wonder if it supports extension regex or what else shall I do...
- thanx for the help
- You can directly use "xterm".
- Code: Select all
- [Desktop Entry]
- Type=Application
- Name=OMXPlayer-HDMI
- Categories=AudioVideo;Player;
- Exec=xterm -fullscreen -fg black -bg black -e omxplayer -o hdmi -r %f
- Terminal=false
- Icon=/usr/share/icons/nuoveXT2/96x96/categories/applications-multimedia.png
- And for playing using audio jack:
- Code: Select all
- [Desktop Entry]
- Type=Application
- Name=OMXPlayer
- Categories=AudioVideo;Player;
- Exec=xterm -fullscreen -fg black -bg black -e omxplayer -o local -r %f
- Terminal=false
- Icon=/usr/share/icons/nuoveXT2/96x96/categories/applications-multimedia.png
- my gui tboplayer will use omxplayer to play audio and video https://github.com/KenT2/tboplayer
- I think the confusion with why this solution seems to work sometimes and not others is that the [desktop entry] file passes the entire file name to the terminal via the %f variable, but there's no consideration for file names that have spaces or other special characters. If one tries to add quotes around %f in the [desktop entry] file to deal with this issue, the desktop entry won't work at all due to limitations of the desktop entry file with regards to quotes and variables.
- Solution:
- Create a bash script that adds the quotes around the file name and call the bash script from the desktop entry file.
- For Example...
- /home/pi/.local/share/applications/OMXlauncher.desktop
- Code: Select all
- [Desktop Entry]
- Type=Application
- Name=OMXPlayer
- Exec=bash /home/pi/scripts/videoplayer %f
- Categories=AudioVideo;
- MimeType=video/mp4
- Terminal=false
- Encoding=UTF-8
- Icon=applications-multimedia
- NoDisplay=false
- /home/pi/scripts/videoplayer
- Code: Select all
- #!/bin/bash
- lxterminal -t "OMXPlayer (Video Control)" -e "omxplayer -b --display :0 \"$1\""
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement