[FFmpeg-user] Can't get ffplay to read a stream from ffserver. Configuration problem?

bzb.dev001 bzb.dev001 at gmail.com
Tue Jul 30 04:12:52 CEST 2013


My system is running Lubuntu 12.04 64bit

$ uname -a
Linux myhostname 3.2.0-49-generic #75-Ubuntu SMP Tue Jun 18 17:39:32 UTC 
2013 x86_64 x86_64 x86_64 GNU/Linux


I downloaded the snapshot of ffmpeg-2.0 sources on July 29, 2013.  And 
built it as follows.

$ ./configure --prefix=/somelocation --enable-libmp3lame 
--enable-libx264 --enable-gpl
$ make
$ sudo make install


I proceeded to configure the ffserver.conf as shown below.


ffserver.conf
-------------
Port 8090
BindAddress 0.0.0.0
MaxHTTPConnections 5
MaxClients 5
MaxBandwidth 1000
CustomLog -
NoDaemon
<Feed videofeed1.ffm>
File /tmp/videofeed1.ffm
FileMaxSize 200K
Launch ffmpeg
ACL allow 127.0.0.1
ACL allow 192.168.1.0 192.168.1.255
</Feed>
<Stream videostream1.mpg>
Feed videofeed1.ffm
Format mpeg
AudioBitRate 32
AudioChannels 1
AudioSampleRate 22050
VideoBitRate 64
VideoBufferSize 40
VideoFrameRate 3
VideoSize 160x128
VideoGopSize 12
ACL allow localhost
ACL allow 192.168.1.0 192.168.1.255
</Stream>


The ffserver is started.

$ ffserver -d -f /somelocation/ffserver.conf
ffserver version 2.0 Copyright (c) 2000-2013 the FFmpeg developers
   built on Jul 29 2013 18:57:52 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
   configuration: --prefix=/somelocation --enable-libmp3lame 
--enable-libx264 --enable-gpl
   libavutil      52. 38.100 / 52. 38.100
   libavcodec     55. 18.102 / 55. 18.102
   libavformat    55. 12.100 / 55. 12.100
   libavdevice    55.  3.100 / 55.  3.100
   libavfilter     3. 79.101 /  3. 79.101
   libswscale      2.  3.100 /  2.  3.100
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  3.100 / 52.  3.100
Mon Jul 29 21:24:26 2013 FFserver started.
Mon Jul 29 21:24:26 2013 Launch command line: ffmpeg 
http://127.0.0.1:8090/videofeed1.ffm
ffmpeg version 2.0 Copyright (c) 2000-2013 the FFmpeg developers
   built on Jul 29 2013 18:57:52 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
   configuration: --prefix=/somelocation --enable-libmp3lame 
--enable-libx264 --enable-gpl
   libavutil      52. 38.100 / 52. 38.100
   libavcodec     55. 18.102 / 55. 18.102
   libavformat    55. 12.100 / 55. 12.100
   libavdevice    55.  3.100 / 55.  3.100
   libavfilter     3. 79.101 /  3. 79.101
   libswscale      2.  3.100 /  2.  3.100
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  3.100 / 52.  3.100
Mon Jul 29 21:24:26 2013 127.0.0.1 - - New connection: GET /videofeed1.ffm
Mon Jul 29 21:24:26 2013 127.0.0.1 - - [GET] "/videofeed1.ffm HTTP/1.1" 
200 4175
Missing audio stream which is required by this ffm
videofeed1.ffm: Pid 24078 exited with status 256 after 0 seconds


I opened another console on the same system to upload a feed to the 
ffserver.


$ ffmpeg -i testvideo.mp4 http://localhost:8090/videofeed1.ffm
ffmpeg version 2.0 Copyright (c) 2000-2013 the FFmpeg developers
   built on Jul 29 2013 18:57:52 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
   configuration: --prefix=/somelocation --enable-libmp3lame 
--enable-libx264 --enable-gpl
   libavutil      52. 38.100 / 52. 38.100
   libavcodec     55. 18.102 / 55. 18.102
   libavformat    55. 12.100 / 55. 12.100
   libavdevice    55.  3.100 / 55.  3.100
   libavfilter     3. 79.101 /  3. 79.101
   libswscale      2.  3.100 /  2.  3.100
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  3.100 / 52.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'testvideo.mp4':
   Metadata:
     major_brand     : mp42
     minor_version   : 0
     compatible_brands: isommp42
     creation_time   : 2011-04-11 13:04:38
   Duration: 00:02:10.72, start: 0.000000, bitrate: 394 kb/s
     Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 
0x31637661), yuv420p, 636x360, 293 kb/s, 25 fps, 25 tbr, 1k tbn, 50 tbc
     Metadata:
       creation_time   : 1970-01-01 00:00:00
       handler_name    : VideoHandler
     Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, 
fltp, 95 kb/s
     Metadata:
       creation_time   : 2011-04-11 13:04:39
       handler_name    : (C) 2007 Google Inc. v08.13.2007.
Output #0, ffm, to 'http://localhost:8090/videofeed1.ffm':
   Metadata:
     major_brand     : mp42
     minor_version   : 0
     compatible_brands: isommp42
     creation_time   : now
     encoder         : Lavf55.12.100
     Stream #0:0(und): Audio: mp2, 22050 Hz, mono, s16, 32 kb/s
     Metadata:
       creation_time   : 2011-04-11 13:04:39
       handler_name    : (C) 2007 Google Inc. v08.13.2007.
     Stream #0:1(und): Video: mpeg1video, yuv420p, 160x128, q=2-31, 64 
kb/s, 1000k tbn, 25 tbc
     Metadata:
       creation_time   : 1970-01-01 00:00:00
       handler_name    : VideoHandler
Stream mapping:
   Stream #0:1 -> #0:0 (aac -> mp2)
   Stream #0:0 -> #0:1 (h264 -> mpeg1video)
Press [q] to stop, [?] for help
frame= 3268 fps=201 q=9.3 Lsize=    1876kB time=00:02:10.69 bitrate= 
117.6kbits/s
video:1249kB audio:511kB subtitle:0 global headers:0kB muxing overhead 
6.598953%


I verified that /tmp/videofeed1.ffm was created by ffserver.
The ffserver console output showed the following additional output

...
Mon Jul 29 21:25:25 2013 127.0.0.1 - - New connection: GET /videofeed1.ffm
Mon Jul 29 21:25:25 2013 127.0.0.1 - - [GET] "/videofeed1.ffm HTTP/1.1" 
200 4175
Mon Jul 29 21:25:25 2013 127.0.0.1 - - New connection: POST /videofeed1.ffm
Mon Jul 29 21:25:44 2013 127.0.0.1 - - [POST] "/videofeed1.ffm HTTP/1.1" 
200 1921024


I then tried to read the stream using ffplay.


$ ffplay http://localhost:8090/videostream1.mpg
ffplay version 2.0 Copyright (c) 2003-2013 the FFmpeg developers
   built on Jul 29 2013 18:57:52 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
   configuration: --prefix=/somelocation --enable-libmp3lame 
--enable-libx264 --enable-gpl
   libavutil      52. 38.100 / 52. 38.100
   libavcodec     55. 18.102 / 55. 18.102
   libavformat    55. 12.100 / 55. 12.100
   libavdevice    55.  3.100 / 55.  3.100
   libavfilter     3. 79.101 /  3. 79.101
   libswscale      2.  3.100 /  2.  3.100
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  3.100 / 52.  3.100
     nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0


I observed that counters from ffplay showed no progress.  Ie. the ffplay 
console output remained static.  Nothing played.
The corresponding ffserver console output showed the following 
additional output.

...
Mon Jul 29 21:26:35 2013 127.0.0.1 - - New connection: GET /videostream1.mpg




More information about the ffmpeg-user mailing list