Page 1 of 1
Raspberry pi play shor movie's (.Net/Mono/DotNet)
Posted: Tue Aug 19, 2014 1:58 pm
by jgcramer
Hello,
I have a Raspberry pi what i use to show information on a screen with different screens (jpegs) on it for eatch specific customer.
But now i wanne show short movie's on the Pi, when a specific customer is in front of the screen.
I use .Net to program with Mono on the Pi.
Now my question:
What is the best way to play the movie, also becasuse of the limits of the Pi.
dotnet, mono, .net
Re: Raspberry pi play shor movie's (.Net/Mono/DotNet)
Posted: Thu Aug 21, 2014 1:36 pm
by jgcramer
Someone?
Re: Raspberry pi play shor movie's (.Net/Mono/DotNet)
Posted: Thu Aug 21, 2014 1:46 pm
by RaTTuS
omxplayer file.h264
Re: Raspberry pi play shor movie's (.Net/Mono/DotNet)
Posted: Thu Aug 21, 2014 1:53 pm
by jgcramer
RaTTuS wrote:omxplayer file.h264
This application runs stable and fast on the pi with mono?
I have googled but diddent find some DotNet helping files.
Re: Raspberry pi play shor movie's (.Net/Mono/DotNet)
Posted: Thu Aug 21, 2014 7:30 pm
by ghans
This is a native Linux program which has to be spawned from
within Mono with something like exec() (PHP) or subprocess.call()
(Python). No idea how that is called in C#.
ghans
Re: Raspberry pi play shor movie's (.Net/Mono/DotNet)
Posted: Fri Aug 22, 2014 7:11 am
by jgcramer
Ok!
And if i want to split my screen? (Upper screen movie, lower screen picture. With DotNet within mono.
Re: Raspberry pi play shor movie's (.Net/Mono/DotNet)
Posted: Fri Aug 22, 2014 7:17 am
by forenbenutzer
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 });
Re: Raspberry pi play shor movie's (.Net/Mono/DotNet)
Posted: Fri Aug 22, 2014 8:51 am
by jgcramer
@forenbenutzer thank you, this must work!