Streaming audio and video Currently
working with VLC on chianti and clitunno from file and tv card to a single
computer or the whole network. To prepare the files, see compression and mencoder manual. Works for embedded flash movies encoded with mencoder. Software and Guides
vlc streaming commands
vlc -vvv /tv5/2006/2006-02/2006-02-14/2006-02-14_05:00_KCET_BBC_World_News.avi You should be able to use this feature to create an instant playlist -- but it will have to be a playlist of files without a colon in their names.
Stream a file to a designated machine, skip the gui: vlc file.avi -I dummy --sout udp://128.97.221.35:8080 --loopThe more recent syntax also works -- note the single quotes, and add "vlc:quit" to quit after the file is played: vlc file.avi -I dummy --sout '#std{access=udp,mux=ts,dst=128.97.221.35:5900}' vlc:quitReceive: vlc udp://@:8080Stream a file to the network (again, single quotes mandatory): vlc file.avi -I dummy --sout '#std{access=mmsh,dst=:8080}' --ttl 12 vlc:quitReceive: vlc mmsh://chi:8080Streaming to a Windows Media Player (not tested -- and clearly not as good as VLC): vlc -vvv my_file -I dummy --sout \Receive in WMP: mms://128.97.221.36:8080 Stream from a web cam (tested and works!): vlc -I dummy v4l:/dev/video0:size=320x240 --sout '#std{access=mmsh,dst=:8080}'Receive: vlc mmsh://spello:8080Stream from television (source, see also howto) -- use this to find tv channel frequencies: scantv - scan a v4l device for TV stationsStream tv to a single designated machine: vlc --color v4l:/dev/video2:norm=ntsc:frequency=77250:size=640x480:channel=5:\Receive: vlc udp://@:8080Stream tv to the network: vlc --color v4l:/dev/video2:norm=ntsc:frequency=77250:size=640x480:channel=5:\Receive: vlc mmsh://chi:8080Tested and works. Stream a DVD, title 2 and chapter 1, on spello Works: unicastNo luck streaming a DVD multicast. While spello can't do the on-the-fly encoding, a faster machine would be able to. Note that according to the list of features, you have to use ASF muxing for MMSH, and TS muxing for UDP -- the two are not interchangeable. VLC video on demand (VOD) See Howto tna@chianti:~$ vlc --ttl 12 --color -I telnet --rtsp-host 128.97.221.38:8080It requires a web server and other resources -- VOD is a very big consumer of resources for the server and the network. VOD is unicast, not multicast. This means that if 50 clients are doing VOD with the same server, watching a 5 Mbit/s MPEG 2 video, the resources needed as a minimum are the following :I'll hold off for now. ffmpeg A user gave this streaming command on trevi: ffmpeg -loop -flags +bitexact -dct fastint -idct simple -y -f pgmyuv -i vsynth1/%02d.pgm http://127.0.0.1:9999/feed1.ffmThe test files are in /src/ffmpeg-my/tests/vsynth1. The pgm extension means portable graymap format (grayscale), supported by ffmpeg and possibly used for streaming? So as far as I can see, the vsynth1 files -- the pgm files -- are streamed to port 9999 on the local server, but what's the point of that and where does the data go? For details see /etc/ffserver.conf. MPlayer
Flash
Creating a Macromedia Flash video suitable for playback in a web browser
with the Macromedia Flash plugin works great. You must start with a file that does not use B-frames. Read the file
into avidemux and see the messages in console -- they will tell you if
the file has B-frames. Save as HUFFYUV to remove all B-frames (it's an
mpeg thing). Then issue, which sets the bitrate and does the following: mencoder input.avi -o output.flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc \The "-of lavf" command relies on the libavformat library from the ffmpeg project, in Marillat's version from February 2006. The resulting file plays perfectly in VLC 0.8.5-test1 and ffplay, and acceptably in mplayer. Xine plays the video but not the sound. The files stream perfectly with a standard swf player I found on the net that embeds the flv file in a web page and gives you player controls. This works in Windows but not yet in Linux amd64 -- the swfdec player can't handle it yet. On Linux i386 it works, but the movie is extremely jerky. The main thing is it works in Windows and hopefully OSX. To stream, use this type of html -- this assumes the player and movie are in the same directory: <td width="60"> </td>The player.swf I found at MediaCollege.com (see forum) will scale with whatever size you give it -- change height and width at will. The length appears to be ignored; you could try to set a correct length in seconds. This gives a beautiful result in Windows and lets students play the file at will -- it's likely harder on the server than VLC multicast. MediaCollege is also releasing the MC Media Player, check the forum for updates. QuickTime Quicktime allows you to start playing a movie at a particular timecode.
See the info below from
It should be possible to make Quicktime movies in Linux, and this may
be a good format for distribution -- and possibly also for presentations. codec: h264There is a setting in the conversion dialogue to optimize for streaming which allows the video to stream during download as opposed to waiting for the download to complete. Embed code - super simple, straight off the quicktime website: ------------------------------ echo "<OBJECT CLASSID=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\" WIDTH=\"".$v_width."\" HEIGHT=\"".$v_height."\" CODEBASE=\"http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0\" id=\"video\"> <PARAM NAME=\"NAME\" VALUE=\"video\"> <PARAM NAME=\"SRC\" VALUE=\"video/".$video."\"> <PARAM NAME=\"SCALE\" VALUE=\"".$scale."\"> <PARAM NAME=\"AUTOPLAY\" VALUE=\"".$autoplay."\"> <PARAM NAME=\"KIOSKMODE\" VALUE=\"TRUE\"> <PARAM NAME=\"PLUGINSPAGE\" VALUE=\"http://www.apple.com/quicktime/download/preview/\"> <EMBED NAME=\"video\" WIDTH=\"".$v_width."\" HEIGHT=\"".$v_height."\" SCALE=\"".$scale."\" AUTOPLAY=\"".$autoplay."\" CONTROLLER=\"TRUE\" TARGET=\"myself\" SRC=\"video/".$video."\" PLUGINSPAGE=\"http://www.apple.com/quicktime/download/preview/\" KIOSKMODE=\"TRUE\"></EMBED> </OBJECT>"; ------------------------------- Cf. original. This should allow apache to serve quicktime files -- KFA does this, not tested here. The downside is that this method doesn't seem to have a working Linux client. Real Media Installation history 12 March 2006 -- streaming flash workingb I tested the new mencoder to see if it can create flv flash
movies, and it can! They play fine in ffplay and 32-bit vlc, but not
64-bit vlc: mencoder input.avi -o output.flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc \Set up a directory in spello:/share/media with a player I wgetted from the net somewhere, and it works! Though not in Linux amd64. Windows is perfect, OSX hopefully also, and Linux i386 is jerky, not very good, but it plays. I then simply copied those working files to merton, and verified I can stream flash from the 128 class site -- it just works! I set the player to be executable, not sure that was needed. 12 February 2006 -- streaming from vlc working Stream from televison (source, see also howto) to a single designated machine: vlc --color v4l:/dev/video2:norm=ntsc:frequency=77250:size=640x480:channel=5:\This works -- chianti chugs away at 21% cpu utilization, and vlc's menu "stream and media information" shows video stream codec i420 and audio codec araw. And I can receive it: udp://@:8080Clear picture and sound!!! This is the first-ever streaming video I've set up. Note this is the udp protocol that broadcasts to a specific machine. Stream from television to the network: vlc --color v4l:/dev/video2:norm=ntsc:frequency=77250:size=640x480:channel=5:\But there's a problem -- I get "access_output_http private error: failed to create avahi client: An unexpected DBUS error occured", the same error I got on spello. This appears to be an application error; you can get fresh packages from vlc's amd64 nightly svn builds -- I got today's vlc and wxvlc and updated the libavahi files. VLC now runs -- and broadcasts! Receive: vlc mmsh://chi:8080This works! On Spello and Cyberspace, I downloaded vlc and wxvlc 0.8.5-svn20060219-0_i386 from videolan and upgraded the avahi packages. I ran vlc on Spello first, to generate the ~./vlc files which streaming appears to require, and then copied these to cyberspace. This may mean user root will not be able to stream. I also copied the /usr/local/bin/stream script to both machines. Streaming works flawlessly from both Spello and Cyberspace.
|
|
|
|
|||||
Maintained by Francis F. Steen, Communication Studies, University of California Los Angeles |