Answers.Body: <p>Try this:</p>
  
  <pre><code>ffmpeg -re -y -i https://example.com/xxx.m3u8 -map 0 -vcodec copy -c copy -bsf:a aac_adtstoasc test.mp4
  </code></pre>
  
  <p>See the new options:</p>
  
  <ol>
  <li><strong>-map 0</strong> maps all streams from the input.</li>
  <li><strong>-re</strong> reads in the live stream HLS at its' rate. Not specifying this may result in FFmpeg hanging (as it waits for referenced packets that are not in the manifest).</li>
  </ol>
  
  <p>It would be more useful if you could provide stream details, such as running <a href="https://mediaarea.net/en/MediaInfo" rel="nofollow noreferrer">mediainfo</a> or <a href="https://www.ffmpeg.org/ffprobe.html" rel="nofollow noreferrer">ffprobe</a> against the master manifest. That way we can recommend encoding settings to use.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-28T19:53:05.920Z
Answers.LastActivityDate: 2019-04-28T19:53:05.920Z
Answers.UserDisplayName: Dennis Mungai
Answers.Body: <p>You can use <code>-r 30</code> to designate 30 fps for your mp4 output. 
  The whole cmd can be like this</p>
  
  <p><code>ffmpeg -i https://example.com/xxx.m3u8 -y -vcodec copy -c copy -bsf:a aac_adtstoasc test.mp4
  </code></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-02T03:07:52.803Z
Answers.LastActivityDate: 2018-07-02T03:07:52.803Z
Answers.UserDisplayName: Michael Meepo
Body: <p>I am using ffmpeg to convert an HLS stream to mp4 using this command:</p>
  
  <pre><code>ffmpeg -i https://example.com/xxx.m3u8 -y -vcodec copy -c copy -bsf:a aac_adtstoasc test.mp4
  </code></pre>
  
  <p>I only have access to this video from the stream, and I need it in mp4 format to send on for processing, but I want to be able to set the FPS of the mp4, so that it is consistent.</p>
  
  <p>The HLS stream looks like this:</p>
  
  <pre><code>#EXTM3U
  #EXT-X-STREAM-INF:BANDWIDTH=264000
  xxx/xxx007e.m3u8
  #EXT-X-STREAM-INF:BANDWIDTH=464000
  xxx/xxx0080.m3u8
  #EXT-X-STREAM-INF:BANDWIDTH=768000
  xxx/xxx0082.m3u8
  #EXT-X-STREAM-INF:BANDWIDTH=1200000
  xxx/xxx0084.m3u8
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-11-29T13:33:26.337Z
Comments.Text: Is re-encoding ok? Why do you believe the stream is variable FPS? That is a master playlist with entries for variants. They don't represent differing framerates.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-01T10:05:19.967Z
Comments.Text: have you solved your problem?
Comments.UserDisplayName: Tara
Tags: <ffmpeg>
Title: Convert HLS stream to fixed FPS mp4
UserDisplayName: Carasel
ThreadText: # Convert HLS stream to fixed FPS mp4
  
  (Asked by: username_0 on 2017-11-29)
  
  I am using ffmpeg to convert an HLS stream to mp4 using this command:
  
  ```
  ffmpeg -i https://example.com/xxx.m3u8 -y -vcodec copy -c copy -bsf:a aac_adtstoasc test.mp4
  
  ```
  
  I only have access to this video from the stream, and I need it in mp4 format to send on for processing, but I want to be able to set the FPS of the mp4, so that it is consistent.
  
  The HLS stream looks like this:
  
  ```
  #EXTM3U
  #EXT-X-STREAM-INF:BANDWIDTH=264000
  xxx/xxx007e.m3u8
  #EXT-X-STREAM-INF:BANDWIDTH=464000
  xxx/xxx0080.m3u8
  #EXT-X-STREAM-INF:BANDWIDTH=768000
  xxx/xxx0082.m3u8
  #EXT-X-STREAM-INF:BANDWIDTH=1200000
  xxx/xxx0084.m3u8
  
  ```
  
  **Tags:** ffmpeg
  
  > **Comments:**
  > **username_1**: Is re-encoding ok? Why do you believe the stream is variable FPS? That is a master playlist with entries for variants. They don't represent differing framerates.  
  > **username_2**: have you solved your problem?  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2019-04-28. Score: 0
  
  Try this:
  
  ```
  ffmpeg -re -y -i https://example.com/xxx.m3u8 -map 0 -vcodec copy -c copy -bsf:a aac_adtstoasc test.mp4
  
  ```
  
  See the new options:
  
  1. **-map 0** maps all streams from the input.
  2. **-re** reads in the live stream HLS at its' rate. Not specifying this may result in FFmpeg hanging (as it waits for referenced packets that are not in the manifest).
  
  It would be more useful if you could provide stream details, such as running [mediainfo](https://mediaarea.net/en/MediaInfo) or [ffprobe](https://www.ffmpeg.org/ffprobe.html) against the master manifest. That way we can recommend encoding settings to use.
  
  
  ---
  
  ### Answer by username_4 on 2018-07-02. Score: 0
  
  You can use `-r 30` to designate 30 fps for your mp4 output.
  The whole cmd can be like this
  
  `ffmpeg -i https://example.com/xxx.m3u8 -y -vcodec copy -c copy -bsf:a aac_adtstoasc test.mp4`
  
  
  ---
  
  