FFmpegPlayer icon indicating copy to clipboard operation
FFmpegPlayer copied to clipboard

Video and audio are out of sync.

Open xixihao123 opened this issue 5 years ago • 3 comments

Hello, I use FFmpeg to stream local files to the Nginx server, and then use this player to play streaming media. The audio video is slightly out of sync(the sound is playing a little slow), but playing this video file directly is normal. May I ask what caused this?

xixihao123 avatar Jul 27 '19 09:07 xixihao123

Hi, there have been a bug fixed recently that is related to the sync stuff. Please check out the latest revision just in case.

aliakseis avatar Jul 27 '19 12:07 aliakseis

Hi, there seems to be a similar situation. I pushed the local MP4 file with FFmpeg. The server used NGINX and played it with player. The audio and video were out of sync。 cmd: ffmpeg -re -i 1.mp4 -vcodec copy -codec copy -f flv rtmp://127.0.0.1/live

xixihao123 avatar Jul 29 '19 02:07 xixihao123

Just an update. This is not an excuse for the bug, but an explanation - FFmpeg transforms a MP4 container to a FLV one, and, probably, along with this, ignores stream size: https://en.wikipedia.org/wiki/MPEG-4_Part_14 https://en.wikipedia.org/wiki/Flash_Video https://en.wikipedia.org/wiki/Real-Time_Messaging_Protocol

aliakseis avatar Jul 29 '19 13:07 aliakseis