Hello, Sorry I'm jumping on my own question, but I did get past the error from the original question. It turns out that I was using a ubuntu installed package that didn't properly support libx264. So I recompiled ffmpeg.
But now I have a different problem, I'm getting this error: $ 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 18:42:13 2015 FFserver started. Sun May 3 18:42:18 2015 127.0.0.1 - - [GET] "/feed1.ffm HTTP/1.1" 200 4175 Sun May 3 18:42:27 2015 [mp4 @ 0xc0b0f0]sample rate not set Sun May 3 18:42:27 2015 Error writing output header for stream 'live.mp4': Invalid argument Sun May 3 18:42:27 2015 45.50.16.215 - - [GET] "/live.mp4 HTTP/1.1" 200 68 I've tried ensuring a sample rate on both the ffmpeg and the ffserver sides. Here's the ffserver config section: <Stream live.mp4> Feed feed1.ffm Format mp4 AVOptionVideo flags +global_header AudioCodec aac AudioBitRate 64 AudioChannels 2 AudioSampleRate 48000 AVOptionAudio flags +global_header </Stream> And the ffmpeg command + output: $ ffmpeg -re -i sample.mp4 -c copy -ar 48000 http://localhost:8090/feed1.ffm ffmpeg version 2.6.git Copyright (c) 2000-2015 the FFmpeg developers built with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1) configuration: --prefix=/home/ubuntu/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/ubuntu/ffmpeg_build/include --extra-ldflags=-L/home/ubuntu/ffmpeg_build/lib --bindir=/home/ubuntu/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree libavutil 54. 23.101 / 54. 23.101 libavcodec 56. 35.101 / 56. 35.101 libavformat 56. 31.100 / 56. 31.100 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 16.100 / 5. 16.100 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 1.100 / 1. 1.100 libpostproc 53. 3.100 / 53. 3.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 (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 99 kb/s (default) Metadata: creation_time : 1970-01-01 00:00:00 handler_name : DataHandler [libx264 @ 0x3876500] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX [libx264 @ 0x3876500] profile High, level 2.1 Output #0, ffm, to 'http://localhost:8090/feed1.ffm': Metadata: major_brand : qt minor_version : 512 compatible_brands: qt creation_time : now encoder : Lavf56.31.100 Stream #0:0(eng): Audio: aac (libfdk_aac), 48000 Hz, stereo, s16, 139 kb/s (default) Metadata: creation_time : 1970-01-01 00:00:00 handler_name : DataHandler encoder : Lavc56.35.101 libfdk_aac Stream #0:1(eng): Video: h264 (libx264), yuv420p, 424x240, q=-1--1, 24 fps, 1000k tbn, 24 tbc (default) Metadata: creation_time : 1970-01-01 00:00:00 handler_name : DataHandler encoder : Lavc56.35.101 libx264 Stream mapping: Stream #0:1 -> #0:0 (aac (native) -> aac (libfdk_aac)) Stream #0:0 -> #0:1 (h264 (native) -> h264 (libx264)) On Sun, May 3, 2015 at 9:31 AM, Ricardo Kleemann <rica...@americasnet.com> wrote: > 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 > _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user