![]() |
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
Quote:
Also: although I'm using Linux/Unix 99% of my time, I'm still interested to get it working on Windows for that other 1% :S |
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
When I want to use gstreamer I am going to get an error in the dataflow and when I want to use gstreamer AND VLC, it will give me no stream and some ugly errors.
Can you post your exact commands? |
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
http://talk.maemo.org/showthread.php...136#post566136
You'll have to install gstreamer on your devices, of course... |
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
Quote:
|
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
Hi all,
I managed to use the N900 camera stream to my PC as a webcam (that you can use in other programs such as Skype) on Ubuntu Linux. It is pretty easy to do using gstreamer, the scripts allready available here and v4l2loopback. Here is how to do it: First on your PC install v4l2loopback kernel module and the gstreamer plugin gst-v4l2loopback. These are available on the following links: https://v4l2loopback.googlecode.com/hg/ https://github.com/umlaeute/gst-v4l2loopback Good instructions how to compile and run it can be found here: http://www.kudanai.com/2010/11/howto...webcam-in.html Once you get this up and running, on your device execute the following code (same as allready posted here) Code:
gst-launch v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=640,height=480 ! ffmpegcolorspace ! smokeenc ! udpsink host=192.168.1.255 port=1234Code:
gst-launch udpsrc port=1234 ! smokedec ! ffmpegcolorspace ! v4l2loopback device=/dev/video0This will create a new videodevice that shows the N900 camera stream. Now in Skype you can select that video device and here you go! |
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
it's nice man ! too bad it's only for linux... couldn't you do the same for windows ?? But thx man, it's great !
|
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
windows isn't so userfriendly so it will be a bit difficult to make a solution.
the linux way is perfect. thanks for this. |
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
any way to do this on windows??
|
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
Any way to give it a higher birate through gstreamer or something?
Its got lots of pixelation. Anyone got it working with ffdec_h264? Everything I try on the n900 basically spits out: could not link videoscale/v4l2src/whatever to ffdec_h264 |
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
Quote:
|
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
Quote:
Bumping thread up, cant see it on the first couple of pages |
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
No one has tried higher quality streams? The furtherest I got was use jpegenc, the quality was great but I could figure out how to get it to /dev/video0, it would only show up in its own window.
|
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
Quote:
|
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
I figured it out if anyone cares.
n900: Code:
gst-launch v4l2camsrc device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=640,height=480 ! ffmpegcolorspace ! dsph264enc ! rtph264pay ! udpsink host=192.168.2.14 port=1234Code:
gst-launch-0.10 udpsrc port=1234 caps="application/x-rtp" ! rtph264depay ! ffdec_h264 ! ffmpegcolorspace ! v4l2loopback device=/dev/video0 sync=falseCan anyone else test it? EDIT:: I changed it to use jpeg instead of h264, seems to a lot less delay, the tint is still there though. n900: Code:
gst-launch v4l2camsrc device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=640,height=480 ! ffmpegcolorspace ! jpegenc ! rtpjpegpay ! udpsink host=192.168.2.14 port=1234Code:
gst-launch-0.10 udpsrc port=1234 caps="application/x-rtp" ! rtpjpegdepay ! jpegdec ! ffmpegcolorspace ! v4l2loopback device=/dev/video0 sync=false |
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
Still no break true yet for windows users
|
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
Quote:
|
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
Doesn't the VLC player got a way to use it's output as the video feed of a virtual "webcam" ?
|
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
2 Attachment(s)
Quote:
here VLC stream but not tested. tested - confirmed working with h264 codec on VLC player :rolleyes: |
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
I haven't tried this yet, actually i didn't even knew about this one before finding it with Google, try at your own risk:
http://sourceforge.net/projects/vlvc/ edit: erm, sorry it seems it might not be what you're looking for.... |
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
Hi,
Thanks for the great work. I can now get the video streaming via WIFI (though there is a bit of a green tint to the screen). Has anyone been able to get the camera to stream vie bluetooth yet. This would be much better for me to use. Cheers for any help. |
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
Hey guys,
I had a bit of a go at learning QT yesterday, and created an App for streaming video/audio from the N900 to VLC media player on the PC. Here's the video showing it: http://www.youtube.com/watch?v=wfU9uf-lOvQ I made it as a sort of personal **** you to my Windows-fag mates to show them how awesome linux is! It's pretty much just a frontend for gst-launch, but with less of the fiddly bits, and can even a generate the .sdp VLC file for your PC (ish). All you need to do is type in the IP adress of your desktop, and choose whether you want audio or video. (You can also choose image size, front/back camera, etc.) Hope you guys like it :) |
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
and...... it is available where to like? :)
|
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
Lol :D
There's one teeny tiny minor (possibly major) bug in it that doesn't stop the camera from streaming after you close the app. (It starts as a new process that you have to manually kill yourself, which probably isnt that safe for the average user.) But give it another week and I'll probably have that down, and then I'll release it for testing. PS: If anyone can help me with understanding how to terminate a QProcess on application exit, I'd really appreciate it! Edit: Okay, kinda fixed the continuing streaming problem (but it still exists if you exit the app improperly).... gonna have a look at it later again Edit2: Nope. Done, app seems to work well |
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
QProcess.kill or terminate stops the process but leave it in memory if the app is not run as root and from conky you still see the outgoing process. To solve it I get the PID from the started process and run QProcess::execute("sudo kill PID") when you stop the process or close the app. For the improperly exited app situation, you may try a sudo killall for gst-launch at mainwindow constructor to clean from previous process, if any.
|
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
Also, which encode do you use? dsph264enc jpegenc?
|
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
Yeah lol, the sudo kill is pretty much what I did to stop it!
My main problem is the QCoreApplication::exit() thing which I dont understand, but I know is VERY neccesary for running a kill script before the application terminates.... And yep Im using dsph264enc for VLC at the moment, but I plan on giving the option for jpegenc, and smokeenc in the future.... (though there's no way smoke can be used through VLC) |
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
Quote:
|
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
Ah, another hint: if the stream is started before the camera lens cover, video will be without autofocus and auto white balance etc. You may add a banner at app start just to remind to open it if video streaming is planned to get used.
|
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
Quote:
And total and complete thanks for the hints dude! That streaming problem is now completely sorted! :D:D:D I'm just gonna give it a few more run throughs, and tidy it up aesthetically abit, and I'll release it tomorrow! Again, thanks ALOT man! |
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
3 Attachment(s)
Okay, it's finished. The newest install is on the attachment.
Workaround: http://talk.maemo.org/showpost.php?p...&postcount=152 Edit2: If the app appears to do nothing (i.e. no streaming), then make sure gst-tools, rootsh, and expect are installed on your phone. "sudo apt-get install gst-tools rootsh expect" Edit3: If it's crashing when you click "generatesdp", then launch the app from terminal "/usr/local/bin/tester" but not as root. Repeat NOT as root. It's called PhoneStreamer in case you guys are looking for the icon after install. If you are using this app for the first time (which I imagine it probably is for most of you guys), then push the "ShowDebugConsole" button and generate both an audio and video sdp file for your desktop. After generating the sdp file, you can then click "Send sdp to Linux Desktop" if you are a linux user, where it will prompt you for username and password and then send it straight to your PC's desktop. For now just play around with it: choose your settings -> hit stream -> open sdp file on desktop. (then point your desktop webcam at your pc screen, maximise VLC, and show the people on AIM or MSN, the ups and downs of your neighbourhood or the state of your room or even the inside of your fridge....) PS: BIG thanks to gionni88 who pointed me in the right direction and saved me from hoooours of painful work, and justice4all3000 for finding the workaround, and leetnoob who thoroughly tested it and found major bugs. Thanks guys! 0.0.3 Fixed: Bug where wrong sdp is generated, hopefully implemented workaround for titans power kernel. latest deb:External Mirror |
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
just installed it and i have been unable to connect to the stream any advice?
|
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
Installed, and it works ofc. Good job!
Some points: Do you kill the process directly? I guess you do, since the front camera indicator led doesn't shut down as it should. You have to stop it with terminate() and after few secs you kill it. In this way it has time to handle its own close events (like shutting down front camera led indicator). Window title is "MainWindow", guess you have already realized it. Settings don't get saved between one session and another one: you may use QSettings to do it. Ui is fingerfoe: have you set a main layout in desiner? Top right corner (object subwindow) > right click on main window > layout> vertical layout. ShowDebug button is not so needed, it can be swapped with maemo standard banners (QMaemo5InformationBox, and add QT += maemo5 in project file, than run qmake) to save space. The calibrate window is in window style? Use a message box with detailed text instead (QMessageBox) to be more hildon oriented. Binary is a bit big just to be a front end. Have you compiled it as release or debug? Package is not optified, it installs in /usr/local/bin |
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
Quote:
|
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
when clicking Generate sdp file, it freezes and craches.
|
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
Quote:
Code:
QProcess*proc = new QProcess();Quote:
Quote:
Quote:
Quote:
Quote:
Thanks for the feedback man, I can't promise I'll get it done soon since I've been ignoring other work of mine... but hopefully in a few weeks...:D Edit: I also forgot to add dependencies, and am now editing my control file.... |
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
Quote:
Can you print me the full readout of "sudo ifconfig" from your phone? (do: "sudo ifconfig > /home/user/MyDocs/output.txt" and then copy that file) ALSO: wow I cant believe I forgot to mention this:: you need to have gst-tools and rootsh installed before using this app. VERY IMPORTANT. I'm implementing this in now. |
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
yeah i entered my computers ip address and generated the sdp for it could it be a firewall or router issue?
|
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
well you need to post me the output so I can see what going on.
I think it crashes because you don't have rootsh installed on your system, so the "sudo ifconfig" command is not recognised. Or if you do, then you have other connections other than "wlan0". But I really need to see that output before I change anything. |
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
hey thanks for your app but unfortunately it doesn't work for me either.
when i click on generate file it just crash. theres no output.txt so heres what i get when i launch it from a root terminal: Nokia-N900:~# tester ASSERT failure in QList<T>::at: "index out of range", file /home/tetris11/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim//usr/include/QtCore/qlist.h, line 455 Aborted hope this helps you |
Re: [Maemo 5] Camera stream from N900 to PC? (N900 as webcam)
Cheers, but Im fairly new at this and have no idea what that error means or what it references to...
Im pretty sure this is related to your ifconfig output, so can you just do: "sudo ifconfig > /home/user/MyDocs/output.txt" on your device, then copy the output.txt here? |
| All times are GMT. The time now is 09:53. |
vBulletin® Version 3.8.8