title: Begin stream simple mp4 with ffserver
body: <p>I want to stream a mp4 and for this I read about ffserver.<br>
  So I search and read ffserver documentations but still cant stream a simple file.<br>
  For this I done these:<br>
  1-A win 8 and last VLC installed.<br>
  2-A Ubuntu 13 with last ffmpeg package.<br>
  3-A ffserver.conf file saved to /etc/ and copied from <a href="http://ffmpeg.org/sample.html" rel="nofollow noreferrer">http://ffmpeg.org/sample.html</a> (I just copy text in a new file).<br>
  4-Run this command : <code>ffserver -f /etc/ffconfig.conf</code> and this is result :   </p>
  
  <pre><code>avserver version 0.8.13-6:0.8.13-0ubuntu0.13.10.1, Copyright (c) 2000-2014 the Libav developers
    built on Jul 15 2014 13:53:49 with gcc 4.8.1
  Tue Feb 10 07:29:07 2015 AVserver started.
  </code></pre>
  
  <p>5-Check <a href="http://localhost:8090/stat.html" rel="nofollow noreferrer">http://localhost:8090/stat.html</a> and server status is OK.It shows me 4 stream : test1.mpg,test.asf,stat.html,index.html.<br>
  6-Run this command : <code>ffmpeg -i test.mp4 http://localhost:8090/feed1.ffm</code>  and this is result :</p>
  
  <pre><code>ffmpeg version 0.8.13-6:0.8.13-0ubuntu0.13.10.1, Copyright (c) 2000-2014 the Libav developers
    built on Jul 15 2014 13:53:49 with gcc 4.8.1
  *** THIS PROGRAM IS DEPRECATED ***
  This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'big.mp4':
    Metadata:
      major_brand     : isom
      minor_version   : 1
      compatible_brands: isom
      creation_time   : 2015-02-05 20:35:09
    Duration: 00:21:36.12, start: 0.000000, bitrate: 788 kb/s
      Stream #0.0(und): Video: h264 (High), yuv420p, 720x404, 677 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
      Metadata:
        creation_time   : 2015-02-05 17:05:45
      Stream #0.1(und): Audio: aac, 48000 Hz, stereo, s16, 106 kb/s
      Metadata:
        creation_time   : 2015-02-05 20:35:12
  Incompatible sample format '(null)' for codec 'mp2', auto-selecting format 's16'
      Last message repeated 1 times
  Incompatible sample format '(null)' for codec 'libmp3lame', auto-selecting format 's16'
  [buffer @ 0x900f0c0] w:720 h:404 pixfmt:yuv420p
  [scale @ 0x8ea5080] w:720 h:404 fmt:yuv420p -&gt; w:160 h:128 fmt:yuv420p flags:0x4
  [buffer @ 0x8ea34a0] Invalid pixel format string '-1'
  Error opening filters!
  </code></pre>
  
  <p>7-I look at error and I can not find why this happen and where I go wrong!   </p>
  
  <p>Until now I read many sample and tutorials about ffserver but most of them is about live streaming but I just want to stream some mp4 files.  </p>
  
  <p><strong>EDIT:</strong>    </p>
  
  <p>I installed real ffmpeg like this link : <a href="https://askubuntu.com/questions/373322/how-to-replace-avconv-with-the-real-ffmpeg-and-have-it-work-right">https://askubuntu.com/questions/373322/how-to-replace-avconv-with-the-real-ffmpeg-and-have-it-work-right</a> but same error (Just change ppa to <code>ppa:mc3man/trusty-media</code> for last release):   </p>
  
  <pre><code>pp@ubuntu:~$ ffmpeg -i big.mp4 http://localhost:8090/feed1.ffm
  ffmpeg version 0.8.13-6:0.8.13-0ubuntu0.13.10.1, Copyright (c) 2000-2014 the Libav developers
    built on Jul 15 2014 13:53:49 with gcc 4.8.1
  *** THIS PROGRAM IS DEPRECATED ***
  This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'big.mp4':
    Metadata:
      major_brand     : isom
      minor_version   : 1
      compatible_brands: isom
      creation_time   : 2015-02-05 20:35:09
    Duration: 00:21:36.12, start: 0.000000, bitrate: 788 kb/s
      Stream #0.0(und): Video: h264 (High), yuv420p, 720x404, 677 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
      Metadata:
        creation_time   : 2015-02-05 17:05:45
      Stream #0.1(und): Audio: aac, 48000 Hz, stereo, s16, 106 kb/s
      Metadata:
        creation_time   : 2015-02-05 20:35:12
  Incompatible sample format '(null)' for codec 'mp2', auto-selecting format 's16'
      Last message repeated 1 times
  Incompatible sample format '(null)' for codec 'libmp3lame', auto-selecting format 's16'
  [buffer @ 0xa04e0c0] w:720 h:404 pixfmt:yuv420p
  [scale @ 0x9ee4080] w:720 h:404 fmt:yuv420p -&gt; w:160 h:128 fmt:yuv420p flags:0x4
  [buffer @ 0x9ee24a0] Invalid pixel format string '-1'
  Error opening filters!
  </code></pre>
  
  <p>Can any one give me exact commands that I should run for test?<br>
  (I know this is like beginners problem but I read doc and test everything as I can but still no luck)</p>