title: FFmpeg streaming to Akamai like FMLE does
body: <p>I am trying to stream video from my webcam to AkamaiHD service using ffmpeg (like it is implemented in Flash Media Live Encoder)</p>
  
  <pre><code>
      ffmpeg -f dshow -i video="Webcam C110" -s 640x360 -aspect 16:9 -profile:v baseline -    pix_fmt yuv420p -vcodec libx264 -f flv "rtmp://..."
  ...
     Input #0, dshow, from 'video=Webcam C110':
    Duration: N/A, start: 31296.194000, bitrate: N/A
      Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 30 tbr, 10000k tbn, 30 tbc
  Output #0
    Metadata:
      encoder         : Lavf55.8.102
      Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 1k tbn, 30 tbc
  Stream mapping:
    Stream #0:0 -> #0:0 (rawvideo -> libx264)
  ....
  </code></pre>
  
  <p>The video is sreamed, but when I try to view it at  <a href="http://mediapm.edgesuite.net/edgeflash/public/zeri/debug/Main.html?url=myplayback_url/manifest.f4m" rel="nofollow">http://mediapm.edgesuite.net/edgeflash/public/zeri/debug/Main.html?url=myplayback_url/manifest.f4m</a>
  it is not displayed.</p>
  
  <p>I've found out that if the video is recorded using FMLE and restreamed to akamai, then HLS stream is played.</p>
  
  <pre><code>
  ffmpeg -re -i sample.f4v -c copy -f flv "rtmp://..."
  ....
  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sample.f4v':
    Metadata:
      major_brand     : f4v
      minor_version   : 0
      compatible_brands: isommp42m4v
      creation_time   : 2018-10-06 09:23:33
    Duration: 00:01:01.77, start: 0.460000, bitrate: 718 kb/s
      Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 624 kb/s, 30 tbr, 1k tbn, 48 tbc
      Metadata:
        creation_time   : 2018-10-06 09:23:33
        handler_name    : MainConcept
  
  Output #0
    Metadata:
      major_brand     : f4v
      minor_version   : 0
      compatible_brands: isommp42m4v
      encoder         : Lavf55.8.102
      Stream #0:0(eng): Video: h264 ([7][0][0][0] / 0x0007), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=2-31, 624 kb/s, 1k tbn, 1k tbc
      Metadata:
        creation_time   : 2018-10-06 09:23:33
        handler_name    : MainConcept
  Stream mapping:
    Stream #0:0 -> #0:0 (copy)
  ....
  </code></pre>
  
  <p>It seems that the problem is with h.264 codec configuration, but I have found no solution yet.</p>
  
  <p>Could you please advice, how can I implement streaming like FMLE using ffmpeg?</p>