Monday, June 4, 2012

android ip webcam v4l2loopback test

defualt setting did not work on my lubuntu laptop.
but with some searching on the web i found a work around for the video im not working on the audio workaround yet. 6moy2012.


workaround video tested on chease google chrome chat,
and other apps etc...


xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

https://github.com/umlaeute/v4l2loopback/wiki/Mplayer


producer


again a dummy producer, using gstreamer
gst-launch -v videotestsrc ! "video/x-raw-yuv,width=640,height=360,framerate=30/1,format=(fourcc)I420" ! v4l2sink device=/dev/video1



#refresh google crome to gstreamer test patern.
#test worked for me. 6moy2012.

zzzzzzzzzzzzzzzzzzzzzzzzzz

consumer


minimal mplayer playback:

$ mplayer tv:// -tv device=/dev/video1

or use chease and lode dummy video device.

zzzzzzzzzzzzzzzzzzzzzzzz

laptop cam share ass dummy video device.
dummy producer, using gstreamer
dummy:

$ gst-launch -v v4l2src ! videorate ! "video/x-raw-yuv,width=320,height=240,framerate=5/1" ! v4l2sink device=/dev/video1


WORKED shares camera, dummy loopback device.

####



###################

iphone"

$ gst-launch souphttpsrc location=192.168.1.75:8080/strm ! jpegdec ! ffmpegcolorspace ! v4l2loopback device=/dev/video1

---------------------

lenovo a1 tablet???

$ gst-launch souphttpsrc location="http://192.168.1.75:8080/videofeed" ! jpegdec ! ffmpegcolorspace ! v4l2sink device=/dev/video1



consumer

minimal mplayer playback

mplayer tv:// -tv device=/dev/video1


-------------------------

ipwebcam-gst , https://github.com/bluezio/ipwebcam-gst/
download: shell scrypt, https://github.com/bluezio/ipwebcam-gst/


-- pavucontrol
The sound recording device (input)
for your videochat application should be changed to the
'Monitor of Null Sink' using pavucontrol.


--

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
https://github.com/umlaeute/v4l2loopback/wiki/Mplayer

producer

again a dummy producer, using gstreamer
gst-launch -v videotestsrc ! "video/x-raw-yuv,width=640,height=360,framerate=30/1,format=(fourcc)I420" ! v4l2sink device=/dev/video1


#refresh google crome to gstreamer test patern.
#test worked for me. 6moy2012.
zzzzzzzzzzzzzzzzzzzzzzzzzz
consumer

minimal mplayer playback:
$ mplayer tv:// -tv device=/dev/video1

or use chease and lode dummy video device.
zzzzzzzzzzzzzzzzzzzzzzzz
laptop cam share as dummy video device.
dummy producer, using gstreamer
dummy:
$ gst-launch -v v4l2src ! videorate ! "video/x-raw-yuv,width=320,height=240,framerate=5/1" ! v4l2sink device=/dev/video1

WORKED shares camera, dummy loopback device.
####

###################
iphone"

$ gst-launch souphttpsrc location=192.168.1.75:8080/strm ! jpegdec ! ffmpegcolorspace ! v4l2loopback device=/dev/video1


---------------------

lenovo a1 tablet???

$ gst-launch souphttpsrc location="http://192.168.1.75:8080/videofeed" ! jpegdec ! ffmpegcolorspace ! v4l2sink device=/dev/video1




consumer


minimal mplayer playback

mplayer tv:// -tv device=/dev/video1


-------------------------
ipwebcam-gst , https://github.com/bluezio/ipwebcam-gst/
download: shell scrypt, https://github.com/bluezio/ipwebcam-gst/


-- pavucontrol
The sound recording device (input)
for your videochat application should be changed to the
'Monitor of Null Sink' using pavucontrol.


--

mkv vlog on an acer aod d255e netbook laptop

matroska mkv vlog muxing with gstreamer.

tested on lubuntu linux.



#!/bin/bash
#
# test auto vlog1 [ naming] scrypt and capture by rooki wardcraft chobo.
##############################
##ffmpeg -r 15 -b 800k -s 640x400 -f video4linux2 -i /dev/video0 \
## -vcodec msmpeg4v2 -f alsa -ac 2 -vol 512 -i hw:0,0 vlog111div3-vol512_alsa.avi
##
####
#gs mkv 640x480 or small 320x240
###############################
cd /home/username/vlog4gs-mkv &&
sleep 1
pwd &&

sleep 2 &
DIR=/home/username/vlog4gs-mkv

touch vv0.mkv &&

gst-launch v4l2src ! videorate ! video/x-raw-yuv,width=320,height=240,framerate=5/1 ! \
ffmpegcolorspace ! \
tee name="tscreen" ! queue ! autovideosink tscreen. \
! queue ! videorate ! video/x-raw-yuv,framerate=25/2 ! \
theoraenc bitrate=500 ! queue ! matroskamux name=mux alsasrc ! queue ! audioconvert ! vorbisenc quality=0.5 \
! queue ! queue ! mux. mux. ! queue ! tee name=teefile ! queue \
! filesink location=vv0.mkv teefile. &&


sleep 2

for old in `ls ~/vlog4gs-mkv/*0.mkv` ; do today=~/vlog4gs-mkv/mkv_external.mic.video.`date +%F+Hour%H+Min%M+Sec%S`-vlog0video0.MKV ; mv $old $today; done



blogger webpage formatting will clobber the script a little.

ogm acer aod d255e laptop mic gstreamer vlog

getting gstreamer and laptop mic to play well together.
script below works on my acer laptop running lubuntu.

internal mic works but is a lot weeker sounding then a external anolog mic.

mic can be boosted a liitle by gnome alsa mixer.


#!/bin/bash
#
# test auto vlog1 [ naming] scrypt and capture by rooki chobo.
##############################
##ffmpeg -r 15 -b 800k -s 640x400 -f video4linux2 -i /dev/video0 \
## -vcodec msmpeg4v2 -f alsa -ac 2 -vol 512 -i hw:0,0 vlog111div3-vol512_alsa.avi
##
###############################
cd /home/username/vlog2gs-no-timestamp &&
sleep 1
pwd &&

sleep 2 &
DIR=/home/username/vlog2gs-no-timestamp

touch vv0.ogg &&

gst-launch v4l2src ! videorate ! video/x-raw-yuv,width=320,height=240,framerate=5/1 ! \
ffmpegcolorspace ! \
tee name="tscreen" ! queue ! autovideosink tscreen. \
! queue ! videorate ! video/x-raw-yuv,framerate=25/2 ! \
theoraenc bitrate=400 ! queue ! oggmux name=mux alsasrc device=hw 0 ! queue ! audioconvert ! vorbisenc quality=0.2 \
! queue ! queue ! mux. mux. ! queue ! tee name=teefile ! queue \
! filesink location=vv0.ogg teefile. &&


sleep 2

for old in `ls ~/vlog2gs-no-timestamp/*0.ogg` ; do today=~/vlog2gs-no-timestamp/ogm_laptop.mic.video.`date +%F+Hour%H+Min%M+Sec%S`-vlog0video0.OGM ; mv $old $today; done




blogger web page formating will clobber the script layout.

Thursday, November 3, 2011

linux dlna upnp mediatomb fuse and djmount

a short very short how to stream videos from on linux pc to other local linux pc's on the same
lan.



/**************************
*** over the same router **
**************************/

[routers2]
I tried streaming video threw to
routers and the results sucked.
So keep the pc on the same router for best
video playback.


[software]
steaming software for linux.


[server]
MEDIAtomb its in all most all normal distros
repositories.


*mediatomb for the back end if connected via lan
on the same router.

[options]
[server]
ushare needed to be built from source on my
debian lenny pc but it's in most ubuntu repositories.


*ushare if conected to the same router over wifi.
[ushare] for streaming music to my att uverse settop box.

[why]
lan or wifi?
passwords?
mediatomb needs to be set up over its web-ui
and your going to want to set up a password for the web-ui or disable the web-ui after your done doing the setup because the web-ui exposes your entire pc file structure and files.


I like mediatomb .
The config file is located at
[ /home/"username"/.mediatomb/config.xml ]
start mediatomb up in console the kill it with Ctrl+c and then edit the config file to your own liking.


##########################################

[players]
[xbmc]
playback over upnp/home-dlna with
players [xbmx or djmount with fuse]

################################

UBUNTU i use xbmc for playback.

XBMC on my lubuntu11.04 laptop it was easy to find in a ppa for xbmc so i used xbmc for playback testing over wifi.
I had gnewSense running as a mediatomb server connented via lan to a linksys router that was connected to a 2wire-wifi router that server the internet and wifi for my laptop and running threw to routers was very buggy at best using [mediatomb and xbmc]. I never did stream a entire movie because i'm easily distracted and
i don't like xbmc that much because it sucks at multitasking.



so how about i switch to two desktops connected to the same 2wire-router and with mdeiatomb and djmount.


[Meiatomb and djmount]
mediatomb running on gnewSense.


################################

DEBIAN i used.
[Mediatomb and djmount]
djmount and fuse running on Debian/lenny/mepis8

/**********************************
*** fuse and djmount a little buggy **
**********************************/
Djmount compiled from source was a little buggy but worked.

djmount and ushare depends.
stuff like libfuse-dev and other crap
and run ldconfig for safe measures.

compile and install it normally
i think djmount it needs ./configure --enable-dlna

but i may be wrong it could be USHARE that needed that pluss lib avcodecs and devs pluss [libdlna-0.2.3.tar.bz2]

##################################

how to use fuse and djmount to mount a upnp network service.


------------------

directory= (upnp.fuse)

step1/3


su:

$ modprobe -l -t /home/"username"/upnp/upnp.fuse fuse



--------------------

then mount the upnp [mediatomb] service

step2/3



$ djmount /home/"username"/upnp/upnp.fuse


then wait for to two pc to handshake and then you can browse the upnp mount point like a normal
readonly file directory. any files added two your mediatomb server-pc should show up on your local-pc and play back fin with mplayer or some other player.

to dismount i tried [fuse] but it failed
on my debian/lenny pc so i used umount as root and that worked for me.


-------------------------------

dismount [fuse] fails:
su

fusermount -u /home/"username"/upnp/upnp.fuse




this works:
su

$ umount -l upnp.fuse



----------------------------------

a hard won victory. now i need to get some sort
of settop box that does upnp/home-dlna