Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change original Playback Framerate #27

Closed
redstringhk opened this issue Jun 2, 2014 · 13 comments
Closed

Change original Playback Framerate #27

redstringhk opened this issue Jun 2, 2014 · 13 comments

Comments

@redstringhk
Copy link

Hello,

How I can change the original playback framerate? Do i need to modify the native code or just call a function in the app? Just want to play the high resolution video smoother on low-end devices.

thanks!

@bbcallen
Copy link
Contributor

bbcallen commented Jun 2, 2014

If you mean drop frame, try search skip_frame, skip_loop_filter.

@redstringhk
Copy link
Author

Thanks.

So, there is no use with the ffp_set_max_fps(FFPlayer *ffp, int max_fps); to limit the max fps?

@bbcallen
Copy link
Contributor

bbcallen commented Jun 2, 2014

Most h264 video I've seen, is about 24fps or 30fps.
ffp_set_max_fps() is a trick to deal with unexpected insane high-fps (such as 50 fps),
by set skip_frame/skip_loop_filter to the lowest acceptable value.

If your video compression parameters is predictable, go ahead to hardcode these options directly.
ffp_set_codec_option("skip_loop_filter", "8"); // 8 for AVDISCARD_NONREF
ffp_set_codec_option("skip_loop_filter", "8"); // 8 for AVDISCARD_NONREF

@redstringhk
Copy link
Author

Thanks, will give it a try.

@redstringhk
Copy link
Author

Thanks for your advice. Video playback is ok now. But i got another problem on playback ADPCM audio track. it keeps buffering after 30 to 40. Can i change a lower sample rate or just use mono for audio playback?

@bbcallen
Copy link
Contributor

bbcallen commented Jun 2, 2014

Is it audio only resource? I haven't tested that situation.

Search audio_open for sample rate and channel control.

@redstringhk
Copy link
Author

it's H264/ADPCM. Tried to lower the sample rate and mono audio but still got the same buffering problem.

@redstringhk
Copy link
Author

BTW, i have found the current display time is outsync with the playback video. Do you know which area should i look at. I have tried to modify the ijkmp_get_current_position() but seems not work.

@redstringhk
Copy link
Author

Sorry, overlook there is an ffp->av_sync_type options.
After setting to AV_SYNC_VIDEO_MASTER, it fixes the incorrect time display problem.

@bbcallen
Copy link
Contributor

bbcallen commented Jun 3, 2014

Can you share the test stream?

@redstringhk
Copy link
Author

Will create an sample stream, can i share to your gmail?

@redstringhk
Copy link
Author

Just shared an sample stream to your gmail, really appreciate if you can check it out when you have time. The stream format is H264/ADPCM. I am building an android player.

@bbcallen
Copy link
Contributor

supported: 6ce6e14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants