Fórum Ubuntu CZ/SK

Ubuntu pro osobní počítače => Multimédia => Téma založeno: kukuraj 16 Ledna 2014, 09:46:18

Název: Streamovani z webkamery po siti na serveru ( bez gui )
Přispěvatel: kukuraj 16 Ledna 2014, 09:46:18
Zdravím vespolek, potřeboval bych radu. Mám webkameru připojenou k 12.04 server. Chtěl bych streamovat video na web nebo ukládat do souboru a nemůžu to rozchodit. Kamera se zdá funkční a podporovaná ( genius facecam 321 ID 0458:7089 ) příkaz dmesg:

Kód: [Vybrat]
[438213.292151] usb 1-3: new high-speed USB device number 2 using ehci_hcd
[438213.695750] Linux video capture interface: v2.00
[438213.752467] uvcvideo: Found UVC 1.00 device FaceCam VGA (0458:7089)
[438213.758645] input: FaceCam VGA as /devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3:1.0/input/input6
[438213.760005] usbcore: registered new interface driver uvcvideo
[438213.760068] USB Video Class driver (1.1.1)
[438213.963235] usbcore: registered new interface driver snd-usb-audio
[438215.072934] usb 1-3: USB disconnect, device number 2
[438215.376156] usb 1-3: new high-speed USB device number 3 using ehci_hcd
[438215.551902] uvcvideo: Found UVC 1.00 device FaceCam VGA (0458:7089)
[438215.557403] input: FaceCam VGA as /devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3:1.0/input/input7

poté instalace vlc-nox

dle návodu na https://help.ubuntu.com/community/Webcam v části VLC zkouším příkaz:
Kód: [Vybrat]
$vlc v4l2:///dev/video0
VLC media player 2.0.8 Twoflower (revision 2.0.8a-0-g68cf50b)
[0x8d2a098] inhibit interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[0x8d2a098] main interface error: no suitable interface module
[0x8d1d7f8] main interface error: no suitable interface module
[0x8d09908] main libvlc error: interface "globalhotkeys,none" initialization failed
[0x8d09908] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[0x8e67cb8] [cli] lua interface: Listening on host "*console".
VLC media player 2.0.8 Twoflower
Command Line Interface initialized. Type `help' for help.
> [0x8d2ac50] v4l2 demux error: cannot open device '/dev/video0': Permission denied
[0x8e290c8] v4l2 access error: cannot open device '/dev/video0': Permission denied
[0xb71005f0] main input error: open of `v4l2:///dev/video0' failed
[0xb71005f0] main input error: Your input can't be opened
[0xb71005f0] main input error: VLC is unable to open the MRL 'v4l2:///dev/video0'. Check the log for details.
calší pokus s clvc:
Kód: [Vybrat]
~$ cvlc v4l2:///dev/video0
VLC media player 2.0.8 Twoflower (revision 2.0.8a-0-g68cf50b)
[0x8d5d008] inhibit interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[0x8d5d008] main interface error: no suitable interface module
[0x8c12718] main interface error: no suitable interface module
[0x8bfe908] main libvlc error: interface "globalhotkeys,none" initialization failed
[0x8c12718] dummy interface: using the dummy interface module...
[0xb7100960] v4l2 demux error: cannot open device '/dev/video0': Permission denied
[0xb7104678] v4l2 access error: cannot open device '/dev/video0': Permission denied
[0xb7300648] main input error: open of `v4l2:///dev/video0' failed
[0xb7300648] main input error: Your input can't be opened
[0xb7300648] main input error: VLC is unable to open the MRL 'v4l2:///dev/video0'. Check the log for details.

Dotaz zní: kde najdu ten odkazovaný log a co dělám špatně ? Děkuji
Název: Re:Streamovani z webkamery po siti na serveru ( bez gui )
Přispěvatel: Dano V 16 Ledna 2014, 09:58:52
Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Určite sa niekto ozve čo ti helpne ;)
>>>kde je log (http://ubuntuforums.org/showthread.php?t=1331884)<<<
how-to-setup-streaming-server-via-vlc (http://minimaldevelop.com/blog/how-to-setup-streaming-server-via-vlc/)
how-to-stream-a-webcam-to-http-with-vlc (http://www.linuxquestions.org/questions/linux-desktop-74/how-to-stream-a-webcam-to-http-with-vlc-929319/)
linux-webcam-server (http://www.moreno.marzolla.name/software/linux-webcam-server/)
Název: Re:Streamovani z webkamery po siti na serveru ( bez gui )
Přispěvatel: kukuraj 16 Ledna 2014, 10:56:05
Tak log bych měl, ale po spuštění

Kód: [Vybrat]
cvlc v4l2:// :v4l2-vdev="/dev/video0" --sout '#transcode{vcodec=x264{keyint=60,idrint=2},vcodec=h264,vb=400,width=368,heigh=208,acodec=mp4a,ab=32 ,channels=2,samplerate=22100}:duplicate{dst=std{access=http{mime=video/x-ms-wmv},mux=asf,dst=:8082/stream.wmv}}' --no-sout-audio
je výstup opět dost podobný :(
Kód: [Vybrat]
VLC media player 2.0.8 Twoflower (revision 2.0.8a-0-g68cf50b)
[0x9ee2d40] inhibit interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[0x9ee2d40] main interface error: no suitable interface module
[0x9ee2d40] logger interface: using logger.
[0x9ed4538] main interface error: no suitable interface module
[0x9ec1908] main libvlc error: interface "globalhotkeys,none" initialization failed
[0x9ed4538] dummy interface: using the dummy interface module...
[0xb7105cb8] v4l2 demux error: cannot open device '/dev/video0': Permission denied
[0xb7108d48] v4l2 access error: cannot open device '/dev/video0': Permission denied
[0xb7300648] main input error: open of `v4l2://' failed
[0xb7300648] main input error: Your input can't be opened
[0xb7300648] main input error: VLC is unable to open the MRL 'v4l2://'. Check the log for details.
Název: Re:Streamovani z webkamery po siti na serveru ( bez gui )
Přispěvatel: Dano V 16 Ledna 2014, 11:12:27
play-a-video-with-vlc-in-x11-from-remote-terminal (http://stackoverflow.com/questions/9636268/play-a-video-with-vlc-in-x11-from-remote-terminal)
 mohlo by vysvetliť   Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
EDIT:
Ako náhradu by si mohol skúsiť Motion (http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome) tu
na fóre sa to niekde preberalo v súvislosti s ip kamerou
Název: Re:Streamovani z webkamery po siti na serveru ( bez gui )
Přispěvatel: kukuraj 17 Ledna 2014, 06:57:58
Díky moc za rady a nasměrování. Nicméně to VLC se mi nějak nedařilo. Skončil jsem v bodě, kdy mě obraz z kamery zobrazovaly v terminálu ascii znaky a neustále nějaké problémy. Zkusil jsem ten ffmpeg, ten mě fungoval relativně hned. Nicméně dokážu ho dostat do stavu, kdy spustím server, dokážu z kamery nahrát .avi na disk, nicméně nedokážu nastreamovat na web .asf. Jdu zkoumat core dump protože mě to cely padne při spuštění výstupu kamery na http :(
Název: Re:Streamovani z webkamery po siti na serveru ( bez gui )
Přispěvatel: Dano V 17 Ledna 2014, 07:43:43
Skús pozrieť sem FFMpeg and FFServer (http://www.area536.com/projects/streaming-video/)
Název: Re:Streamovani z webkamery po siti na serveru ( bez gui )
Přispěvatel: BudweiserCZ 17 Ledna 2014, 11:09:41
Jak psal Dano V - motion je lepší  :) sám mám webku na tomto serveru a jsem spokojen :) . Jen si musíš trochu pohrát s configem :D