I used libvlc in my android application and I got it to work. The problem now is, it keeps giving me an error of:
core video output: picture is too late to be displayed (missing 29787 ms)
Using the VLC player, I don't get any lags. What seems to be the problem?
Are you using any LibVLC options? If not, you should. Here is what VLC for Android uses https://github.com/videolan/vlc-android/blob/master/application/resources/src/main/java/org/videolan/resources/VLCOptions.kt
My guess is you have not properly configured hardware decoding, which leads to the video output displaying the picture later than it should.
Related
I have an app with a VideoView to display an MP4 file. Everything was working perfectly fine, on all devices and all Android versions, until Android 12.
We have one user reporting that the VideoView is unable to play the videos, for every video he gets the following popup (the app doesn't crash, just this popup is shown):
My question: does anyone know what the problem might be? I'm expecting - or hoping - it has to do with the fact that it's the beta version of Android 12. If that's not the case, then how can I solve this issue? Anything that changed for Android 12 w.r.t. displaying videos?
Many thanks.
EDIT: The video files are located in local storage (R.raw folder)
EDIT 2: When running the emulator with Android 12, I get the MediaPlyaer error (1, -2147483648). This corresponds to MediaPlayer.MEDIA_ERROR_UNKNOWN and UNKNOWN_ERROR respectively, as explained in this SO post. However, the proposed solutions there don't solve the problem here (the format should not be the issue, since they are .mp4 files). Any ideas?
EDIT 3: I submitted an issue with Google about this. If you're interested in a solution, star it here. Hope we can find the cause soon!
What fixed it was saving the video in AVC/H264 format and using that file.
From reporting this issue on Google's Issuetracker here, it turned out that the problem was actually with the encoding of the video files in this case. The video that wasn't playing was encoded in MPEG-4 format (.mp4) and exceeded the capabilities of the MPEG-4 software decoder.
I don't know why this wasn't an issue before Android 12 (videos were playing fine before), but at least this does fix the issue.
I have a problem with playing video on some devices. I am using textureview with mediaplayer, every methods of SurfaceTextureView are called but when I just call mediaPlayer.start(), immediately the listener with completition of playing is called. In log is this error:
E/MediaPlayer﹕ error (1, -2147483648)
When I list log from all applications, I can see some errors and I dont know if it is somehow related http://pastebin.com/rRxxQgdJ
This log is from CyanogenMod with Android 4.3.1 but on some other devices like Samsung Galaxy S3 mini this error is happening.
On my Nexus 4 everything works fine. I've tried convert that video with mp4 codec for android H.264 and even with ffmpeg but the result is still the same. I am using TextureVideoView implementation from here:
https://github.com/dmytrodanylyk/video-crop/blob/master/library/src/com/dd/crop/TextureVideoView.java
Thanks for any advice
As I already pointed it out here it may be due to the fact that video encoding parameters (profile, level, pixel format, etc.) are not supported on the platform, try playing around with the source.
I am working with html5 video tag, i am using .m3u8 file for source. I can not able to seek video by using currentTime property in android 4+ whereas if i using .mp4 file i can able to seek.
In ipad its working properly but not working in android. Please guide me to rectify this issue.
Thanks,
Thavaprakash. S.
HLS and Android are not the best of friends.
Some problems I know of are:
No adaptive bitrate switching: the first quality is picked, no switching will occur.
When pausing, the video restarts from the beginning (for example with VOD).
When going fullscreen, the video restarts from the beginning.
When offering a livestream with DVR, the stream starts at the beginning of the DVR instead of at the "live" moment.
You cannot seek. <-- this is the one for you
Aspect ratio's are not detected properly. (tho this should be fixed in 4.1)
On top of these problems, there is no support for HLS in pre 2.3 Android and in 3.0 it actually makes your tablet crash.
Basically: only use HLS on Android for live video without DVR and set the correct aspect ratio. Oh, and try to pick a "suitable" quality, cause it won't switch.
I'm trying to stream .m3u8 file using media player for Android. But it seems the media player failed to fetch the playlist:
Error log:
08-28 13:40:48.358: ERROR/LiveSession(8804): unable to fetch master playlist 'http://192.168.0.3:49152/live-streaming/192.168.0.5/6344.m3u8'.
The most frustrated things so far is I did this once and it worked fine, Once I tried for second time, blank screen just appeared.
http://vov.io/vitamio/ This library supports m3u8. see if it works a little better.
Maybe a long shot, but have you tried httplive://192.168.0.3:49152/live-streaming/192.168.0.5/6344.m3u8 ?
Using that in html5 video elements works in Android 2.3.5 for me.
I would suggest ExoMedia, a striped down easier-to-use version of Google's own ExoPlayer. Streams m3u8 well, easy as:
emVideoView.setVideoURI(Uri.parse("https://somewebsite.com/somepath/somelink.m3u8"));
I am new to android and trying to streaming video from my server.
When i run the application it gives Error "sorry,this video is not valid for streaming to this Device.." than i download and push to sdcard of my device(samsung Galaxy 5)this time video is playing.... i convert this video by SOTHINK VIDEO CONVERTER..
Any Help??
Thanks..
We ran into exactly the same problem, and I found a solution at this link:
http://code.google.com/p/android/issues/detail?id=9044
In short, if you have access to a Mac, you can encode the videos using HandBrake. Be sure to check the "Web optimized" checkbox. I'm encoding as format:MP4 file, Video Codec: H.264. After I did this and uploaded I was able to view the videos (or at least listen to them) in a 2.1 simulator, which had been giving that exact warning message before. I have not been able to get a hold of an actual 2.1 device, but I suspect it will work. When I confirm that I'll check back in here to let you know.
It seems that you are talking about sothink video encoder engine. Actually this program only supports the apple devices in ios system, for example, iphone, ipad and ipod.
Here is the official product homepage of sothink video encoder engine, and hope it helps!
http://www.sothinkmedia.com/flash-video-encoder-command-line/
The only issue for error "sorry,this video is not valid for streaming to this Device.." is that there is some problem in video format. Just correct the format/codec of mp4 and then it would run gracfully.