<p>Because <code>-rf</code> is a output option, I guess, you should put -re ahead like that:</p>
<pre><code>ffmpeg -re -i http://example.com/test.m3u8 -acodec copy -vcodec copy rtmp://example.com/app/stream
</code></pre>

CC BY-SA 4.0
2017-06-19T11:26:25.663Z
2021-01-07T11:02:33.093Z
2021-01-07T11:02:33.093Z
Michael Meepo
<p>one of our partner is exposing a live HLS stream. I want to know if there is any tool that can take hls live stream as input and convert it to rtmp live stream and ideally push that output to some other server.</p>

<p>Basically we are using wowza server to serve live channels to our clients. As per my knowledge wowza is not taking video stream as input using http protocol. Thats why i am looking for a tool to convert hls stream to rtmp stream.</p>

<p>We are trying to do the following, but it fails:</p>

<p>ffmpeg -i <a href="http://bgsf.hls.iptvdc.com/islambox/732/play.m3u8" rel="nofollow">http://bgsf.hls.iptvdc.com/islambox/732/play.m3u8</a> -re -acodec copy -vcodec copy rtmp://ib12.islambox.tv/live/najam83</p>

<pre><code>C:\&gt;ffmpeg -i http://bgsf.hls.iptvdc.com/islambox/709/play.m
3u8 -re -acodec copy -vcodec copy rtmp://ib12.islambox.tv/live/najam83

ffmpeg version N-76023-g0131636 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 5.2.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --ena
ble-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
 --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enabl
e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --ena
ble-decklink --enable-zlib
  libavutil      55.  4.100 / 55.  4.100
  libavcodec     57.  6.100 / 57.  6.100
  libavformat    57.  4.100 / 57.  4.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 11.100 /  6. 11.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.100 /  2.  0.100
  libpostproc    54.  0.100 / 54.  0.100
[aac @ 000000bd32533720] element type mismatch 1 != 0
[aac @ 000000bd325fe4e0] element type mismatch 1 != 0
Input #0, hls,applehttp, from 'http://bgsf.hls.iptvdc.com/islambox/709/play.m3u8
':
  Duration: N/A, start: 54791.428622, bitrate: N/A
  Program 0
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 720x576 [
SAR 12:11 DAR 15:11], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1: Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo,
 fltp, 46 kb/s
Option re (read input at native frame rate) cannot be applied to output file rtm
p://ib12.islambox.tv/live/najam83 -- you are trying to apply an input option to
an output file or vice versa. Move this option before the file it belongs to.
Error parsing options for output file rtmp://ib12.islambox.tv/live/najam83.
Error opening output files: Invalid argument
</code></pre>

CC BY-SA 3.0
2015-10-14T17:11:34.380Z
`ffmpeg -i http://example.com/test.m3u8 -re -acodec copy -vcodec copy rtmp://example.com/app/stream`
SlimSCSI
CC BY-SA 3.0
2015-10-15T07:23:32.073Z
@SlimSCSI please check my answer it gives error.
Najam Awan
CC BY-SA 3.0
2015-10-15T08:19:29.450Z
first, please don't use answers for comments. Second, put -re as the first option, before -i  that was my mistake.
SlimSCSI
<streaming>
convert live hls stream into rtmp stream
Najam Awan
# convert live hls stream into rtmp stream

(Asked by: username_0 on 2015-10-14)

one of our partner is exposing a live HLS stream. I want to know if there is any tool that can take hls live stream as input and convert it to rtmp live stream and ideally push that output to some other server.
Basically we are using wowza server to serve live channels to our clients. As per my knowledge wowza is not taking video stream as input using http protocol. Thats why i am looking for a tool to convert hls stream to rtmp stream.
We are trying to do the following, but it fails:
ffmpeg -i http://bgsf.hls.iptvdc.com/islambox/732/play.m3u8 -re -acodec copy -vcodec copy rtmp://ib12.islambox.tv/live/najam83
C:\>ffmpeg -i http://bgsf.hls.iptvdc.com/islambox/709/play.m
3u8 -re -acodec copy -vcodec copy rtmp://ib12.islambox.tv/live/najam83

ffmpeg version N-76023-g0131636 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 5.2.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --ena
ble-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
 --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enabl
e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --ena
ble-decklink --enable-zlib
  libavutil      55.  4.100 / 55.  4.100
  libavcodec     57.  6.100 / 57.  6.100
  libavformat    57.  4.100 / 57.  4.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 11.100 /  6. 11.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.100 /  2.  0.100
  libpostproc    54.  0.100 / 54.  0.100
[aac @ 000000bd32533720] element type mismatch 1 != 0
[aac @ 000000bd325fe4e0] element type mismatch 1 != 0
Input #0, hls,applehttp, from 'http://bgsf.hls.iptvdc.com/islambox/709/play.m3u8
':
  Duration: N/A, start: 54791.428622, bitrate: N/A
  Program 0
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 720x576 [
SAR 12:11 DAR 15:11], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1: Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo,
 fltp, 46 kb/s
Option re (read input at native frame rate) cannot be applied to output file rtm
p://ib12.islambox.tv/live/najam83 -- you are trying to apply an input option to
an output file or vice versa. Move this option before the file it belongs to.
Error parsing options for output file rtmp://ib12.islambox.tv/live/najam83.
Error opening output files: Invalid argument

**Tags:** streaming

> **Comments:**
> **username_1**: `ffmpeg -i http://example.com/test.m3u8 -re -acodec copy -vcodec copy rtmp://example.com/app/stream`  
> **username_0**: @username_1 please check my answer it gives error.  
> **username_1**: first, please don't use answers for comments. Second, put -re as the first option, before -i  that was my mistake.  

---

## 1 answers

### Answer by username_2 on 2017-06-19. Score: 1

Because -rf is a output option, I guess, you should put -re ahead like that:
ffmpeg -re -i http://example.com/test.m3u8 -acodec copy -vcodec copy rtmp://example.com/app/stream


---

