ffserver-2.2 - streaming an ASF video as Webm output with ffserver on Debian 7.5

Posted by Emmanuel Brunet on Super User See other posts from Super User or by Emmanuel Brunet
Published on 2014-06-01T09:06:49Z Indexed on 2014/06/01 9:30 UTC
Read the original article Hit count: 356

I'm trying to stream an IP webcam ASF live stream to a ffserver to output a webm video format. The server starts successfully but the ffserver commands used to feed the ffserver fails and generates a core dump.

Input stream

$ ffprobe http://account:password@webcam/videostream.asf

Input #0, asf, from 'http://account:password@webcam/videostream.asf':
  Duration: N/A, start: 0.000000, bitrate: 32 kb/s
    Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc), 640x480, 25 tbr, 1k tbn, 1k tbc
    Stream #0:1: Audio: adpcm_ima_wav ([17][0][0][0] / 0x0011), 8000 Hz, 1 channels, s16p, 32 kb/s

ffserver configuration

my ffserver configuration is :

Port 8091
RTSPPort 554
BindAddress 192.168.1.62
MaxHTTPConnections 1000
MaxClients 100
MaxBandwidth 1000
CustomLog -

<Feed webcam.ffm>
        File /tmp/webcam.ffm
        FileMaxSize 500M
        ACL allow localhost
        ACL allow 192.168.0.0 192.168.255.255

</Feed>

<Stream webcam.webm>              # Output stream URL definition
   Feed webcam.ffm              # Feed from which to receive video
   Format webm

   # Audio settings
   AudioCodec vorbis
   AudioBitRate 64             # Audio bitrate

   # Video settings
   VideoCodec libvpx
   VideoSize 640x480           # Video resolution
   VideoFrameRate 25           # Video FPS
   AVOptionVideo flags +global_header  # Parameters passed to encoder
                                       # (same as ffmpeg command-line parameters)
   AVOptionVideo cpu-used 0
   AVOptionVideo qmin 10
   AVOptionVideo qmax 42
   AVOptionVideo quality good
   AVOptionAudio flags +global_header
   PreRoll 15
   StartSendOnKey
   # VideoBitRate 32            # Video bitrate
</Stream>

<Stream status.html>
        Format status
        # Only allow local people to get the status
        ACL allow localhost
        ACL allow 192.168.0.0 192.168.255.255
</Stream>

ffmpeg feed

I run the following command that fails

$ ffmpeg  -i http://account:password@webcam/videostream.asf http://ffserver_ip:port/webcam.ffm
http://192.168.1.62:8091/webcam.ffm
Input #0, asf, from 'http://account:password@webcam/videostream.asf':
  Duration: N/A, start: 0.000000, bitrate: 32 kb/s
    Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc), 640x480, 25 tbr, 1k tbn, 1k tbc
    Stream #0:1: Audio: adpcm_ima_wav ([17][0][0][0] / 0x0011), 8000 Hz, mono, s16p, 32 kb/s
[swscaler @ 0x36a80c0] deprecated pixel format used, make sure you did set range correctly
Segmentation fault

I tryed

$ ffmpeg  -i http://account:password@webcam/videostream.asf -pix_fmt yuv420p  http://ffserver_ip:port/webcam.ffm

But it raises the same error.

Thanks for your help

Edit

For an easy testing (I thought), I tried to publish the whole ASF stream as is, meaning connecting the ASF webcam output stream to the ffserver that outputs ASF format too. And thus with mirrored encoding so I changed the ffserver configuration to

...
<Stream webcam.asf>
    Feed webcam.ffm
    Format asf
    VideoFrameRate 25
    VideoSize 640X480
    VideoBitRate 256
    VideoBufferSize 1000
    VideoGopSize 30
    AudioBitRate 32
    StartSendOnKey
</Stream>
...

And the output is now :

Input #0, asf, from 'http://admin:alpha1237@webcam/videostream.asf':
  Duration: N/A, start: 0.000000, bitrate: 32 kb/s
    Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc), 640x480, 1k tbr, 1k tbn, 1k tbc
    Stream #0:1: Audio: adpcm_ima_wav ([17][0][0][0] / 0x0011), 8000 Hz, mono, s16p, 32 kb/s
[swscaler @ 0x3d620c0] deprecated pixel format used, make sure you did set range correctly
Output #0, ffm, to 'http://192.168.1.62:8091/webcam.ffm':
  Metadata:
    creation_time   : now
    encoder         : Lavf55.40.100
    Stream #0:0: Audio: wmav2, 22050 Hz, mono, fltp, 32 kb/s
    Metadata:
      encoder         : Lavc55.64.100 wmav2
    Stream #0:1: Video: msmpeg4v3 (msmpeg4), yuv420p, 640x480, q=2-31, 256 kb/s, 1k fps, 1000k tbn, 1k tbc
    Metadata:
Stream mapping:
  Stream #0:1 -> #0:0 (adpcm_ima_wav -> wmav2)
  Stream #0:0 -> #0:1 (mjpeg -> msmpeg4)
Press [q] to stop, [?] for help
Segmentation fault

I can't even forward the stream.

Thanks for your help again.

© Super User or respective owner

Related posts about ffmpeg

  • how to install ffmpeg in cpanel

    as seen on Super User - Search for 'Super User'
    i'm using dedicated server(linux) so i need to install ffmpeg in cpanel so here ffmpeg i found in Main Software Install a Perl Module but i writing script in php so how can i install ffmpeg phpperl when i'am trying to install ffmpeg in perl module i get this response Checking C compiler… >>> More

  • FFMpeg-PHP Installation Error

    as seen on Server Fault - Search for 'Server Fault'
    While installing FFmpeg-PHP, I got this interesting error: /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function 'zim_ffmpeg_movie_getAudioStreamId': /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c:1051: error: 'CODEC_TYPE_AUDIO' undeclared (first use in this function) /usr/downloads/ffmpeg-php-0… >>> More

  • git problems installing stuff [closed]

    as seen on Super User - Search for 'Super User'
    root@Frenzen:~# cd root@Frenzen:~# git clone --depth 1 git://source.ffmpeg.org/ffmpeg Initialized empty Git repository in /root/ffmpeg/.git/ root@Frenzen:~# cd root@Frenzen:~# git clone --depth 1 git://source.ffmpeg.org/ffmpeg Initialized empty Git repository in /root/ffmpeg/.git/ root@Frenzen:~#… >>> More

  • Unable to install ffmpeg-php

    as seen on Server Fault - Search for 'Server Fault'
    I followed the instructions on http://www.mysql-apache-php.com/ffmpeg-install.htm but ffmpeg-php does not show up in my phpinfo() The commands I ran (in order) #yum install ffmpeg ffmpeg-devel ... Public key for faac-1.26-1.el5.rf.x86_64.rpm is not installed #rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0… >>> More

  • Unable to install ffmpeg-php

    as seen on Server Fault - Search for 'Server Fault'
    Hi, I followed the instructions on http://www.mysql-apache-php.com/ffmpeg-install.htm but ffmpeg-php does not show up in my phpinfo() The commands I ran (in order) #yum install ffmpeg ffmpeg-devel ... Public key for faac-1.26-1.el5.rf.x86_64.rpm is not installed #rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0… >>> More

Related posts about video-streaming