Page 1 of 1

switching logo file during encoding

Posted: 01 Jan 2005 14:47
by Newswatch
Hi everyone,

I would like to do streaming of live feed from a webcam. During the streaming I would like to encode additional information into the stream, like generating dynamic subtitles or a moving logo. At the moment I think of some kind of gameshow where I would like to display the points gained by each player so far as a subtitle and modify that according to the progress of the players.

Or is it possible to have two videostreams merged into one? So I would have one stream which holds some scrolling text which could be overlayed over the live feed from the camera.

It would be nice if you would think about implementing theses features.

Regards

Newswatch

Posted: 01 Jan 2005 17:11
by markfm
For text-oriented items, I would probably use the marquee (text banner) function, which is dynamically changeable. If you are doing something like a point score, you might want to use a --freetype-font that is fixed, not proportional (something like a courier or an Arial monotype variant).

Posted: 01 Jan 2005 23:55
by Newswatch
Thanks for that hint. This should work, if I can change the text to be displayed during encoding. I will give it a try.
Again I find out that vlc is a very powerful tool with a lot of functions. The problem is, that not all of them are documented. I were neither lucky at the online-manuals nor at the src/doc folder. I finally found the option using "vlc --longhelp", but not much information on how to use it - but I'm sure I will find out.

Posted: 02 Jan 2005 00:18
by Guest
marq-x, marq-y control position on the video frame. the freetype options control the font used, and its size. marq-text controls the text itself.

the time sfilter can also have text. you could have marq dynamic in one area of the screen, and a time display of, for instance, "Camera Name yyyy-mm-dd hh:mm:ss"

Posted: 02 Jan 2005 09:44
by Newswatch
Thanks again. Using the commandline

Code: Select all

./vlc.exe --loop --sout-transcode-sfilter="logo,marq" --logo-file="c:\programme\videolan\vlc\vlc-0.8.1\logo150.png" --freetype-font="c:\windows\fonts\adlibn.ttf" --marq-marquee="Test Text" --marq-x="10" --marq-y="10" --sout='#transcode{vcodec=DIV3,vb=240,scale=1,acodec=mp3,ab=192,channels=2}:duplicate{dst=std{access=mmsh,mux=asfh,url=:8080}}' "c:\movie.avi"
on vlc 0.8.1 Windows I get my logo and the text working. Both are streamed correctly and can be seen in the Windows Media Player.

But now once again my question: Is there a way to change the text during the playback? I just have access to the marq-sfilter from the commandline which I cannot change once the streaming started.

The only way to do something like that was to have two instances of vlc. The first one grabs the video from the webcame and encodes the marq-text. This video is then delivered to the second instance of vlc which is running a playlist. In this playlist a video just showing a blank screen is a defined in addition to the stream of the first instance. In order to switch the text I need to switch to the blank screen in the second instance of vlc. Then stopp the first instance of vlc and restart it with a different marq-text. Then in the second instance of vlc I need to switch back to the stream of the first instance of vlc.

Is there an easier way to do it? I don't like to have this blank dummy-video during switching. And I cannot use three instances of vlc (one for grabbing from the webcam and encoding marq-text 1, one for grabbing from the webcam and encoding marq-text 2, one for recieving the streams and switching to the appropriate one) as the webcam can only be addressed by one instance of vlc at the same time.

My idea as stated in the first post would be to switch between different logos or have vlc reread the logofile every second or so. Thus I could put my text into different logofiles and change the text by renaming the files to the filename specified on the command-line.