ffmpeg display only video in Android -


I'm writing a video player in Android. So far I could be able to capture the frame with the help of av_read_frame and avcodec_decode_video2, and updating SDL2.0. I have followed Dragon Tutorial 02. c.

The pseudo code is:

  while (1) {1. Read the packet 2. Check the video frame; If not, then go to step 3. 2.1 With the video frame, update with SDL_UpdateYUVTexture, 3. Handle the SDL event. 4. Clean the renderer 5. Current renderer}  

I wonder, do I need to take care of the video, DTS / PT count synchronization, while I only need to display the video is?

This scenario works well in Samsung, but not in other mobile.

What is your advice?

It depends if you are right with the fact that as your video A Drive faster because the device can decode it and b) Play on different devices at different speeds and on the same device, then you need to synchronize, and as soon as they are decoded , Then you can remove the frame.

Otherwise you still need to synchronize video output to PTS as you do not have audio, and you will not have an audio clock, your only option would be to synchronize the video in hours , Which makes it simple.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -