maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] PhoneStreamer - Nifty little app for streaming to your PC (https://talk.maemo.org/showthread.php?t=70877)

tetris11_ 2011-03-09 20:48

[Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
1 Attachment(s)
http://s12.postimage.org/luaoyjc3h/phonestream.jpg

What it does:
It's a frontend for a few gstreamer scripts, but it's (moderately) easy to use, and allows you to stream either the front/back camera to your Desktop PC either through VLC media player (windows/[linux/OSX]), Xout (linux/OSX).

What's changed in the rewrite:
* Dropped audio streaming for Windows (for now),
* Dropped webcam mounting (not used)
* Profiles can now store connections using sqlite database
* Added UDP streaming (fastest) to cmdline part of app (sypcam)
* Readable code
------------------------------------------------------------
Instructions:
Pick a profile, pick (or scan) for a target connections, then press the info button after streaming for further instructions.

Quality control:
If you have a low bandwidth and want to maintain a good signal, tick 'Quality' box and fill in number (0-100).

--------------------------------------------------------------
Using the SPYCAM:
If you want to stream a raw signal, you'll need to do X forwarding:

First ensure that your N900 supports X11 forwarding:
install xauth libxmuu1- 'sudo apt-get install xauth'

Now that that's setup:
1. From your Linux/Mac PC, ssh into your phone using the X flag:
'ssh root@<phone.ip> -X',
2. Once inside phone, type 'ps-spycam'

OTHERWISE
You can just ssh in without the X flag and select the low-bandwidth option. This will copy a gstreamer script to your home computer, you can then execute it via a command displayed on the screen.
-------------------------------------------------------------

X vs. VLC:
Xout option gives better quality streams using a different encoder and protocol. VLC has more network lag but can be streamed over http and is compatible with all systems.
-------------------------------------------------------------
Todo list:
*Stream through USB networking
*Add profiles
*Scan network for active connections
*Add zooming/focus feature
--------------------------------------------------------------
Changelog: (note I use random versioning)
1.5.2 Changes: Complete rewrite, sqlite database, arp-scan, usb networking, HTTP fix, audio dropped from windows, webcam dropped.
0.9.3 Changes: Fixed issue where windows users couldnt stream using VLC method, fixed audio streaming for SPYCAM, fixed regular audio streaming, tided scripts.
0.9.2 Changes: brought back old VLC method for stability, added file streaming, added ncurses SPYCAM version, fixed IP address issue for users with sudo problems.
0.9.1 Changes: http streaming, VLC no longer needs sdp file to be generated, VLC now has quality control, fixed local file error, fixed error that stopped windows users from streaming, temporarily disabled audio.
0.9.0 Changes: Reworked the menus, added dialog prompts, catches every scp error under the sun, user prompted to generate before they stream if they haven't done so already, now fully compatible with Titan's power kernel and the vanilla kernel, tidied scripts, removed horrible "Calibrate Camera" widget.
0.0.5 Changes: Save to local file, save to remote file, handaxe's Quality control, tidied some scripts, webcam now also uses jpeg encoding.
0.0.4 Changes: Front LED issue hopefully resolved, "Generate" crash issue permanently fixed (hopefully).
0.0.3 Changes: tidied up some scripts, but mostly this update was just to get on extras-devel.
0.0.2 Changes: Can now stream to webcam (if you have v4l2loopback built on your system), can now stream to an X window. Added volume control for audio (0 - 9 is the best range).
----------------------------------------------------------
PS: BIG thanks to gionni88 who pointed me in the right direction and saved me from hours of painful work, justice4all3000 for finding the workaround, leetnoob who thoroughly tested it and found major bugs, and biggest thanks to handaxe for the extremely helpful (and doable) suggestions + generally just helping out with everything. Another round of thanks to damion for getting VLC to stream over http and removing the need to generate any recieving file. Thanks guys!
-----------------------------------------------------------------

INSTALL:
The latest version (1.5.2) is not available on the repos yet due to council maintenance, but can be found in the below attachment.

Please make sure you install the dependencies, then install the package:
Code:

root;
apt-get install gstreamer-tools arp-scan socat espeak
dpkg -i /path/to/directory/phonestream_1_5_2_armel.deb


dashti 2011-03-09 22:51

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
coooooooool

sophocha 2011-03-09 22:55

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
thanks for this.How do you use it as a skype camera on the PC?Is that possible?

lucky88shp 2011-03-09 23:04

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
YAY finally a user-friendly version of your streaming app!!! Thnx will try it out now!!

MeeGoExperts 2011-03-09 23:06

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
Well done. Looking good.

tetris11_ 2011-03-09 23:27

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
Thanks alot guys, but it's far from perfect - so still some way to go!

@sophocha - I reckon it's unlikely, but more experienced users would probably disagree with me.
Edit: WOW handaxe that is amazing! If that can be done through a gstreamer pipeline, then I can definitely imlpement that into the app!

handaxe 2011-03-09 23:28

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
Quote:

Originally Posted by sophocha (Post 964457)
thanks for this.How do you use it as a skype camera on the PC?Is that possible?

Clues here: http://talk.maemo.org/showpost.php?p...2&postcount=85

handaxe 2011-03-10 00:13

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
@tetris11_: in the previous thread you were asked about audio+video. It is possible, tho' it may hammer the n900s cpu and io. Down-sampling may be necessary (or small video and down sampled audio). Need to experiment.

Code:

gst-launch v4l2src ! queue ! video/x-raw-yuv,width=320,height=240,framerate=30/1 ! videoscale ! ffmpegcolorspace ! queue ! dsph264enc ! queue ! rtph264pay ! udpsink host=xxx.xxx.x.xxx port=5000 pulsesrc ! queue ! audio/x-raw-int,rate=8000,channels=1,depth=8 ! audioconvert ! audioresample ! nokiaaacenc ! queue ! rtpmp4apay ! udpserversink host=xxx.xxx.x.xxx port=5001

tetris11_ 2011-03-10 00:33

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
That is.... just amazing! I guess I'll include a third option in my combobox for the next update! Thanks!!

By then the app should hopefully be in the extras-devel repo, and the updates will be automatic too

couldvbb 2011-03-10 03:05

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
For Windows: Well, you're gonna have to get it on your system manually. The file is saved as MyDocs/n900videostrm.sdp or MyDcos/n900audiostrm.sdp

C:\Users\Administrator\Documents ? or C:\Users\Public\Desktop ?
I do not know

tetris11_ 2011-03-10 03:32

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
Sorry, I meant that the files are located on your phone at "/home/user/MyDocs/n900audiostrm.sdp" and "/home/user/MyDocs/n900videostrm.sdp".

The /home/user/MyDocs directory is actually what you first see when you hook up your phone to the desktop via USB. So the files should just be there, and you can drag+drop them onto your PC's Desktop (or anywhere on PC, it doesnt matter really).

Then you stream from your phone, then you launch the appropriate sdp file on your PC.

couldvbb 2011-03-10 06:04

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
i use Windows
--> push "ShowDebugConsole" button
---> push "Generate SDP",
but not for /home/user/MyDocs/n900videostrm.sdp or /home/user/MyDocs/n900audiostrm.sdp

so
I manually created n900videostrm.sdp and n900audiostrm.sdp
--->push streaml But the two did not increase the file size

Sorry my English is not good

tetris11_ 2011-03-10 06:47

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
Did you choose Video or Audio first? And then hit "Generate SDP"?

If that doesnt work, try :"sudo apt-get install gstreamer-tools rootsh expect" from terminal, and then try "Generate SDP" from within the app.

If that doesn't work, then create your own SDP file :
http://talk.maemo.org/showpost.php?p...&postcount=124

couldvbb 2011-03-10 08:37

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
"sudo apt-get install gstreamer-tools rootsh" expect or "apt-get install gstreamer-tools" <<no work
so I try "apt-get install --reinstall gstreamer-tools" ok
but
--> push "ShowDebugConsole" button
---> push "Generate SDP",
no save sdp file and PhoneStreamer close
i try http://talk.maemo.org/showpost.php?p...&postcount=124
write to n900videostrm.sdp ,VLC No show Image
Update tester_0.0.4_armel.deb too Same
choose Video or Audio too Same

Will Ip is use pc? or n900? or Wireless? USB? thank you

tetris11_ 2011-03-10 08:50

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
Im sorry to hear that, but it sounds like you're starting the app with root priveleges.....
Try running "/usr/local/bin/tester" and see if that works for "generate sdp"

What is the ip address of your computer, and what is the ip address of the n900? I can generate an sdp file for you!

couldvbb 2011-03-10 09:07

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
I Try OK
I PC IP:192.168.11.2 N900 IP:192.168.11.4 ,to Wireles

1.write to n900videostrm.sdp Put your pc desktop

v=0
m=video 5000 RTP/AVP 96
c=IN IP4 192.168.11.4
a=rtpmap:96 H264/90000

2.write to n900videostrm.sdp Put your n900 /home/user/MyDocs
v=0
m=video 5000 RTP/AVP 96
c=IN IP4 192.168.11.2
a=rtpmap:96 H264/90000

3.open PhoneStreamer type:video ;camera,size ,Can be
push "streaml'
4. your pc desktop n900videostrm.sdp use VLC OPEN
is ok

tetris11_ 2011-03-10 09:36

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
2. <-----No! Not needed!
SDP file ONLY for PC, not for n900

The sdp file on your PC should read:
Code:

v=0
m=video 5000 RTP/AVP 96
c=IN IP4 192.168.11.4
a=rtpmap:96 H264/90000

on the n900: NO SDP FILE!
Just open PhoneStreamer - address: 192.168.11.2 port:5000
(make sure your PC IP goes in address in PhoneStreamer
type: video; camera; size
Push "stream!", and pc desktop n900videostrm.sdp use vlc to open

gendor 2011-03-10 10:16

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
Thank you, this is awesome! Would you consider providing the source?

AndiThebest 2011-03-10 10:32

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
I have a dependency problem... the package "expect" is missing. should i force install it?

tetris11_ 2011-03-10 11:08

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
^ Yes. For some reason, it doesn't install it - despite me explicitly stating that it should. On the plus side it automaticaly removes it when you uninstall PhoneStream.

So yeah just force install it. It's only needed if you're planning to scp the generated file over to your desktop PC.

tetris11_ 2011-03-10 11:10

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
Quote:

Originally Posted by gendor (Post 964760)
Thank you, this is awesome! Would you consider providing the source?

It's a bit messy at the moment, and Im reluctant to share my infant coding with you guys.
I have my pride, dammit.

gendor 2011-03-10 12:52

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
Quote:

Originally Posted by tetris11_ (Post 964798)
It's a bit messy at the moment, and Im reluctant to share my infant coding with you guys.
I have my pride, dammit.

How about just sharing the gst-launch parameters that you used, or maybe a short tutorial on how to use expect with gstreamer and any tips/tricks you picked up?

I've played around with gstreamer a little bit, but it's not always so easy to get the parameters right without slowing down the N900 too much. I've never heard of expect before seeing it in your dependencies - it seems like nice quick-and-dirty way to do scripting.

datjomp 2011-03-10 13:33

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
I tried it and it works for me.
When i try with the front camera I get a permanent red light in the front.
Seems like a bad thing??

txh 2011-03-10 13:46

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
I think this is a great idea.

tetris11_ 2011-03-10 14:19

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
Quote:

Originally Posted by gendor (Post 964866)
How about just sharing the gst-launch parameters that you used, or maybe a short tutorial on how to use expect with gstreamer and any tips/tricks you picked up?

I've played around with gstreamer a little bit, but it's not always so easy to get the parameters right without slowing down the N900 too much. I've never heard of expect before seeing it in your dependencies - it seems like nice quick-and-dirty way to do scripting.

Oh right! Well I pretty much just used the gstreamer scripts from this page: http://wiki.maemo.org/Streaming_vide...uilt-in_webcam
And the expect package isn't used for gstreamer at all, it's just a hassle free way of sending files between machines!

Alfred 2011-03-10 15:18

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
works great. I wonder if i can somehow use the ip of the meachine that is not in my net, for example over internet?

tetris11_ 2011-03-10 16:04

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
dont see why not!

m4r0v3r 2011-03-10 16:35

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
since all this works, how can I feed the video into an actual webcam device on linux?. and great work btw, there have been a few threads around and I spent hours trying to make it work through command line but it never did, and this, this worked first try, much appreciated.

tetris11_ 2011-03-10 17:07

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
I'm making a new release that will have a webcam (and Xout) feature very soon.
However, this method will only work for linux - and even then it relies on some handiwork on your end.

See this post:http://talk.maemo.org/showpost.php?p=964477&postcount=7

It requires you to build v4l2loopback on your PC, which is something I cannot do on my end.

m4r0v3r 2011-03-10 18:17

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
I have v4l2loopback on my pc after some work, but I don't understand how I could work it into the SDP file though.

tetris11_ 2011-03-10 18:30

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
Quote:

Originally Posted by m4r0v3r (Post 965114)
I have v4l2loopback on my pc after some work, but I don't understand how I could work it into the SDP file though.

The new release isn't going to generate a sdp file for the webcam (sdp is purely for VLC), I'm gonna generate a bash script that you have to run.

I'm very nearly finished implemeting it.....

m4r0v3r 2011-03-10 18:45

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
i dont mind waiting for somethings thats as good as this

handaxe 2011-03-10 19:05

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
Quote:

Originally Posted by datjomp (Post 964888)
I tried it and it works for me.
When i try with the front camera I get a permanent red light in the front.
Seems like a bad thing??

This obviously should not be. Until tetris11_ finds a fix, install a program called "mirror" and run it and then close it. Mirror uses the front camera and will turn off the led.

tetris11_ 2011-03-10 19:30

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
Ah wow, I have mirror on my phone and didn't think twice that the app would depend on it. Good shout!

Let me add it to the dependencies before I release.....

handaxe 2011-03-10 19:34

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
Woa! tetris11_, what "depend on it"?

I meant using mirror as a way to get the led to turn off until you find out why it doesn't turn off after closing your app.

tetris11_ 2011-03-10 20:05

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
*shrug* Both our phones have mirror installed and work fine with the app. m4r0v3r doesn't have mirror and it doesn't work fine.....
Better to be safer than sorry :D

handaxe 2011-03-10 20:09

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
Ah, I see you were referring to m4r0v3r's case and not datjomp's.

By the way, does your orange LED for the front camera turn off after you stop streaming? I ask because mine and datjomp's do not (and hence the mirror work around).

Have fun (you seem to be....)

tetris11_ 2011-03-10 20:37

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
I have fun always!
Okay I just released a major update, where you can now stream to a webcam (for linux), or to an X Window (for linux).

It's called phonestreamer_0.0.2_armel.deb, and it was a ***** to build....

couldvbb 2011-03-10 20:55

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
I am using tester_0.0.4_armel.deb,need to update phonestreamer_0.0.2_armel.deb?

Thank you for help

handaxe 2011-03-10 21:20

Re: [Announce] PhoneStreamer - Nifty little app for streaming to your PC
 
@tetris11_ : check the deb. Error: "dpkg: error processing phonestreamer_0.0.2_armel.deb (--install):
trying to overwrite `/usr/share/applications/hildon/tester.desktop', which is also in package tester"

Will still install with:
Code:

sudo dpkg --force-install -i phonestreamer_0.0.2_armel.deb
and seems to work (it loads, I have not checked function).


All times are GMT. The time now is 16:23.

vBulletin® Version 3.8.8