4

I'm trying to use omxplayer to play a movie file having the movie display placed a certain position and with a custom size.

I was hoping this parameter would work

--win "x1 y1 x2 y2" Set position of video window

Whenever I try to open a file like this the position and dimensions are never changed.

omxplayer --win "50 50 50 50" vid.mp4

This should position the video display at 50 pixels from top left and bottom right corners of the screen. However it does not.

Is there something wrong with my parameters?

3

On my 1024x768 setup it looks like this :

"--win \"784 588 1024 748\"

      a   b    c   d

a) how far to the right is the top-left corner of the window (1024-240)

b) how far down is the top-left corner of the window (768-180)

c) where the window should end (width)

d) where the window should end (height)

My window is 20px above the edge of the screen to keep my panel visible.

As a result you get a 240x180 window placed at the bottom right corner right above the panel.

LotF Rpi

EDIT : I used backslashes to use omxplayer in twitch streaming script

livestreamer twitch.tv/$1 $2 --player omxplayer --fifo --player-args "--win \"784 588 1024 748\" {filename}"

They shouldn't be necessary in normal usage.

  • Hum those blackslahes might be what I'm missing. Soon as I get my hands on Raspberry I will try it. – Fábio Antunes Jan 24 '15 at 19:25
1

If I'm right, setting all values to '50' will create a frame of 0 pixels, considering all coordinates start from the top left corner. Try something like:

--win "0 0 640 480"

If you want a 50px margin starting from each border you will need to take the width and height of your screen and subtract by 50. On a 1440 x 1080 screen this would be:

--win "50 50 1390 1030"

  • I tried exactly that as you can see from my code snippet. Didn't work, neither with your exact values. – Fábio Antunes Nov 19 '14 at 20:02
  • In your snippet you use the same value 4 times. Which I explained, does not work. But if the other values don't work I have no idea what's wrong. Have you tried to rebuild omxplayer, and update + upgrade your RPi? – Dweez Nov 22 '14 at 13:56
0

I installed VLC media player on my Pi, and was disappointed for overheating just after 5-6 second playing the selected video. Than I red about the omxplayer. I gave a try and my first experience was nice from commandline:

omxplayer -o local --win "-40 -40 640 380" my_video.mp4

 # where [ -o local] -plays the analog audio
 # where [ --win .. -sets the video
 # -40 -40 means a negative coordinate out of my screen because I do not need the frame of the tutorial video
 # 640-width and 380-height of the video.

AND my Processor did not overheat, To find out more about omxplayer tpye in the commandline:

man omxplayer 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.