Stream videa - ffmpeg

Ondrej Koala Vacha koala na vju.cz
Středa Únor 16 10:29:22 CET 2005


DObry den,

jako druhy server po Helios jsem zkousel ffmpeg 
http://ffmpeg.sourceforge.net.


# ffserver -f fconf.conf 
ffserver started.
127.0.0.1 - - [Wed Feb 16 10:17:33 2005] "GET /ld2004.ffm HTTP/1.0" 200 8245
127.0.0.1 - - [Wed Feb 16 10:18:29 2005] "GET /stat.html HTTP/1.1" 200 1863

Prvni problem byl, ze s dodanym ffmpeg.conf se to nechtelo rozjet, z mne 
neznameho duvodu tam musi byt pritomna sekce pro avi stream.


# ./ffmpeg -vd /dev/video0 http://localhost:8090/ld2004.ffm
ffmpeg version 0.4.9-pre1, build 4742, Copyright (c) 2000-2004 Fabrice 
Bellard
  configuration:  --enable-mp3lame 
  built on Feb 14 2005 23:16:01, gcc: 3.3.4 (pre 3.3.5 20040809)
Input #0, video4linux, from '':
  Duration: N/A, bitrate: N/A
  Stream #0.0: Video: rawvideo, yuv420p, 352x288, 15.00 fps
Input #1, audio_device, from '':
  Duration: N/A, bitrate: N/A
  Stream #1.0: Audio: pcm_s16le, 22050 Hz, mono, 352 kb/s
Output #0, ffm, to 'http://localhost:8090/ld2004.ffm':
  Stream #0.0: Audio: mp3, 22050 Hz, mono, 64 kb/s
  Stream #0.1: Video: mpeg4, 352x288, 15.00 fps, q=3-31, 256 kb/s
Stream mapping:
  Stream #1.0 -> #0.0
  Stream #0.0 -> #0.1
[mpeg4 @ 0x82f591c]removing common factors from framerate
Press [q] to stop encoding
[mpeg4 @ 0x82f591c]rc buffer underflow
[mpeg4 @ 0x82f591c]rc buffer underflow=0.4 bitrate= 959.2kbits/s 



ffmpeg jede, http://localhost:8090/stat.html ukazuje 
Connection Status 
2 ld2004.ffm(input) 127.0.0.1 HTTP/1.0 RECEIVE_DATA 320k 332k 2166k 

Pokus o cteni ld2004.avi vsak skonci padem ffserver-u :(


Nemate prosim nekde stream videa do netu rozbehany nebo vite o nejakem 
hezkem HOWTO? Netrvam ani na Helix ani ffmpeg.

s diky

--
Ondrej Koala Vacha




-----------------------------------------------------
# cat ffmpeg.conf:
Port 8090
BindAddress 0.0.0.0
MaxClients 1000
MaxBandwidth 2000
CustomLog -
NoDaemon

<Feed ld2004.ffm>
File /tmp/ld2004.ffm
FileMaxSize 10G
# Only allow connections from localhost to the feed
ACL allow 127.0.0.1
</Feed>

<Stream ld2004.avi>
Feed ld2004.ffm
Format avi
AudioBitRate 64
AudioChannels 1
VideoBitRate 256
VideoFrameRate 15
VideoSize cif
AudioCodec mp3
VideoCodec mpeg4
VideoQMin 3
VideoQMax 31
VideoHighQuality
VideoGopSize 30
</Stream>

<Stream stat.html>
Format status
ACL allow localhost
ACL allow 192.168.0.0 192.168.255.255
</Stream>
<Redirect index.html>
URL http://ffmpeg.sourceforge.net/
</Redirect>





Další informace o konferenci Linux