Eu corri ffserver -d -f /etc/ffserver.conf
e está sendo executado.
Agora eu quero pegar um arquivo de vídeo e transmiti-lo para este servidor.
Eu corri no mesmo computador:
$ ffmpeg -re -i intro.avi -strict -2 http://localhost:8090/feed1.ffm
ffmpeg version 3.4.1-1~14.04.york0 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
configuration: --prefix=/usr --extra-version='1~14.04.york0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libmodplug --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
WARNING: library configuration mismatch
avcodec configuration: --prefix=/usr --extra-version='1~14.04.york0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libmodplug --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, avi, from 'intro.avi':
Metadata:
encoder : VirtualDubMod 1.5.4.1 (build 2178/release)
IAS1 : English
IAS2 : Russian
Duration: 00:00:45.59, start: 0.000000, bitrate: 2833 kb/s
Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x544 [SAR 1:1 DAR 45:34], 2434 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 23.98 tbc
Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:2: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, fltp, 192 kb/s
[tcp @ 0x7f5a33c04300] Connection to tcp://localhost:8090 failed (Connection refused), trying next address
[tcp @ 0x7f5a33c68b00] Connection to tcp://localhost:8090 failed (Connection refused), trying next address
Stream mapping:
Stream #0:1 -> #0:0 (ac3 (native) -> mp2 (native))
Stream #0:0 -> #0:1 (mpeg4 (native) -> mpeg1video (native))
Stream #0:1 -> #0:2 (ac3 (native) -> wmav2 (native))
Stream #0:0 -> #0:3 (mpeg4 (native) -> msmpeg4v3 (msmpeg4))
Press [q] to stop, [?] for help
[mpeg1video @ 0x7f5a33c7c240] bitrate tolerance 21333 too small for bitrate 64000, overridingpeed=N/A
[mpeg1video @ 0x7f5a33c7c240] MPEG-1/2 does not support 3/1 fps, there may be AV sync issues
Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
Metadata:
creation_time : now
IAS1 : English
IAS2 : Russian
encoder : Lavf57.83.100
Stream #0:0: Audio: mp2, 44100 Hz, mono, s16, 32 kb/s
Metadata:
encoder : Lavc57.107.100 mp2
Stream #0:1: Video: mpeg1video, yuv420p(progressive), 160x128 [SAR 18:17 DAR 45:34], q=2-31, 64 kb/s, 23.98 fps, 1000k tbn, 3 tbc
Metadata:
encoder : Lavc57.107.100 mpeg1video
Side data:
cpb: bitrate max/min/avg: 128000/0/64000 buffer size: 327680 vbv_delay: -1
Stream #0:2: Audio: wmav2, 22050 Hz, mono, fltp, 64 kb/s
Metadata:
encoder : Lavc57.107.100 wmav2
Stream #0:3: Video: msmpeg4v3 (msmpeg4), yuv420p, 352x240 [SAR 675:748 DAR 45:34], q=2-31, 256 kb/s, 23.98 fps, 1000k tbn, 15 tbc
Metadata:
encoder : Lavc57.107.100 msmpeg4
Side data:
cpb: bitrate max/min/avg: 512000/0/256000 buffer size: 327680 vbv_delay: -1
Past duration 0.748741 too large
[ac3 @ 0x7f5a33c04900] incomplete frame 2316kB time=00:00:45.36 bitrate= 418.2kbits/s dup=1 drop=1334 speed= 1x
frame= 138 fps=3.0 q=2.4 Lq=2.0 size= 2380kB time=00:00:45.66 bitrate= 426.9kbits/s dup=1 drop=1363 speed=0.998x
video:1777kB audio:534kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.974102%
Agora eu configurei o VLC para reproduzir esse fluxo em outro computador:
http://myserver:8090/test1.mpg
e tem uma qualidade muito ruim. Resolução muito baixa, muitas vezes interrompe e congela.
É possível obter qualidade do YouTube?