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

HLS doesn't adapt #12

Open
sinkers opened this issue Apr 14, 2014 · 6 comments
Open

HLS doesn't adapt #12

sinkers opened this issue Apr 14, 2014 · 6 comments

Comments

@sinkers
Copy link

sinkers commented Apr 14, 2014

Great lib and am really liking using this as solves a lot of Vitamio issues I was having with playback quality.

One thing I have noticed though is that there is an option in Vitamio for:
mediaPlayer.setAdaptiveStream(true);
which is not available here

Which somehow that I haven't worked out yet makes the ffmpeg hls.c actually switch bitrates on playback.

The standard apple URL for testing this is here: http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8

You will note that it just sits on Gear 1 when it should shift up bitrates. In ffplay command line you can shift up and down by pressing 'v'

@bbcallen
Copy link
Contributor

Automatic shift up-down could cause strange problem while streaming some media resources that are not cut properly.

You could add stream_cycle_channel() from ffplay.c back to ff_ffplay.c to support ffplay-style adapt for now.

I'll take a look later, to see how to expose this feature properly.

@sinkers
Copy link
Author

sinkers commented Apr 14, 2014

If I add stream_cycle_channel() in what is the best way to map that back through to the Java?

It also looks like this is really an underlying ffplay issue I am trying to get fixed over there too
https://trac.ffmpeg.org/ticket/2886

@bbcallen
Copy link
Contributor

See how ijkmp_start() does

@sinkers
Copy link
Author

sinkers commented Apr 15, 2014

It has been a long time since I have looked at JNI! Is your code working like this:

Ijkmediaplayer.java _start() uses jikplayer_jni.c -> IjkMediaPlayer_start(JNIEnv *env, jobject thiz) ?

This calls: ijkplayer.c -> ijkmp_start(mp);

Which puts a message on the queue to ffplay: fp_notify_msg1(mp->ffplayer, FFP_REQ_START);

ijkplayer.c then gets the message (ijkmp_get_msg) and executes the commands that go through to ffplay?

@bbcallen
Copy link
Contributor

Yes, the message queue is a replacement of the original event_loop() in ffplay. All you found in event_loop() can be placed here.

@sinkers
Copy link
Author

sinkers commented Jun 17, 2014

For when I get back to this here is a good paper on optimal streaming algorithms: http://www.diva-portal.org/smash/get/diva2:507848/FULLTEXT01.pdf

@smartTop smartTop mentioned this issue May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants