-1

I'm trying to do a Web TV for my Radio but i'm stucked into this problem.

I'm trying to put a video loop (mp4) and trying to add into that loop the audio source of my radio who stream in m3u8 via Shoutcast.

Is possible to do this? I try to search everything on internet without any particular result.

rayjhp
  • 13
  • 4

1 Answers1

0

Use -stream_loop:

ffmpeg -re -stream_loop -1 -i input.mp4 -i rtmp:// -map 0:v -map 1:a output

-re will play input.mp4 at realtime for streaming instead of as fast as possible.

Make sure you use FFmpeg 4.0 or newer or it will not work.

llogan
  • 121,796
  • 28
  • 232
  • 243
  • I try with this command with an output.m3u8 but when video finish, ffmpeg continue working but m3u8 stops refresh. – rayjhp Jun 08 '21 at 14:47
  • I fixed because i see stream_loop works only on FFMPEG 4.x and not older than 4.x. Can you edit your reply with about the version not older than 4.x? I will put as correct ! – rayjhp Jun 08 '21 at 15:33