User Help

Ffmpeg + ngnix (Reencoding only audio)

I use nginx and ffmpeg to restream video from my provider. Previously I use ffmpeg with arguments where I reencoding video and reencoding audio, because my server is to slow I resigned from reencoding.

So now, I use that command :

ffmpeg -re -i -map 0 -c copy -bsf:a aac_adtstoasc -f flv -flvflags no_duration_filesize rtmp://test_ip/canal/stream

This works only when my provider streaming with aac audio codec, but sometimes my provider change audio codec to ac3. And then this doesn’t work. I try something like this :

ffmpeg -thread_queue_size 32768 -re -i -c:v copy -c:a aac -f flv -flvflags no_duration_filesize rtmp://

And it all looks like it’s all right in console with ffmpeg, but my restreaming video doesn’t work. Ngnix throws 304 exception sometime.

Any suggestions?

Leave a Reply

Your email address will not be published. Required fields are marked *