[FFmpeg-user] Recoding an ASF-Stream with ffmpeg and ffserver for remote ffserver

Ingo Platz maillists at darkeldar.de
Tue Feb 26 16:40:26 CET 2013


Hi everyone

I am trying to transcode some camera streams from IP-Cams on our local 
server (to save WiFi load) and use a low quality encode to bring the 
streams to a remote server (quality doesn't matter but our internet 
connection upload should not be cropped to much).

On our local server runs ffmpeg as delivered by the Packman repository 
for OpenSuse 11.4 .
On the remote host I could recompile it if necessary, but I think that 
would be over the top since my problem occurs on the local server.


FFprobe from local server to camera:

ip at server:~> ffprobe 
"http://192.168.0.35:81/videostream.asf?user=viewer&pwd=&resolution=32&rate=0" 

ffprobe version 1.0.4 Copyright (c) 2007-2012 the FFmpeg developers
   built on Feb 10 2013 19:01:53 with gcc 4.5 (SUSE Linux)
   configuration: --shlibdir=/usr/lib64 --prefix=/usr 
--mandir=/usr/share/man --libdir=/usr/lib64 --enable-shared 
--disable-static --enable-debug
--disable-stripping --extra-cflags='-fmessage-length=0 -O2 -Wall 
-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
-fasynchronous-unwind-tables -g -fPIC -I/usr/include/gsm' --enable-gpl 
--enable-x11grab --enable-version3 --enable-pthreads --enable-avfilter
--enable-libpulse --enable-libvpx --enable-libopus --enable-libass 
--enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex
--enable-libxvid --enable-libx264 --enable-libschroedinger 
--enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-postproc --enable-libdc1394 --enable-librtmp 
--enable-libfreetype --enable-avresample --enable-libtwolame
   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
[asf @ 0x624420] max_analyze_duration 5000000 reached at 5120000
[asf @ 0x624420] Estimating duration from bitrate, this may be inaccurate
Input #0, asf, from 
'http://192.168.0.35:81/videostream.asf?user=viewer&pwd=&resolution=32&rate=0': 

   Duration: N/A, start: 0.000000, bitrate: 32 kb/s
     Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p, 640x480, 
25 tbr, 1k tbn, 1k tbc
     Stream #0:1: Audio: adpcm_ima_wav ([17][0][0][0] / 0x0011), 8000 
Hz, 1 channels, s16, 32 kb/s

Depending on the load on the camera i sometimes get a msmpeg4-stream as 
Stream #0:0



ffsever.conf (only feed and stream):

<Feed feed1.ffm>
         File /tmp/feed1.ffm
         FileMaxSize 200K
         Launch ffmpeg -i 
"http://192.168.0.35:81/videostream.asf?user=viewer&pwd=&resolution=32&rate=0" 
-an
         ACL allow 127.0.0.1
</Feed>
<Stream Hoftor.asf>
         Feed feed1.ffm
         Format asf
         VideoBufferSize 40
         VideoFrameRate 3
         VideoSize vga
         VideoIntraOnly
         NoAudio
         AVOptionVideo flags +global_header
</Stream>

after the camera stream is run through ffmpeg and ffserver I get this 
ffprobe output:

ip at server:~> ffprobe http://server:8090/Hoftor.asf
ffprobe version 1.0.4 Copyright (c) 2007-2012 the FFmpeg developers
   built on Feb 10 2013 19:01:53 with gcc 4.5 (SUSE Linux)
   configuration: --shlibdir=/usr/lib64 --prefix=/usr 
--mandir=/usr/share/man --libdir=/usr/lib64 --enable-shared 
--disable-static --enable-debug
--disable-stripping --extra-cflags='-fmessage-length=0 -O2 -Wall 
-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
-fasynchronous-unwind-tables -g -fPIC -I/usr/include/gsm' --enable-gpl 
--enable-x11grab --enable-version3 --enable-pthreads --enable-avfilter
--enable-libpulse --enable-libvpx --enable-libopus --enable-libass 
--enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex
--enable-libxvid --enable-libx264 --enable-libschroedinger 
--enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-postproc --enable-libdc1394 --enable-librtmp 
--enable-libfreetype --enable-avresample --enable-libtwolame
   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
http://server:8090/Hoftor.asf: Invalid data found when processing input


It appers that the stream I get from ffserver is corrupted and can't be 
imported into ffmpeg on my remote server but it can be played on the 
local network by VLC.

My idea was now to keep the settings above for locl streaming and to 
make a new encode for the remote viewer.
I don't care what codec to use for the connection from local to remote 
server but it shouldn't be to demanding on bandwith (we have an upstream 
of ~ 3000) and I don't want to use more than 1000 for 4 streams )

Does anybody have an idea how I could get a stream working for this 
scenario?

Kind regards
Ingo Platz

ingoplatz at darkeldar.de





More information about the ffmpeg-user mailing list