[FFmpeg-user] ffserver avc1 incompatible with codec id '28'

Ricardo Kleemann ricardo at americasnet.com
Sun May 3 18:31:42 CEST 2015


Hi,

I'm trying to feed a stream (mp4 file) to ffserver via ffmpeg, and trying
to access on ffserver and get the error:

Sun May  3 09:18:25 2015 127.0.0.1 - - [GET] "/feed1.ffm HTTP/1.1" 200 4175
Sun May  3 09:18:32 2015 [mp4 @ 0x24edf10]Tag avc1/0x31637661 incompatible
with output codec id '28' ([33][0][0][0])
Sun May  3 09:18:32 2015 Error writing output header for stream 'live.mp4':
Invalid data found when processing input

The ffserver config for testing is very simple:
<Stream live.mp4>
Feed feed1.ffm
Format mp4
AVOptionVideo flags +global_header
AVOptionAudio flags +global_header
</Stream>

(I've tried the test with and without the line "VideoCodec libx264" with
same results... when not having the line in there the objective is to copy
the instream codec)

When I startup ffserver this is what I get:

~$ sudo ffserver
ffserver version 2.4.3-1ubuntu1~trusty6 Copyright (c) 2000-2014 the FFmpeg
developers
  built on Nov 22 2014 17:07:19 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  configuration: --prefix=/usr --extra-version='1ubuntu1~trusty6'
--build-suffix=-ffmpeg --toolchain=hardened --extra-cflags=
--extra-cxxflags= --libdir=/usr/lib/x86_64-linux-gnu
--shlibdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu
--enable-gpl --enable-shared --disable-stripping --enable-avresample
--enable-avisynth --enable-fontconfig --enable-gnutls --enable-ladspa
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
--enable-libcdio --enable-libflite --enable-libfreetype --enable-libfribidi
--enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame
--enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp
--enable-libschroedinger --enable-libshine --enable-libspeex
--enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-opengl
--enable-x11grab --enable-libxvid --enable-libx265 --enable-libdc1394
--enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r
--enable-libx264 --enable-libsoxr --enable-openal --enable-libopencv
  libavutil      54.  7.100 / 54.  7.100
  libavcodec     56.  1.100 / 56.  1.100
  libavformat    56.  4.101 / 56.  4.101
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  1.100 /  5.  1.100
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
Sun May  3 09:27:58 2015 FFserver started.


Here is my line for ffmpeg:

$ ffmpeg -re -i sample.mp4 -c copy http://localhost:8090/feed1.ffm
ffmpeg version 2.4.3-1ubuntu1~trusty6 Copyright (c) 2000-2014 the FFmpeg
developers
  built on Nov 22 2014 17:07:19 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  configuration: --prefix=/usr --extra-version='1ubuntu1~trusty6'
--build-suffix=-ffmpeg --toolchain=hardened --extra-cflags=
--extra-cxxflags= --libdir=/usr/lib/x86_64-linux-gnu
--shlibdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu
--enable-gpl --enable-shared --disable-stripping --enable-avresample
--enable-avisynth --enable-fontconfig --enable-gnutls --enable-ladspa
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
--enable-libcdio --enable-libflite --enable-libfreetype --enable-libfribidi
--enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame
--enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp
--enable-libschroedinger --enable-libshine --enable-libspeex
--enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-opengl
--enable-x11grab --enable-libxvid --enable-libx265 --enable-libdc1394
--enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r
--enable-libx264 --enable-libsoxr --enable-openal --enable-libopencv
  libavutil      54.  7.100 / 54.  7.100
  libavcodec     56.  1.100 / 56.  1.100
  libavformat    56.  4.101 / 56.  4.101
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  1.100 /  5.  1.100
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sample.mp4':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    creation_time   : 1970-01-01 00:00:00
    encoder         : Lavf52.73.0
  Duration: 00:09:56.46, start: 0.000000, bitrate: 524 kb/s
    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 /
0x31637661), yuv420p, 424x240, 420 kb/s, 24 fps, 24 tbr, 24 tbn, 48 tbc
(default)
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : DataHandler
      encoder         : libx264
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo,
fltp, 99 kb/s (default)
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : DataHandler
Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    creation_time   : now
    encoder         : Lavf56.4.101
    Stream #0:0(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, 99
kb/s (default)
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : DataHandler
    Stream #0:1(eng): Video: h264 (avc1 / 0x31637661), yuv420p, 424x240,
q=2-31, 420 kb/s, 24 fps, 1000k tbn, 24 tbc (default)
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : DataHandler
      encoder         : libx264
    Stream #0:2(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, 99
kb/s (default)
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : DataHandler
    Stream #0:3(eng): Video: h264 (avc1 / 0x31637661), yuv420p, 424x240,
q=2-31, 420 kb/s, 24 fps, 1000k tbn, 24 tbc (default)
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : DataHandler
      encoder         : libx264
    Stream #0:4(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, 99
kb/s (default)
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : DataHandler
    Stream #0:5(eng): Video: h264 (avc1 / 0x31637661), yuv420p, 424x240,
q=2-31, 420 kb/s, 24 fps, 1000k tbn, 24 tbc (default)
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : DataHandler
      encoder         : libx264
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (copy)
  Stream #0:1 -> #0:2 (copy)
  Stream #0:0 -> #0:3 (copy)
  Stream #0:1 -> #0:4 (copy)
  Stream #0:0 -> #0:5 (copy)
Press [q] to stop, [?] for help
frame=   13 fps=0.0 q=-1.0 q=-1.0 q=-1.0 size=      40kB time=00:00:00.54
bitratframe=   25 fps= 25 q=-1.0 q=-1.0 q=-1.0 size=      92kB
time=00:00:01.04 bitratframe=   37 fps= 24 q=-1.0 q=-1.0 q=-1.0 size=
160kB time=00:00:01.55 bitratframe=   50 fps= 25 q=-1.0 q=-1.0 q=-1.0
size=     260kB time=00:00:02.08 bitratframe=   53 fps= 24 q=-1.0 Lq=-1.0
q=-1.0 size=     292kB time=00:00:02.20 bitrate=1083.2kbits/s


When I try to access the "live.mp4" stream here's what I get on ffserver:

Sun May  3 09:30:10 2015 127.0.0.1 - - [GET] "/feed1.ffm HTTP/1.1" 200 4175
Sun May  3 09:30:17 2015 [mp4 @ 0x14a7950]Tag avc1/0x31637661 incompatible
with output codec id '28' ([33][0][0][0])
Sun May  3 09:30:17 2015 Error writing output header for stream 'live.mp4':
Invalid data found when processing input
Sun May  3 09:30:17 2015 45.50.16.215 - - [GET] "/live.mp4 HTTP/1.1" 200 68
Sun May  3 09:30:23 2015 45.50.16.215 - - [] " " 200 0

So I don't quite understand the incompatible error. After all, this is
h264/avc1. Is the avc1 from ffmpeg different? Should I be specifying
something different in the ffserver.conf? Even when I specify libx264 I get
the same error.

thank you
Ricardo


More information about the ffmpeg-user mailing list