Primo tentativo, con problema:

[alessandro@wk-ps2 ~]$ ffserver & ffmpeg -f video4linux2 -i /dev/video0 http://localhost:8090/feed1.ffm
[1] 5838
WARNING: gnome-keyring:: couldn't connect to: /home/alessandro/.cache/keyring-pOPBJk/pkcs11: No such file or directory
ffserver version 1.0.8 Copyright (c) 2000-2013 the FFmpeg developers
built on Sep 12 2013 11:57:09 with gcc 4.7 (Debian 4.7.2-5)
configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libvpx --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-librtmp --enable-avfilter --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/x86_64-linux-gnu --disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-frei0r --enable-openssl --enable-libass --enable-libopus --enable-fontconfig --enable-libfdk-aac --enable-libdc1394 --disable-altivec --dis libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 59.100 / 54. 59.100
libavformat 54. 29.104 / 54. 29.104
libavdevice 54. 2.101 / 54. 2.101
libavfilter 3. 17.100 / 3. 17.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
WARNING: gnome-keyring:: couldn't connect to: /home/alessandro/.cache/keyring-pOPBJk/pkcs11: No such file or directory
ffmpeg version 1.0.8 Copyright (c) 2000-2013 the FFmpeg developers
built on Sep 12 2013 11:57:09 with gcc 4.7 (Debian 4.7.2-5)
configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libvpx --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-librtmp --enable-avfilter --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/x86_64-linux-gnu --disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-frei0r --enable-openssl --enable-libass --enable-libopus --enable-fontconfig --enable-libfdk-aac --enable-libdc1394 --disable-altivec --dis
 libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 59.100 / 54. 59.100
libavformat 54. 29.104 / 54. 29.104
libavdevice 54. 2.101 / 54. 2.101
libavfilter 3. 17.100 / 3. 17.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Tue Nov 5 11:01:47 2013 FFserver started.
[video4linux2,v4l2 @ 0x2541c80] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 4773.411603, bitrate: 117964 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 117964 kb/s, 24 tbr, 1000k tbn, 24 tbc
Tue Nov 5 11:01:48 2013 127.0.0.1 - - [GET] "/feed1.ffm HTTP/1.1" 200 4175
Missing audio stream which is required by this ffm
[alessandro@wk-ps2 ~]$

Tentativo che ha funzionato:

[alessandro@wk-ps2 ~]$ ffmpeg -f alsa -i hw:0 -f video4linux2 -i /dev/video0 'http://localhost:8090/feed1.ffm'
WARNING: gnome-keyring:: couldn't connect to: /home/alessandro/.cache/keyring-pOPBJk/pkcs11: No such file or directory
ffmpeg version 1.0.8 Copyright (c) 2000-2013 the FFmpeg developers
built on Sep 12 2013 11:57:09 with gcc 4.7 (Debian 4.7.2-5)
configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libvpx --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-librtmp --enable-avfilter --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/x86_64-linux-gnu --disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-frei0r --enable-openssl --enable-libass --enable-libopus --enable-fontconfig --enable-libfdk-aac --enable-libdc1394 --disable-altivec --dis
 libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 59.100 / 54. 59.100
libavformat 54. 29.104 / 54. 29.104
libavdevice 54. 2.101 / 54. 2.101
libavfilter 3. 17.100 / 3. 17.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
[alsa @ 0x14cec80] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, alsa, from 'hw:0':
Duration: N/A, start: 1383651665.232479, bitrate: 1536 kb/s
Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
[video4linux2,v4l2 @ 0x14b2500] Estimating duration from bitrate, this may be inaccurate
Input #1, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 10731.363578, bitrate: 117964 kb/s
Stream #1:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 117964 kb/s, 24 tbr, 1000k tbn, 24 tbc
Tue Nov 5 12:41:06 2013 127.0.0.1 - - [GET] "/feed1.ffm HTTP/1.1" 200 4175
Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
Metadata:
encoder : Lavf54.29.104
Stream #0:0: Audio: mp2, 44100 Hz, mono, s16, 32 kb/s
Stream #0:1: Video: mpeg1video, yuv420p, 160x128, q=2-31, 64 kb/s, 1000k tbn, 24 tbc
Stream #0:2: Audio: wmav2, 22050 Hz, mono, s16, 64 kb/s
Stream #0:3: Video: msmpeg4v3, yuv420p, 352x240, q=2-31, 256 kb/s, 1000k tbn, 24 tbc
Stream mapping:
Stream #0:0 -> #0:0 (pcm_s16le -> mp2)
Stream #1:0 -> #0:1 (rawvideo -> mpeg1video)
Stream #0:0 -> #0:2 (pcm_s16le -> wmav2)
Stream #1:0 -> #0:3 (rawvideo -> msmpeg4)
Press [q] to stop, [?] for help
Input #0, alsa, from 'default':
Duration: N/A, start: 1383660248.314794, bitrate: 1536 kb/s
Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
[video4linux2,v4l2 @ 0x978ba0] Estimating duration from bitrate, this may be inaccurate
Input #1, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 19314.613970, bitrate: 117964 kb/s
Stream #1:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 117964 kb/s, 24 tbr, 1000k tbn, 24 tbc
Tue Nov 5 15:04:09 2013 127.0.0.1 - - [GET] "/feed1.ffm HTTP/1.1" 200 4175
Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
Metadata:
encoder : Lavf54.29.104
Stream #0:0: Audio: mp2, 44100 Hz, mono, s16, 32 kb/s
Stream #0:1: Video: mpeg1video, yuv420p, 160x128, q=2-31, 64 kb/s, 1000k tbn, 24 tbc
Stream mapping:
Stream #0:0 -> #0:0 (pcm_s16le -> mp2)
Stream #1:0 -> #0:1 (rawvideo -> mpeg1video)
Press [q] to stop, [?] for help
[alsa @ 0x93ac80] ALSA buffer xrun.
frame= 14 fps=0.0 q=5.5 size= 24kB time=00:00:01.68 bitrate= 116.8kbits/s

[alessandro@wk-ps2 ~]$ mplayer 'http://localhost:8090/test1.mpg'
MPlayer git-ab94fc6-4.4.3 (C) 2000-2010 MPlayer Team
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing http://localhost:8090/test1.mpg.
Resolving localhost for AF_INET6...
Couldn't resolve name for AF_INET6: localhost
Resolving localhost for AF_INET...
Connecting to server localhost[127.0.0.1]: 8090...
Cache size set to 320 KBytes
Cache fill: 0.00% (0 bytes) nop_streaming_read error : Resource temporarily unavailable
Cache fill: 0.00% (0 bytes)
Cache not filling!
nop_streaming_read error : Resource temporarily unavailable
Cache not filling!
nop_streaming_read error : Resource temporarily unavailable
Cache not filling!
nop_streaming_read error : Resource temporarily unavailable
Cache not filling!


Exiting... (End of file)
[alessandro@wk-ps2 ~]$

On line dal 05 novembre 2013

< Torna al livello superiore <
<< Torna alla pagina inziale <<