You can pass parameters to omxplayer, like coordinates X and Y, aswell as width (X2 = X1 + width) and height (Y2 = Y1 + height):
Code: Select all
Usage: omxplayer [OPTIONS] [FILE]
Options :
-h / --help print this help
-n / --aidx index audio stream index : e.g. 1
-o / --adev device audio out device : e.g. hdmi/local
-i / --info dump stream format and exit
-s / --stats pts and buffer stats
-p / --passthrough audio passthrough
-d / --deinterlace deinterlacing
-w / --hw hw audio decoding
-3 / --3d mode switch tv into 3d mode (e.g. SBS/TB)
-y / --hdmiclocksync adjust display refresh rate to match video (default)
-z / --nohdmiclocksync do not adjust display refresh rate to match video
-t / --sid index show subtitle with index
-r / --refresh adjust framerate/resolution to video
-g / --genlog generate log file
-l / --pos n start position (in seconds)
--boost-on-downmix boost volume when downmixing
--vol n Set initial volume in millibels (default 0)
--subtitles path external subtitles in UTF-8 srt format
--font path subtitle font
(default: /usr/share/fonts/truetype/freefont/FreeSans.ttf)
--font-size size font size as thousandths of screen height
(default: 55)
--align left/center subtitle alignment (default: left)
--lines n number of lines to accommodate in the subtitle buffer
(default: 3)
--win "x1 y1 x2 y2" Set position of video window
--audio_fifo n Size of audio output fifo in seconds
--video_fifo n Size of video output fifo in MB
--audio_queue n Size of audio input queue in MB
--video_queue n Size of video input queue in MB
For example upper half of full hd (1920x1080) screen:
Code: Select all
omxplayer --win "0 0 1920 540" myfile.mp4
Attention: omxplayer "overlays" your current application. If you create your user interface, be sure to not locate any interactive controls in the area you would like to have your video.
In c# mono it might be something like this:
Code: Select all
Process.Start(new ProcessStartInfo("/usr/bin/omxplayer", "--win \"0 0 1920 540\" myfile.mp4") { UseShellExecute = false });
Pitendo - Case And Emulator Project - http://edv-huber.com/index.php/problemloesungen/12-pitendo