[FFmpeg-devel] Strategy to optimally playback audio & video
Sven C. Dack
sven.c.dack at sky.com
Tue Sep 13 01:10:53 EEST 2016
On 11/09/16 20:37, Matthieu Beghin wrote:
> I see various solutions:
>
> 1- I could put in cache more than one second of audio and video and I should be ok, but with 4k movies, keeping 30 frames could imply using a huge amount of memory and I would like to avoid that.
> 2- I could open the file twice, one for video and one for audio, but I would use even more RAM and it would decrease performances because parsing the file twice
> 3- I could avoid decoding video frames if I’m missing audio data but that would imply seeking back after to get a clean video frame (so decoding again from previous keyframe), so I think that’s not a option at all.
> 4- Any better option ?
>
Keep audio and video in separate files. YouTube seems to be doing this for their
4K videos.
If you cannot cache the video for long then cache the audio so it can cause less
of a problem.
Divide and conquer...
More information about the ffmpeg-devel
mailing list