{"id":390,"date":"2011-01-28T00:30:38","date_gmt":"2011-10-29T21:51:50","guid":{"rendered":"http:\/\/kraftek.com\/blog\/vlc-http-streaming-from-a-tv-card\/"},"modified":"2011-01-28T00:30:38","modified_gmt":"2011-10-29T21:51:50","slug":"vlc-http-streaming-from-a-tv-card","status":"publish","type":"post","link":"\/blog\/index.php\/vlc-http-streaming-from-a-tv-card\/","title":{"rendered":"vlc http streaming from a TV card"},"content":{"rendered":"<pre>I got a TV card, it appears like this in lspci:\n 01:08.0 Multimedia controller: Philips Semiconductors SAA7131\/SAA7133\/SAA7135 Video Broadcast\n Decoder (rev d1)\n In order to stream 3 simultaneous streams, very low, low and high quality, you can do this:\n\n\n #!\/bin\/ksh\n #\n \/sbin\/modprobe saa7134-alsa\n sleep 2\n DEV=\/dev\/tvcard\n ps -ef | grep -i vlc | grep -v grep |grep -i $DEV | awk '{ print $2 }'| while read P;do\n kill -9 $P\n done\n VBR=96\n ABR=24\n W=320\n H=240\n ### --deinterlace-mode {discard,blend,mean,bob,linear} : deinterlacing mode (default: discard)\n # width=320,height=240 qpmax=40 x264{crf=5,profile=extended,level=1.0}\n # :standard{access=http{user=video,pwd=cable},mux=asf,dst=0.0.0.0:8088}\n #\n venc=x264{level=2,nr=1000,me=tesa,b-pyramid,bitrate=64,ref=4,b-adapt=2,bframes=2,partitions=all, keyint=2500}\n VLC=\"\/usr\/local\/bin\/cvlc --logo-file \/disk2\/logox.png v4l2:\/\/$DEV :input=2 :standard=8 :input-slave=alsa:\/\/hw:1\n ,0 --alsa-samplerate=32000 --deinterlace-mode linear --sout \"\n 35\/433\n VERYLOW=\"transcode{vcodec=h264,acodec=mp4a,channels=1,width=160, height=120,vb=24,ab=16,venc=x264{bframes=0,leve\n l=5,nr=1000,b-pyramid,b-adapt=2, hurry-up},audio-sync,sfilter=logo}:standard{access=http,dst=0.0.0.0:8011\/stream\n .flv}\"\n LOW=\"transcode{vcodec=h264,acodec=mp4a,channels=1,width=${W},height=${H},vb=${VBR},ab=${ABR},venc=x264{bframes=\n 0,level=5,nr=1000,b-pyramid,b-adapt=2},audio-sync,sfilter=logo}: standard{access=http,dst=0.0.0.0:8012\/stream.fl\n v}\"\n 36\/433\n HIGH=\"transcode{vcodec=h264,acodec=mp4a,channels=2,ab=128,venc=x 264{bframes=0,level=5,nr=1000,b-pyramid,b-adapt\n =2,hurry-up},deinterlace,audio-sync,sfilter=logo}:standard{access=http,dst=0.0.0.0:8013\/stream.flv}\"\n \/usr\/local\/bin\/v4l2-ctl -d $DEV --set-tuner=stereo\n \/usr\/local\/bin\/v4l2-ctl -d $DEV --set-standard=0\n \/usr\/local\/bin\/ivtv-tune -d $DEV -t us-cable -c3\n #--- audio codecs can be mpga or mp3 or m4a\n #--- mux can be ogg,ts,mp4,asf,ps,mpeg1,asfh, mpjpeg\n #--- low quality\n #$VLC \"#$VERYLOW\"\n #--- low quality\n #$VLC \"#$LOW\"\n #--- LAN quality\n #$VLC \"#$HIGH\"\n #---- single command, high quality AND low quality using h264_vdpau and x264 as encoder\n $VLC \"#duplicate{dst=\"$VERYLOW\",dst=\"$LOW\",dst=\"$HIGH\"}\"\n #$VLC \"#duplicate{dst=\"$VERYLOW\",dst=\"$HIGH\"}\"\n #$VLC \"#duplicate{dst=\"$LOW\",dst=\"$HIGH\"}\"\n #$VLC \"#duplicate{dst=\"$VERYLOW\",dst=\"$LOW\"}\"\n \n\n\"#duplicate\" is used in order to have 2 streams working simultaneously from the same input device, for each\n output srteam we use a \"dst=\"\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I got a TV card, it appears like this in lspci: 01:08.0 Multimedia controller: Philips Semiconductors SAA7131\/SAA7133\/SAA7135 Video Broadcast Decoder (rev d1) In order to stream 3 simultaneous streams, very low, low and high quality, you can do this: #!\/bin\/ksh # \/sbin\/modprobe saa7134-alsa sleep 2 DEV=\/dev\/tvcard ps -ef | grep -i vlc | grep -v [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-390","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/390","targetHints":{"allow":["GET"]}}],"collection":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=390"}],"version-history":[{"count":0,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/390\/revisions"}],"wp:attachment":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=390"},{"taxonomy":"post_tag","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}