VLC Stream


13 posts
by joaosilva94 » Wed Aug 29, 2012 2:15 pm
Hello, I want to do a VLC Stream from my windows server... is it possible? wich is the best distro for doing this?

Does raspberry pi run java? in wich distro?


tks!
Posts: 6
Joined: Wed Aug 29, 2012 2:03 pm
by ghans » Wed Aug 29, 2012 2:50 pm
Do you want stream FROM or TO your Pi ?
Both is possible , but transcoding ON the Pi kills its CPU . (Not to say that this might happen on your desktop too).
People have yet to get their heads around OpenMAX.


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4613
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by joaosilva94 » Thu Aug 30, 2012 6:21 pm
I want to run a stream on vlc on my desktop and show it in a java app in my raspberry... i want to know what is the best distro for that... if u can tell me, i apreciate it a lot!
Posts: 6
Joined: Wed Aug 29, 2012 2:03 pm
by ghans » Thu Aug 30, 2012 6:41 pm
Do you know which codec ? Are you transcoding on the host (desktop) ?

There are AFAIK no Java bindings available (on the Pi ) which facilitate proper video playback.
You could start omxplayer (fullscreen only) from your app , but i suppose thats not what you want..
I think you should use C\C++

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4613
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by joaosilva94 » Thu Aug 30, 2012 8:09 pm
i want to transmit a stream from a mp4 video to an app in java that one partner have made for me...
i dont know nothing about programming.. i just want to run the java application, and run the stream in the app.... is it so hard? :S
Posts: 6
Joined: Wed Aug 29, 2012 2:03 pm
by ghans » Thu Aug 30, 2012 9:46 pm
Do you really need the app ?
If not , just put XBMC on your card and play the stream with it.

Other solutions :
1) start omxplayer from the app (a Linux commandline program )

2) Use Java Bindings / "Wrappers" to OpenMAX (if they exist )

3) Use C/C++

Why don't you and your partner don't work together ? Why don't you show him your Pi ?
And most important : What do you REALLY want to achieve ? What is the app about , anyway ?
It is hard to help you , it could be easier with more information ! :D

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4613
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by joaosilva94 » Fri Aug 31, 2012 12:57 am
i just want a good distribution that runs mp4 videos smoothly and that runs java, if that exists... it's perfect... my partner is in algeria now... i only can contact him in a few months :s
Posts: 6
Joined: Wed Aug 29, 2012 2:03 pm
by ghans » Fri Aug 31, 2012 6:06 am
Are you able to post the app here ?
Java works in the older Softfloat Debian image.

Else try XBMC - it has accelerated video playback. You'll just have to point it at IP
and Port of your VLC stream.


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4613
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by joaosilva94 » Fri Aug 31, 2012 7:52 am
It's a personal test, it's a window, with some information and a square in black where it's programmed to transmit a stream from vlc... in xbmc mp4 videos work fine, but in raspbian, or whezzy, the videos wont transmit, just the sound. The video is too slow and bugged... i just want a good distro where i can put java, like raspbian or whezzy, combined with the speed that i get in xbmc for the videos! :)
tks by the way for your help
Posts: 6
Joined: Wed Aug 29, 2012 2:03 pm
by ghans » Fri Aug 31, 2012 8:04 am
Without learning OpenMAX or having ubercrass Assembly/ Video Decoder omptimization
skillz , i think it is impossible.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4613
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by xranby » Sat Sep 01, 2012 10:29 pm
joaosilva94 wrote:I want to run a stream on vlc on my desktop and show it in a java app in my raspberry... i want to know what is the best distro for that... if u can tell me, i apreciate it a lot!


:idea: I recommend you to use, JogAmp, high performance Java™ libraries for 3D Graphics, Multimedia and Processing. The JogAmp junit tests contains a lot demonstration code, for example it can use the OpenGL ES 2 shaders on the Pi to quickly convert from YUV to RGB color space and then rendering the video output on a textured OpenGL ES 2 surface.

http://www.youtube.com/watch?v=4gWStKCioi8&t=2m12s - streamed video playback using JogAmp
https://twitter.com/#!/xranby/media/sli ... 2F6vzRrgO3 - it do run fine using the RaspberryPi

To try this yourself check the Java OpenGL ES 2 bindings using JogAmp JOGL 2 forum thread or simply run the commands below to start the MovieCube demo on the Pi:
Code: Select all
sudo apt-get install openjdk-6-jdk p7zip-full

#Download and unpack the JogAmp autobuild.
#if this download for some reason fail then check
# http://jogamp.org/deployment/archive/master/?C=M;O=D
#for a lost of the latest autobuild version.
wget http://jogamp.org/deployment/archive/master/gluegen_584-joal_353-jogl_798-jocl_668-signed/archive/jogamp-all-platforms.7z
7z x jogamp-all-platforms.7z
cd jogamp-all-platforms

# Render streamed movies to textures, use the mouse to rotate the cube.
# Require the ffmpeg libavcodec libavutil and libavformat to be installed
# or else you will only see a test screen.
# also require junit4
sudo apt-get install libav-tools junit4
java -Dnativewindow.ws.name=jogamp.newt.driver.bcm.vc.iv \
-cp jar/jogl-all.jar:jar/gluegen-rt.jar:/usr/share/java/junit4.jar:jar/jogl-test.jar \
com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieCube \
-time 400000 -width 1980 -height 1080


JogAmp can be run on all Linux distributions, Raspbian, Debian, Fedora, Arch and Android as well!
The choice of JVM vendor do not matter since the raw speed gained by using the JogAmp API originate from its low overhead and high performance access from Java to the hardware acceleration found on the Pi.

In this demo JogAmp use the ffmpeg libavcodec, libavformat and libavutils to do the actual video format decoding.
Its possible that we can decode faster by using OpenMAX directly inside JogAmp, doing so would be quite straight forward since all tools required to quickly bind the OpenMAX "c" API to Java is found inside the JogAmp project itself by using Gluegen.
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby
User avatar
Posts: 401
Joined: Sat Mar 03, 2012 10:02 pm
by ghans » Sun Sep 02, 2012 7:27 am
Really funny , i thought it would not run on the Pi.
Thanks for testing and porting !


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4613
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by joaosilva94 » Mon Sep 03, 2012 8:10 am
i will try it and then say something about results! tks!
Posts: 6
Joined: Wed Aug 29, 2012 2:03 pm