ghassani / ffstream

An ffmpeg based streaming framework written in python utilizing ffmpeg-python
2 stars 3 forks source link

The sound is out of sync with the video #2

Open cioace opened 4 years ago

cioace commented 4 years ago

After a period of testing I noticed that the sound is out of sync with the video. My estimate is somewhere around 6-7 hours of continuous streaming. Can this be fixed?

ghassani commented 4 years ago

I did run into similar issues with long running streams sometimes. Since all this relies on FFMPEG, the best thing you can do is to tweak the encoder and decoder settings to use something that works good for your source media, machine power, and upload speed. Maybe play with the buffer settings a bit.

If you take a look at https://github.com/ghassani/ffstream/blob/master/ffstream/ffmpeg.py#L126 you can see the available profiles. The default is the one I put together, and the other is pretty much on par with the way the ffplayout project encoders/decodes and it sometimes can be a bit better. You can copy these settings into your playlist file to configure them on a per playlist basis.

cioace commented 4 years ago

I did run into similar issues with long running streams sometimes. Since all this relies on FFMPEG, the best thing you can do is to tweak the encoder and decoder settings to use something that works good for your source media, machine power, and upload speed. Maybe play with the buffer settings a bit.

If you take a look at https://github.com/ghassani/ffstream/blob/master/ffstream/ffmpeg.py#L126 you can see the available profiles. The default is the one I put together, and the other is pretty much on par with the way the ffplayout project encoders/decodes and it sometimes can be a bit better. You can copy these settings into your playlist file to configure them on a per playlist basis.

Ok ghassani, i'll try your solution :)