[FFmpeg-user] Streaming flv with ffserver
Luke
l1 at newanswertech.com
Tue Jun 24 11:51:51 CEST 2014
I've been having so much trouble streaming ASF to windows (or streaming anything
else, really), I thought I would try FLV, using the example at:
https://trac.ffmpeg.org/wiki/Streaming%20media%20with%20ffserver#streaming.264videowithAACaudioinFLVformat
My camera is not seeming to support H264 natively (actually it does, it's my old
version of video4linux2 that doesn't recognize it), so I'm having to use mjpeg,
which may or may not be my problem.
ffmpeg -f oss -i /dev/dsp2 -f v4l2 -vcodec mjpeg -i /dev/video0 -f ffm
http://video..com:5430/g.ffm
I will say, before I give the output, that I think the problem is that my
compiled version of ffmpeg, did not come with many preset files, and did not
come with any "medium" or libx264_medium preset.
So unless it's internal to the library (which may not be a thing), I don't have
it on either machine, and that is probably the issue.
ffmpeg version 2.2.git
Copyright (c) 2000-2014 the FFmpeg developers
built on Jun 12 2014 02:47:30 with gcc 4.4.7 (Debian 4.4.7-2)
configuration: --prefix=/usr/local/ffmpeg_build
--extra-cflags=-I/usr/local/ffmpeg_build/include
--extra-ldflags=-L/usr/local/ffmpeg_build/lib --bindir=/usr/local/bin
--extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac
--enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
libavutil 52. 89.100 / 52. 89.100
libavcodec 55. 66.100 / 55. 66.100
libavformat 55. 43.100 / 55. 43.100
libavdevice 55. 13.101 / 55. 13.101
libavfilter 4. 7.100 / 4. 7.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, oss, from '/dev/dsp2':
Duration: N/A, start: 1403602168.115474, bitrate: 1536 kb/s
Stream #0:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
Input #1, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1403602168.385406, bitrate: N/A
Stream #1:0: Video: mjpeg, yuvj422p(pc), 640x480, -5 kb/s, 30 fps, 30 tbr,
1000k tbn, 1000k tbc
[swscaler @ 0xa02a300] deprecated pixel format used, make sure you did set range
correctly
No pixel format specified, yuvj422p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0xa002880] broken ffmpeg default settings detected
[libx264 @ 0xa002880] use an encoding preset (e.g. -vpre medium)
[libx264 @ 0xa002880] preset usage: -vpre <speed> -vpre <profile>
[libx264 @ 0xa002880] speed presets are listed in x264 --help
[libx264 @ 0xa002880] profile is optional; x264 defaults to high
Output #0, ffm, to 'http://video..com:5430/g.ffm':
Metadata:
creation_time : now
Stream #0:0: Audio: aac (libfdk_aac), 44100 Hz, stereo, s16, 128 kb/s
Metadata:
encoder : Lavc55.66.100 libfdk_aac
Stream #0:1: Video: h264, 320x240, q=2-31, 512 kb/s, 30 fps, 1000k tbn, 30
tbc
Metadata:
encoder : Lavc55.66.100 libx264
Stream mapping:
Stream #0:0 -> #0:0 (pcm_s16le (native) -> aac (libfdk_aac))
Stream #1:0 -> #0:1 (mjpeg (native) -> h264 (libx264))
Error while opening encoder for output stream #0:1 - maybe incorrect parameters
such as bit_rate, rate, width or height
ffserver config:
Port 5430
BindAddress 192.168.1.2
MaxHTTPConnections 50
MaxClients 45
MaxBandwidth 2000000
CustomLog /var/log/ffserver.log
<Feed g.ffm>
File /home/vidstream/.g.ffm
FileMaxSize 100MB
</Feed>
<Stream g.flv>
feed g.ffm
Format flv
VideoCodec libx264
VideoFrameRate 30
VideoBitRate 512
AVOptionVideo crf 23
AVOptionVideo preset medium
AVOptionVideo flags +global_header
VideoSize 320x240
AudioCodec aac
Strict -2
AudioBitRate 128
AudioChannels 2
AudioSampleRate 44100
AVOptionAudio flags +global_header
PreRoll 15
</Stream>
More information about the ffmpeg-user
mailing list