nirmitlamed
nirmitlamed

Reputation: 11

How do i stream audio file with an image using ffmpeg to Telegram rtmp server

I am trying to stream an audio file/radio but i want it to have a picture or video file to be viewed and not just audio. I do managed to stream audio and picture to Youtube rtmp server but for some reason not to Telegram. Someone knows how to do that?

Upvotes: 0

Views: 1170

Answers (1)

nirmitlamed
nirmitlamed

Reputation: 11

Found the solution, i needed to add this -f image2 to the line and change the codec to aac. For example this is how it looks:

ffmpeg -stream_loop -1 -re -f image2 -i imagefile -i audiofile/radio -c:v libx264 -vf scale=400:-2 -preset veryfast -b:v 2500k -maxrate 2500k -bufsize 5000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 128k -ac 2 -ar 44100 -f flv rtmpserver

Upvotes: 1

Related Questions