Open TevinLi opened 5 years ago
set the "-force_key_frames" or"-g" to your ffmpeg command to custom "I frame" in .ts . seek the "I frame" time ( or set currentTIme to it ) will fix the problem in pic 2.
but not about delayed video image 😞
did you solve this problem, please let me know , i have the same problem now. thank you very much
On some mobile devices, there is a delay in the video image. When the sound is finished, the video image is only played halfway.
My test phones:
I used this command
ffmpeg -i video.mp4 -f mpegts -b 1500k -s 960x540 -bf 0 -codec:v mpeg1video -codec:a mp2 video.ts
I try to modify the
timestampIndex
anddecodedTime
of the video decoder to the correct time, but it doesn't work.I also try to use
.seek(time)
to correct the video time, but the video image is messed up. For example, play a .ts video in my local player: Play the same file with .seek() on my phone: