<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>

CC BY-SA 4.0
2019-04-28T19:53:05.920Z
2019-04-28T19:53:05.920Z
Dennis Mungai
<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>

CC BY-SA 4.0
2018-07-02T03:07:52.803Z
2018-07-02T03:07:52.803Z
Michael Meepo
<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>

CC BY-SA 3.0
2017-11-29T13:33:26.337Z
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.
Gyan
CC BY-SA 4.0
2018-08-01T10:05:19.967Z
have you solved your problem?
Tara
<ffmpeg>
Convert HLS stream to fixed FPS mp4
Carasel
# 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:

-map 0 maps all streams from the input.
-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 or ffprobe 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`


---

