[Q] WebView wont play mp4 files *SOLVED* - Android Software Development

Hey guys and girls,
I've created an app that loads a website using WebView and when a user clicks a link that ends with .3gp, it launches the media player and plays the video. But what I've got a problem with is trying to play a .mp4 file. When I click a link that ends with .mp4, it launches the browser and immediately closes, not playing. If i go to that same website directly from the phones browser(not using the app i created) and click that same like, it launches the player and plays the video correctly. I'm wondering how do I go about handling .mp4 files in my app?
Thanks,
-Kyle
Problem solved!

kyle4269 said:
Hey guys and girls,
I've created an app that loads a website using WebView and when a user clicks a link that ends with .3gp, it launches the media player and plays the video. But what I've got a problem with is trying to play a .mp4 file. When I click a link that ends with .mp4, it launches the browser and immediately closes, not playing. If i go to that same website directly from the phones browser(not using the app i created) and click that same like, it launches the player and plays the video correctly. I'm wondering how do I go about handling .mp4 files in my app?
Thanks,
-Kyle
Problem solved!
Click to expand...
Click to collapse
Hey mate,
as you have answered your question (sorry i couldn't help) but could you please tell how you did?
I really want to play mp3 with the default player and i don't have a clue how to do...
Thank you!
ced

did you solved it with Mediaplayer() function or what ?
could you please explain that how did you solve the problem ?
thanks.

Related

Video Playback Problem

I have an issue with videos on my Touch. Just recently I tried creating and watching a video for the first time. My photos and video folder is stored on my SD card.
I can record the video and it is in the right folder (the Touch can easily find it under videos), but whenever I try to play the video, Windows Media Player says "The source filter for this file could not be loaded".
Anyone know how to fix this problem?
Nobody?
screw windows media, just install TCPMP
kingabraham3 said:
screw windows media, just install TCPMP
Click to expand...
Click to collapse
I second that and if you can, get the latest Core.
kingabraham3 said:
screw windows media, just install TCPMP
Click to expand...
Click to collapse
Yeah, I've got it installed and it does work for these files.
Any way to easily make TCPMP the default app instead of WMP?
I would like to know why WMP won't work though. It bugs me when something doesn't do as it should.
in TCPMP, go into settings > file assoc. and select the ones you want. as far as WMP, i'm sure there is a relatively simple fix, but at the end of the day, WMP is still a completely useless player.
Thanks! I'll go and check that out.
Edit: One more quick question for anyone that knows. Even though I associate TCPMP with .MP4 video files, when I use the cube and select videos and choose a video that I've recorded and hit play, the cube by default brings up WMP to play the video. There must be somewhere in the registry where I can change this to default to TCPMP for playback right?

MT3G wont play Videos

I'm a newbie to my Android phone, I am in the Caribbean so I have no access to the market on my phone, i had to trick it to get apps on it at first because it would not see the content of the SD card because i could not download the File Manager.
I noticed I could not play videos so after getting the file manager I decided to download a video player and hoped that would solve the problem, well all it does is play the audio of the movie and my screen remains dark and blank, what am i doing wrong guys? and if its the software that's the problem where can i download a good video player for free that will work?
jamgirl said:
I'm a newbie to my Android phone, I am in the Caribbean so I have no access to the market on my phone, i had to trick it to get apps on it at first because it would not see the content of the SD card because i could not download the File Manager.
I noticed I could not play videos so after getting the file manager I decided to download a video player and hoped that would solve the problem, well all it does is play the audio of the movie and my screen remains dark and blank, what am i doing wrong guys? and if its the software that's the problem where can i download a good video player for free that will work?
Click to expand...
Click to collapse
I'm guessing you're unrooted, correct?
For the videos (which I assume you're playing off the sdcard) did they ever work? If they didn't it's going to be because they're using a codec your phone doesn't support (probably divx, xvid, although I doubt the avi container would show up in many video apps), so you'll need to convert them or find a player that does support them.
jamgirl said:
I'm a newbie to my Android phone, I am in the Caribbean so I have no access to the market on my phone, i had to trick it to get apps on it at first because it would not see the content of the SD card because i could not download the File Manager.
I noticed I could not play videos so after getting the file manager I decided to download a video player and hoped that would solve the problem, well all it does is play the audio of the movie and my screen remains dark and blank, what am i doing wrong guys? and if its the software that's the problem where can i download a good video player for free that will work?
Click to expand...
Click to collapse
Can you record video with your camera/camcorder app and then play them back?
If so then you can play video just fine and it's just a codec issue.
If not then it sounds like an app or rom issue.
Binary100100 said:
Can you record video with your camera/camcorder app and then play them back?
If so then you can play video just fine and it's just a codec issue.
If not then it sounds like an app or rom issue.
Click to expand...
Click to collapse
Yes Binary you are indeed correct, it was a codec issue, i can indeed play videos my camera records plus i downloaded an mp4 from online after i posted my complaint here and it played just fine on my MT3G, the problem was i converted the movies to play on my phone with "Allok 3GP PSP MP4 iPod Video Converter" but for some reason it seemed to mess up the mp4 format because it wont play on my phone but it plays back fine on my computeri even redid them in 3GP and my phone still didnt play them, I downloaded another converter and the movies are indeed playing just fine. thanks again for your speedy response
jamgirl said:
Yes Binary you are indeed correct, it was a codec issue, i can indeed play videos my camera records plus i downloaded an mp4 from online after i posted my complaint here and it played just fine on my MT3G, the problem was i converted the movies to play on my phone with "Allok 3GP PSP MP4 iPod Video Converter" but for some reason it seemed to mess up the mp4 format because it wont play on my phone but it plays back fine on my computeri even redid them in 3GP and my phone still didnt play them, I downloaded another converter and the movies are indeed playing just fine. thanks again for your speedy response
Click to expand...
Click to collapse
No problem and you're welcome.
I'll close the thread for now. If you need it opened again for whatever reason, send me a private message with a link to this thread and I'll open it up again for comments.

.mkv and subtitles

I was looking around and saw that the video player does not display the subtitles for .mkv files...does anyone know if it would be possible to somehow enable the video player to be able to display them?
Sent from my HTC Dream using XDA App
Bumping.
I've got the same question. If the default player doesn't play mkvs with subtitles, is there another player that does so (already tried Rock Player).
I think we're outta luck. I asked this question a while back and got nothing but crickets.
If you absolutely need the subtitles, you could always hard encode them, but it is probably only worth the time if you absolutely cannot do without subtitles.
Nothing on the market right now which will get the subtitles. It sucks I know. There is a player in development that will support it but its not too close to release.
Sent from my SGH-T959 using XDA App
Have you guys tried mVideoPlayer?
It has pretty decent support for subtitles. Not sure if it plays embedded ones in mkv's, but it definitely does support subtitles.
Strange, I recall seeing a thread on Xda that had the same question but there was a guy who posted a picture/screencap of mkv and subtitles playing on a video player. I should have bookmarked that thread.
bchalk said:
Have you guys tried mVideoPlayer?
It has pretty decent support for subtitles. Not sure if it plays embedded ones in mkv's, but it definitely does support subtitles.
Click to expand...
Click to collapse
I've tried this but it didn't work. I extract the subs in .ass format and tried to load it but mVideoPlayer couldn't find the file even after I change the directory.
Try searching for meridian player in the market.
Killer Bee said:
I've tried this but it didn't work. I extract the subs in .ass format and tried to load it but mVideoPlayer couldn't find the file even after I change the directory.
Click to expand...
Click to collapse
Did you make sure to rename the .ass file to match the .mkv you extracted it from? Make sure the file names match and put them both in the same directory on your phone. mVideoPlayer will load the subs automatically after you open the .mkv. It works flawlessly for me on my Galaxy S.
To view MKV files with subtitles, I've been using MKVtoolnix with MKVextractGUI to extract the subtitles from the MKV container. After the extraction, make sure the subtitle file(.ass, .srt, etc.) has the same name as the MKV file and place it in the same folder as the video. When that's done, use mVideoPlayer to play your file.
Hope this works for you!
I would include links for you guys, but there's a restriction for new users. A quick Google search should help you find the programs you'll need.
daweedk1991 said:
I was looking around and saw that the video player does not display the subtitles for .mkv files...does anyone know if it would be possible to somehow enable the video player to be able to display them?
Sent from my HTC Dream using XDA App
Click to expand...
Click to collapse
the problem with supporting subtitles in .mkv containers...is just that....mkv is JUST a container format, which can contain a myriad of video, audio, and subtitle file formats. And there are several subtitle file formats...
mVideoplayer supports external .SRT subs, so what one can do is use a tool like virtualdubmod or mkvtoolnix to demux subs out of the mkv container and assuming they are SRT, just extract them and name them to the exact name of the MKV file. it's also possible to download SRT subs fairly easily for common videos, but there's the possibility that text timing can be off....
...apparently mVideoPlayer supports .ass as well....
Oh, I just had to place the subs in the same folder as the Video. That worked for me.
Breaking: mVideoPlayer 2.20 updates states that it now supports subs in MKV's. I haven't tried it yet, I'm just now dling it.
Peep here.
Support for subtitles in MKV files, but you need a phone that supports playback of mkv.
Click to expand...
Click to collapse
edit: more info
Yep, now it is time again for another beta version of mVideoPlayer. This time the big news are subtitle support in mkv files for phones that support playback of these files. (Galaxy S for example).
Full change-log:
- Support for subtitles in MKV files for all Galaxy S owners!
- Toggle subtitle on/off has been replaced with 'Subtitle Tracks' since MKV files may have multiple subtitle tracks.
- Now remembers previous search phrase in all search dialogs.
- IMDb Info accessible from poster search activity through long press on movie.
- Fix for poster search cache showing up in Gallery app on Android < 2.2 devices.
Click to expand...
Click to collapse

AVI playback?

Does the HTC DHD support avi playback?
You can download rockplayer from the market place which plays avi files, not 100% sure if it can play it natively
Sent from my GT-I9000 using XDA App
masumali said:
You can download rockplayer from the market place which plays avi files, not 100% sure if it can play it natively
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
Thanks for this - I did download, but the problem I'm having is that I want to play it from a DLNA server on the network. Can I change the default program with which a video file is opened so that it opens with Rockplayer?
Otterjasie said:
Thanks for this - I did download, but the problem I'm having is that I want to play it from a DLNA server on the network. Can I change the default program with which a video file is opened so that it opens with Rockplayer?
Click to expand...
Click to collapse
try vplayer.
Yeah, for example, if you go to Gallery and then slide right, you can browse media players on the network, so I can get to my avi's... but they wont play Can you change what it trys to play them on?

MP4 on Xoom?

Anyone know of a program that will play MP4 video files on the Xoom? All my video files are in the format and I'd prefer not to convert them all when I put them on the Xoom.
I couldn't find the VLC Media Player for Android...
Any suggestions?
BBalz said:
Anyone know of a program that will play MP4 video files on the Xoom? All my video files are in the format and I'd prefer not to convert them all when I put them on the Xoom.
I couldn't find the VLC Media Player for Android...
Any suggestions?
Click to expand...
Click to collapse
Rockplayer works fine.
QQ player is my favorite. XD
It plays my mp4 like none other can.
bwcorvus said:
Rockplayer works fine.
Click to expand...
Click to collapse
Not for me. It plays the movie choppy and the volume sounds like a voice changer on a bad horror movie.
Comical... but not watchable.
Any other suggestions?
Make sure you are using the universal one, not one for a specific device.
http://rockplayer.freecoder.org/index_en.html
Yeah I tried the Universal one and hardware decoding. No luck still.
i have a question.....how are you guys transferring your files over to the xoom? i tried to drag and drop an mp4 to mine but i get an error message saying "this type of file is not supported on this device". is there something i'm missing.
jokeefe10 said:
i have a question.....how are you guys transferring your files over to the xoom? i tried to drag and drop an mp4 to mine but i get an error message saying "this type of file is not supported on this device". is there something i'm missing.
Click to expand...
Click to collapse
Ignore it.
I thought mp4 was a supported android format? What format is needed for HD playback via the xoom's video player?
jparker36 said:
I thought mp4 was a supported android format? What format is needed for HD playback via the xoom's video player?
Click to expand...
Click to collapse
You get the same error transferring mp3...think it's because of the way the pc sees the xoom. Just hit ignore.
Sent from my PC36100 using Tapatalk
there is no ignore option....i only get "skip, skip all or cancel", no matter what i choose it doesn't transfer the file. i can transfer mp3's fine but no type of video file will transfer. i'm pretty stuck right now.
jokeefe10 said:
there is no ignore option....i only get "skip, skip all or cancel", no matter what i choose it doesn't transfer the file. i can transfer mp3's fine but no type of video file will transfer. i'm pretty stuck right now.
Click to expand...
Click to collapse
This is what i get, i just hit yes and they play fine.
you can also try arc media from the android marketplace.
No special player needed. I just use root explorer, select the movie and it just plays... Natively...
bwcorvus said:
This is what i get, i just hit yes and they play fine.
Click to expand...
Click to collapse
i'm still on windows xp so i don't get that message. frustrating!!
jokeefe10 said:
i'm still on windows xp so i don't get that message. frustrating!!
Click to expand...
Click to collapse
Try renaming the file .zip then rename after the copy.
no luck renaming it zip.....i had to rename it .mp3 and it allowed the transfer. i renamed it back to mp4 but the video is choppy. i'm using rockplayer lite from the app market for now.
Can't you guys just open the movie in the Gallery and have it play using the built in video player?
jokeefe10 said:
no luck renaming it zip.....i had to rename it .mp3 and it allowed the transfer. i renamed it back to mp4 but the video is choppy. i'm using rockplayer lite from the app market for now.
Click to expand...
Click to collapse
I haven't found a single video player app in the market that work properly and I tried vplayer, Rockplayer and another one, I think it was called qqplayer.. The native player will recognize and play MKV but no sound and very choppy. I successfully played a couple of MP4 files though. Tried an AVI and it gave me the same error message and even though I got is copied to the Xoom, it never showed up in the Gallery.
keitht said:
I haven't found a single video player app in the market that work properly and I tried vplayer, Rockplayer and another one, I think it was called qqplayer.. The native player will recognize and play MKV but no sound and very choppy. I successfully played a couple of MP4 files though. Tried an AVI and it gave me the same error message and even though I got is copied to the Xoom, it never showed up in the Gallery.
Click to expand...
Click to collapse
I just put an Avi on mine, and used rock player and it worked just fine.

Categories

Resources