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

obtainBuffer() track 0x..... disabled, restarting #38

Open
iNdieboyjeff opened this issue May 1, 2013 · 19 comments
Open

obtainBuffer() track 0x..... disabled, restarting #38

iNdieboyjeff opened this issue May 1, 2013 · 19 comments

Comments

@iNdieboyjeff
Copy link

I've managed to compile everything OK, and have local files able to play, but when trying to use HLS streaming, both live and VOD files, I keep getting the above error in the Log, and nothing plays. Any idea what might be causing this?

@myrmidon-media
Copy link

Maybe it's related to #32

Try applying the patch on the last post

@iNdieboyjeff
Copy link
Author

That seems to have solved most of the problems. Still a couple of streams I can't play but most are now working.

However I now have an issue on streams and local videos where we get 'blips' in the audio every couple of seconds the audio either seems to pause or drop-out temporarily (for a couple of frames only) or judder. There also seems to be a lot of GC going on in the Logcat.

@myrmidon-media
Copy link

Can you post a stream or upload a file so we can test it?

@iNdieboyjeff
Copy link
Author

Here is a stream that doesn't load.... http://akamedia2.lsops.net/live/smil:bbcnews_en.smil/playlist.m3u8

I'll see if I can find something with the 'popping' issue....

@iNdieboyjeff
Copy link
Author

Hmm, the 'popping/drop-out' issue - I've tried the same streams on a Galaxy SIII and the streams/files play without this issue showing itself, whereas on a Galaxy Tab 10 I get this problem. So I'm wondering if it is processor/memory related and a GT10 is a much older device. And the question then would be is there anything we can do to resolve the problem on older devices?

@myrmidon-media
Copy link

@iNdieboyjeff

The stream plays fine here. Regarding the popping/drop-out' issue I'm pretty sure it's related to device not being faster enough.

Although Galaxy tab 10 should be fast enough for this kind of stream, are you testing on https://review.appunite.com/#/c/4017 or on github's version? The latest version (https://review.appunite.com/#/c/4017) has speed improvements, see AnativeWindow for reference http://vec.io/posts/how-to-render-image-buffer-in-android-ndk-native-code.

@iNdieboyjeff
Copy link
Author

I've tried doing a clean build based on https://review.appunite.com/#/c/4017 and I still can't play the HLS stream specified. I get the following Logcat:

05-08 10:42:43.840: E/ffmpeg(3867): max_analyze_duration 5000000 reached at 5000000
05-08 10:42:43.840: E/ffmpeg(3867): Could not find codec parameters for stream 0 (Unknown: none ([21][0][0][0] / 0x0015)): unknown codec
05-08 10:42:43.840: E/ffmpeg(3867): Consider increasing the value for the 'analyzeduration' and 'probesize' options
05-08 10:42:43.850: E/ffmpeg(3867): Estimating duration from bitrate, this may be inaccurate
05-08 10:42:45.500: E/ffmpeg(3867): max_analyze_duration 5000000 reached at 5000000
05-08 10:42:45.500: E/ffmpeg(3867): Could not find codec parameters for stream 0 (Unknown: none ([21][0][0][0] / 0x0015)): unknown codec
05-08 10:42:45.500: E/ffmpeg(3867): Consider increasing the value for the 'analyzeduration' and 'probesize' options
05-08 10:42:45.500: E/ffmpeg(3867): Estimating duration from bitrate, this may be inaccurate
05-08 10:42:48.810: E/ffmpeg(3867): max_analyze_duration 5000000 reached at 5000000
05-08 10:42:48.810: E/ffmpeg(3867): Could not find codec parameters for stream 0 (Unknown: none ([21][0][0][0] / 0x0015)): unknown codec
05-08 10:42:48.810: E/ffmpeg(3867): Consider increasing the value for the 'analyzeduration' and 'probesize' options
05-08 10:42:48.820: E/ffmpeg(3867): Estimating duration from bitrate, this may be inaccurate

@myrmidon-media
Copy link

Try adding this to VideoActivity:

private void setDataSource() {
        HashMap<String, String> params = new HashMap<String, String>();

        // set font for ass
        File assFont = new File(Environment.getExternalStorageDirectory(),
                "DroidSansFallback.ttf");
        params.put("ass_default_font_path", assFont.getAbsolutePath());
+       params.put("analyzeduration", "0");

....

@iNdieboyjeff
Copy link
Author

That didn't seem to help I'm afraid

@myrmidon-media
Copy link

Really? I'm testing with analyzeduration 0 and works great here.

Well try hardcoding it in player.c:

int player_open_input(struct Player *player, const char *file_path,
        AVDictionary *dictionary) {

+   av_dict_set(&dictionary, "analyzeduration", "0", 0);

    int ret;
    if ((ret = avformat_open_input(&(player->input_format_ctx), file_path, NULL,
            &dictionary)) < 0) {



.....

@myrmidon-media
Copy link

If above doesn't work make sure you've compiled ffmpeg with required options for playing hls streams.

Btw you've pulled fromm https://review.appunite.com/#/c/4017 and then applied the patch on #32 no?

@iNdieboyjeff
Copy link
Author

Yep all of that has been done. Latest from appunite, and patch 32. Other HLS streams do play so I'm assuming it's not the HLS support per-se. It does seem to be a very odd problem.

@myrmidon-media
Copy link

can you post the stream?

@iNdieboyjeff
Copy link
Author

I'll try the code change you suggest - will take a little while to compile it up...

The stream is the one I mentioned earlier #38 (comment), whereas other ones I use work fine (well appart from the judder/popping issue anyway).

@myrmidon-media
Copy link

Well the stream you posted works fine here with analyzeduration 0. You don't have to make a clean recompile. Just add the line above and then ndk-build -j2

@iNdieboyjeff
Copy link
Author

Tried that and it didn't help - in fact made performance worse for some items. There definitely seems to be a problem with adaptive HLS streams.

@ksotik
Copy link

ksotik commented May 12, 2013

I have this error with obtainBuffer() too with H.264/AAC Mpeg-TS HTTP streams (live stream and files), encoded with ffmpeg+libx264 high/baseline profile. But SD streams with low bitrate (lower than 1mbps) works better then HD and SD with bitrate > 1 mbps, HD plays with big audio freezes and low fps.
How to solve this? Another players (VLC, MX Player) play this streams fine on android.
Thank you for help.

@myrmidon-media
Copy link

@ksotik

Probably @jacek-marchwicki can speak wiser than me. But to solve this, player needs either hw acceleration or frame skippping algorithm for sw decoder. Neither of them are currently implemented

@wankey
Copy link

wankey commented Oct 15, 2013

it‘s happened when I play .wmv,and the video paused.how can I fix it?

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

4 participants