Comments (19)
Maybe it's related to #32
Try applying the patch on the last post
from androidffmpeg.
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.
from androidffmpeg.
Can you post a stream or upload a file so we can test it?
from androidffmpeg.
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....
from androidffmpeg.
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?
from androidffmpeg.
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.
from androidffmpeg.
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
from androidffmpeg.
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");
....
from androidffmpeg.
That didn't seem to help I'm afraid
from androidffmpeg.
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) {
.....
from androidffmpeg.
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?
from androidffmpeg.
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.
from androidffmpeg.
can you post the stream?
from androidffmpeg.
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).
from androidffmpeg.
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
from androidffmpeg.
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.
from androidffmpeg.
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.
from androidffmpeg.
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
from androidffmpeg.
it‘s happened when I play .wmv,and the video paused.how can I fix it?
from androidffmpeg.
Related Issues (20)
- It compiles but doesn't work
- 'Could not find compilator' HOT 3
- seekNative() doesn't return any frame
- app was crashed HOT 1
- I want joinning, thanks
- I play tcp stream from camera,there is about 0.5 seconds delay,is there some buffer resulted in? HOT 1
- automake: error: 'configure.ac' is required HOT 1
- could somebody send me the compiled library?
- build_android.sh "C compiler cannot create executables" HOT 3
- library:processReleaseResources FAILED
- mp4 video player system crash
- Can I use this library to play h264 over rtsp? HOT 2
- Fatal signal SIGSEGV after playing 4-5 videos one after the another
- Cannot build project HOT 1
- can't update submodule with libyuv HOT 5
- Why libavfilter is disabled in ffmpeg configuration? HOT 3
- extracting subtitles using this project HOT 1
- Higher versions Support HOT 3
- Repo
- crash on app
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from androidffmpeg.