[FFmpeg-user] HTML5 video streaming from a file source: extradata corrupt

Artem Mindrov (GMail) artem.mindrov at gmail.com
Fri Feb 22 10:38:04 CET 2013


Hello,
For a few days I've been trying to stream a pre-recorded video to an
ffserver feed. I need the feed to be consumed by HTML5 clients. I'm
trying it on a Ubuntu 12.10 guest running under a Win7 host. I've tried
the pre-packaged ffserver/ffmpeg, then the updated libavtools package,
then I've built ffmpeg from source following the instructions here
<https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide> and still
can't get it to stream properly, hope someone can at least point me in
the right direction. Every time a browser makes a request to the stream,
I get this (for .webm):

Fri Feb 22 13:02:55 2013 Extradata corrupt.
Fri Feb 22 13:02:55 2013 Error writing output header
Fri Feb 22 13:02:55 2013 127.0.0.1 - - [GET] "/live.webm HTTP/1.1" 200 63

or this (for .ogg):

Fri Feb 22 12:48:06 2013 No extradata present
Fri Feb 22 12:48:06 2013 Error writing output header
Fri Feb 22 12:48:06 2013 127.0.0.1 - - [GET] "/live.ogg HTTP/1.1" 200 68

or this (for .mp4):

Fri Feb 22 13:17:14 2013 muxer does not support non seekable output
Fri Feb 22 13:17:14 2013 Error writing output header
Fri Feb 22 13:17:14 2013 127.0.0.1 - - [GET] "/live.mp4 HTTP/1.1" 200 68


Here's the ffserver output:

ffserver version git-2013-02-21-29436c1 Copyright (c) 2000-2013 the
FFmpeg developers
  built on Feb 22 2013 05:56:27 with gcc 4.7 (Ubuntu/Linaro 4.7.2-2ubuntu1)
  configuration: --enable-gpl --enable-libass --enable-libfaac
--enable-libfdk-aac --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libspeex --enable-librtmp
--enable-libtheora --enable-libvorbis --enable-libvpx --enable-x11grab
--enable-libx264 --enable-nonfree --enable-version3
  libavutil      52. 17.102 / 52. 17.102
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.100 / 54. 63.100
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 39.100 /  3. 39.100
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Fri Feb 22 13:20:44 2013 FFserver started.
Fri Feb 22 13:20:50 2013 No extradata present
Fri Feb 22 13:20:50 2013 Error writing output header
Fri Feb 22 13:20:50 2013 127.0.0.1 - - [GET] "/live.ogg HTTP/1.1" 200 68
Fri Feb 22 13:20:50 2013 No extradata present
Fri Feb 22 13:20:50 2013 Error writing output header
Fri Feb 22 13:20:50 2013 127.0.0.1 - - [GET] "/live.ogg HTTP/1.1" 200 68
Fri Feb 22 13:20:50 2013 No extradata present
Fri Feb 22 13:20:50 2013 Error writing output header
Fri Feb 22 13:20:50 2013 127.0.0.1 - - [GET] "/live.ogg HTTP/1.1" 200 68
Fri Feb 22 13:20:50 2013 No extradata present
Fri Feb 22 13:20:50 2013 Error writing output header
Fri Feb 22 13:20:50 2013 127.0.0.1 - - [GET] "/live.ogg HTTP/1.1" 200 68

Here's the ffmpeg output when I try feeding the file (it finishes
momentarily, and in the ffserver output there's a [POST] "/feed.ffm
HTTP/1.1" 200 70 (a 70-byte POST ???)):

bleak at bleak-VirtualBox:~/ffserver-test$ /usr/local/bin/ffmpeg -re -i
test.ogg -acodec copy -f ogg http://localhost:8090/feed.ffm
ffmpeg version git-2013-02-21-29436c1 Copyright (c) 2000-2013 the FFmpeg
developers
  built on Feb 22 2013 05:56:27 with gcc 4.7 (Ubuntu/Linaro 4.7.2-2ubuntu1)
  configuration: --enable-gpl --enable-libass --enable-libfaac
--enable-libfdk-aac --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libspeex --enable-librtmp
--enable-libtheora --enable-libvorbis --enable-libvpx --enable-x11grab
--enable-libx264 --enable-nonfree --enable-version3
  libavutil      52. 17.102 / 52. 17.102
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.100 / 54. 63.100
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 39.100 /  3. 39.100
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Input #0, ogg, from 'test.ogg':
  Duration: 00:04:37.15, start: 0.000000, bitrate: 221 kb/s
    Stream #0:0: Video: theora, yuv420p, 352x288 [SAR 1:1 DAR 11:9], 16
fps, 16 tbr, 16 tbn, 16 tbc
    Metadata:
      MAJOR_BRAND     : isom
      MINOR_VERSION   : 512
      COMPATIBLE_BRANDS: isomiso2avc1mp41
      ENCODER         : Lavf54.63.100
    Stream #0:1: Audio: vorbis, 11025 Hz, mono, fltp, 29 kb/s
    Metadata:
      MAJOR_BRAND     : isom
      MINOR_VERSION   : 512
      COMPATIBLE_BRANDS: isomiso2avc1mp41
      ENCODER         : Lavf54.63.100
Output #0, ogg, to 'http://localhost:8090/feed.ffm':
  Metadata:
    encoder         : Lavf54.63.100
    Stream #0:0: Video: theora, yuv420p, 352x288 [SAR 1:1 DAR 11:9],
q=2-31, 200 kb/s, 16 tbn, 16 tbc
    Metadata:
      MAJOR_BRAND     : isom
      MINOR_VERSION   : 512
      COMPATIBLE_BRANDS: isomiso2avc1mp41
      ENCODER         : Lavf54.63.100
    Stream #0:1: Audio: vorbis, 11025 Hz, mono, 29 kb/s
    Metadata:
      MAJOR_BRAND     : isom
      MINOR_VERSION   : 512
      COMPATIBLE_BRANDS: isomiso2avc1mp41
      ENCODER         : Lavf54.63.100
Stream mapping:
  Stream #0:0 -> #0:0 (theora -> libtheora)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
bleak at bleak-VirtualBox:~/ffserver-test$ B time=00:00:00.43 bitrate=  
0.0kbits/s

Finally, here's the ffserver.conf:

Port 8090
BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 1000
CustomLog -
#NoDaemon

<Feed feed.ffm>
    File /tmp/feed.ffm
    FileMaxSize 1024M
    ACL allow 127.0.0.1
</Feed>

<Stream live.ogg>
    Format ogg
    Feed feed.ffm

    VideoCodec libtheora
    VideoFrameRate 24
    VideoBitRate 512
    VideoSize 320x240
    VideoQMin 1
    VideoQMax 31
    VideoGopSize 12
    Preroll 0
    AVOptionVideo flags +global_header

    AudioCodec libvorbis
    AudioBitRate 64
    AudioChannels 2
    AudioSampleRate 44100
    AVOptionAudio flags +global_header
</Stream>

##################################################################
# Special streams
##################################################################

<Stream stat.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>

# Redirect index.html to the appropriate site
<Redirect index.html>
    URL http://www.ffmpeg.org/
</Redirect>

Can someone see anything wrong?

Thanks!
Artem


More information about the ffmpeg-user mailing list