简体   繁体   中英

Using ffmpeg to transcode/transmux HLS to RTMP for nginx simulcast not working

I want to take an HLS stream and transcode it to RTMP and simulcast it with the nginx RTMP module.

It's not working, however (I have it placed in the application section of the RTMP module).

exec ffmpeg -i -re http://<HLS>.m3u8 -acodec aac -vcodec libx264 -f flv rtmp://localhost/live/test;

When I try to view my RTMP stream in VLC, it is not loading. I have tried several variations of that ffmpeg directive, none have worked. Any advice? If you need to see more of my config file, I can provide that, but this server has been working previously perfectly when sending video over via a Teradek encoder. This new wrinkle is just not working.

EDIT: Just had a thought. It'd probably help to have the codec information of the incoming HLS stream. Here it is:

  • Video Codec: H264 - MPEG-4 AVC
  • Resolution: 640x360
  • Frame rate: 24
  • Decoded format: Planar 4:2:0 YUV
  • Audio Codec: MPEG AAC Audio (mp4a)
  • Channels: Stereo
  • Sample rate:48000Hz

If you run in terminal

ffmpeg -i -re http://<HLS>.m3u8 -acodec aac -vcodec libx264 -f flv rtmp://localhost/live/test;

are you able to play the stream in VLC?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM