while true; do
ffmpeg -re -i "`find /var/music -type f -name '*.mp3'|sort -R|head -n 1`" -vn -c:a libfaac -ar 44100 -ac 2 -f flv rtmp://localhost/myapp/radio;
done
The script takes random mp3 files from /var/music hierarchy and publishes them to nginx-rtmp.
Server-side configuration is simple.
application myapp {
live on;
}
On client side you can use any flash player.
Установил сегодня самый актуальный ffmpeg, но при выполнении выдает:
ReplyDelete"unknown encoder libfaac"
Используйте libmp3lame вместо него или nellymoser. Если вы его собираете руками надо явно указывать libfaac/libmp3lame при конфигурации.
ReplyDeleteСпасибо, уже разобрался и установил libfaac.
ReplyDeleteДополненный конфиг для ffmpeg будет такой:
./configure --prefix=/opt/ffmpeg --disable-yasm --enable-shared --enable-libx264 --enable-libfaac --enable-gpl --enable-nonfree
По логу все нормально. А в чем, собственно, проблема? Не играет? Попробуйте ffplay для начала. Кстати сайт аналогичный вашему есть у JWPlayer, попробуйте там.
ReplyDeleteС этим разобрался, спасибо.
ReplyDeleteТеперь буду разбираться, как брать сторонний rtmp поток с CDN сервиса и транслировать его на iOS в HLS.
Hi,
ReplyDeleteThe problem with looping through ffmpeg command is that rtmp service "ends" the transmission upon completion of first song. And the flash player stops there thinking the broadcast has ended. The next published stream can be played after pressing the play button on flash player. However, this issue doesn't happen always
Thanks
what's your player? Jw doesn't stop.
ReplyDeleteRingtones are the trend most for everyone. So your ringtone is satisfied? Ringtones have the best quality and unique? We will give you the new and trendy ringtone of 2018. You can refer and search for other ringtones on your homepage: https://ringtonesmobile.net/
ReplyDeleteThis is the most installed ringtone in 2018, you can leave some reviews for my ringtone:
- https://ringtonesmobile.net/pilla-ra-ringtone-download.html
- https://ringtonesmobile.net/rx100-ringtone-download.html
- https://ringtonesmobile.net/shape-of-you-ringtone-download.html
- https://ringtonesmobile.net/despacito-ringtone-download.html
- https://ringtonesmobile.net/dilbar-dilbar-ringtone-download.html
Free ringtones for you and everyone. Get together, install and share with your friends. Hope my ringtone will bring a new look to the ringtone world. Thank you!
It was great to experience ringtones at RingtonesCloud.com
ReplyDelete