Page 1 of 2

Transcoding a webcam

PostPosted: Sun Jan 16, 2011 5:40 pm
by jenhek
Hi,

I would like to sent a webcam stream to my Sony.

Any idea how to realize that?

Currently the webcam runs with the following ffserver configuration:

  Code:
Port 8080
BindAddress 0.0.0.0
MaxClients 1000
MaxBandwidth 10000
# Comment the following, on production use
NoDaemon

<Feed feed1.ffm>
    File /tmp/feed1.ffm
    FileMaxSize 100K
    Launch ffmpeg -r 10 -s 320x240 -f video4linux2 -i /dev/video0
</Feed>

# SWF output
<Stream test.swf>
    Feed feed1.ffm
    Format swf
    VideoCodec flv
    VideoFrameRate 15
    VideoBitRate 800
    VideoQMin 5
    VideoQMin 5
    VideoSize 320x240
    PreRoll 0
    Noaudio
</Stream>


Comments appreciated.

Re: Transcoding a webcam

PostPosted: Sun Jan 16, 2011 6:13 pm
by zip
Live streams are not supported

Re: Transcoding a webcam

PostPosted: Sun Jan 16, 2011 6:42 pm
by jenhek
Is there a "hard" reason for that?

Couldn't I setup a pipe with the feed from the source that serviio just transmits?

Re: Transcoding a webcam

PostPosted: Sun Jan 16, 2011 6:53 pm
by Cerberus
DLNA doesnt not allow this kind of streaming...

Re: Transcoding a webcam

PostPosted: Sun Jan 16, 2011 7:14 pm
by zip
jenhek wrote:Is there a "hard" reason for that?

Couldn't I setup a pipe with the feed from the source that serviio just transmits?

There is no reason, it just has not been implemented. Maybe once I implement online streaming, feeds, etc it could be done.

Re: Transcoding a webcam

PostPosted: Thu Jan 20, 2011 6:41 pm
by tombert
Cerberus wrote:DLNA doesnt not allow this kind of streaming...

Thats not a matter of DLNA.

Re: Transcoding a webcam

PostPosted: Thu Jan 20, 2011 7:17 pm
by Cerberus
well to be honest thats up to zip but serviio is a DLNA media server ie it uses the dlna protocol but if he wanted to add that feature he would have to use a different protocol to do it..

Re: Transcoding a webcam

PostPosted: Thu Jan 20, 2011 7:22 pm
by tombert
then you should have wrote "serviio doesn't allow ..." and not "DLNA doesn't allow ..."

Re: Transcoding a webcam

PostPosted: Thu Jan 20, 2011 7:28 pm
by Cerberus
nope i was right DLNA is a type of protocol and DLNA doesnt not support live streams.

Re: Transcoding a webcam

PostPosted: Thu Jan 20, 2011 7:55 pm
by tombert
Hi,

then please have a look here:
http://www.dlna.org/about_us/roadmap/DL ... epaper.pdf

DLNA is a protocol offering streamed content no matter if it's coming from a web-cam, a movie or audio file. In principle one could implement a DLNA server directly into an webcam.
For the protocol it makes no difference if it's comming 'live' or recorded ... in fact DLNA doesn't even know the 'real' source of the file you'r playing ... that's the reason why you could see the filename movie.avi on your TV but streaming an mpeg movie.

Re: Transcoding a webcam

PostPosted: Thu Jan 20, 2011 8:30 pm
by zip
tombert is right.... this could be done in a similar way as video feeds etc

Re: Transcoding a webcam

PostPosted: Thu Jan 20, 2011 8:33 pm
by Zek
Cerberus wrote:nope i was right DLNA is a type of protocol and DLNA doesnt not support live streams.


I'm no expert but I think there are live streams in DLNA. DLNA.ORG_FLAGS bit 26 and 27:
UPNP_DLNA_FLAGS_S0_INCREASE Content does not have a fixed beginning
UPNP_DLNA_FLAGS_SN_INCREASE Content does not have a fixed end

Plus my Synology is streaming live soutcasts faking as Music files.

Cheers,
Zek

Re: Transcoding a webcam

PostPosted: Thu Jan 20, 2011 9:36 pm
by Cerberus
Zek wrote:
Cerberus wrote:nope i was right DLNA is a type of protocol and DLNA doesnt not support live streams.


I'm no expert but I think there are live streams in DLNA. DLNA.ORG_FLAGS bit 26 and 27:
UPNP_DLNA_FLAGS_S0_INCREASE Content does not have a fixed beginning
UPNP_DLNA_FLAGS_SN_INCREASE Content does not have a fixed end

Plus my Synology is streaming live soutcasts faking as Music files.

Cheers,
Zek



yer that could be possible by Faking the protocol into thinking it was a set file, not sure how you would do it tho..

Re: Transcoding a webcam

PostPosted: Thu Jan 20, 2011 9:42 pm
by zip
a file is not necessary, just a stream of bytes - it can come from a file or a web resource, doesn't matter

Re: Transcoding a webcam

PostPosted: Thu Jan 20, 2011 11:04 pm
by tombert
Cerberus wrote:yer that could be possible by Faking the protocol into thinking it was a set file, not sure how you would do it tho..


... the Client (Renderer) does not see any files which it has access to - it's not like you connect a USB drive and then browse through the files ... DLNA doesn't know FAT, NTFS, EXT or samba share ... it doesn't even know what a "file" is - speaking in strictly terms.

You have to separate the presentation completely from the content. The "files" you see on your TV are only a list of items to play - the name "file" is confusing though because it can be anything - the correct name would be "stream". So these items can be anything you want them to be like a real file, a content coming from the internet, a webcam stream ... it even can be your computer desktop streamed to your TV. So as it knows no "files" there is no faking them ...

Also what might help in understanding: your TV has two players built in - one accessing your DLNA content - the other playing files from your USB. In fact they are so completely different that on some TVs you can play avis natively but via DLNA it doesn't - dont mix this up!

hope that helps in understanding ...

Re: Transcoding a webcam

PostPosted: Sun Jan 23, 2011 7:46 pm
by gerryo
I stumbled across this while searching for info on how to stream live tv to my Samsung C series TV.
I had been using VLC to stream (http or mms), works well on PC's, can't get this working with my new Samsung.

I installed Serviio & can view most media formats, but don't have live or internet streams.

I was thinking the only was was to stream to a 'fake' file & serve this to the TV, hopefully I won't have to do that as
it introduces loads of other problems. From what I've managed to find out, it should be possible
to get the tv to accept media that has unknown content length.

I have tried using cling (DLNA) workbench to send media to the Samsung. Send-to works for regular files, but not
for live http streams (perhaps because there is no .avi or .mkv in the url.

I'd appreciate any pointers as to what's the best way to go.

Re: Transcoding a webcam

PostPosted: Sun Jan 23, 2011 8:11 pm
by tombert
I can point you to a few applications that claim to do so:
http://www.playon.tv/playon
http://www.wildmediaserver.com/

A more exhaustive list is here:
http://www.rbgrn.net/content/21-how-to- ... x-or-linux
... but a bit old ...

I've never tested on of those ... so if you gain experience please let me/us know.

Similar issue was already discussed here:
viewtopic.php?f=3&t=255&p=4755&hilit=internet#p4755

Re: Transcoding a webcam

PostPosted: Sun Jan 23, 2011 9:00 pm
by Cerberus
playon and wildmedia server dont support webcam but a few users have requested that feature but to do it from what im reading they would VLC so serviio would be able to do it that way because of licencing. it also seem to work using the HTTP protocol so maybe it will be possible once Zip adds webcontent like HULU.


Playon: http://www.playon.tv/forum/feedback/pla ... eam-source

wildmediaserver: http://www.wildmediaserver.com/forum/vi ... bcam#p1495

videolan ( VLC ) : http://www.videolan.org/ ( i can not work out if its GNU licenced or not )


i may be wrong in this thinking but that how it looks to me..

Re: Transcoding a webcam

PostPosted: Sun Jan 23, 2011 9:11 pm
by tombert
I thought he was talking about internet TV ... but could be wrong ...

Re: Transcoding a webcam

PostPosted: Sun Jan 23, 2011 9:14 pm
by tombert
How about a workaround: Make a mini web-page showing your web-cam ... and this you can stream via playon or something else ...