"Sorry this video cannot be played" - Android Software Development

I am developing an application which is supposed to play videos from the raw resource folder. I'm trying to get this program working on my HTC Desire but every time I try to get the videos to play I get the aforementioned error message, the exact same videos play fine using the default media player however. They are in the MPEG-4 AVC format at a resolution of 320x240 and using AAC audio, muxed in an MP4 container. Could someone give me some idea as to what I may be doing wrong or some sample code for playing videos on this device? Thanks.

Related

Silly Question..!

Ive tried encoding a few movie clips to watch on my Hermes I've tried mp4 and avi but just get an error message, file type not supported.
Whats the correct file type? cam records in mp4 and plays back, why not my conversions?
Thanks, Chris
se4me said:
Ive tried encoding a few movie clips to watch on my Hermes I've tried mp4 and avi but just get an error message, file type not supported.
Whats the correct file type? cam records in mp4 and plays back, why not my conversions?
Thanks, Chris
Click to expand...
Click to collapse
Try this thread
http://forum.xda-developers.com/showthread.php?t=281521&highlight=tcpmp
Mike
can i not just convert a video file to mp4 or the correct file type and play it through windows media that cam on the device?
Depends on what you are using to encode the video. The WMP may not have the decoder. Although, AVI movies all have the same *.avi, all AVI movies can be different, depending on what encoder you used to encode the video and the audio. Hence, not all player is able to play all AVI movies. I think it goes relatively the same to MP4 also.
Anyway, what format are you trying to convert. You can go Microsoft homepage and download their Windows Media encoder to encode your stuff into WMV format which should play nicely on your phone.
I have been using Xilisoft MP4 convertor, converting from .avi to .mp4
I will try out the Windows Media encoder and encode into WMV format.
Thanks for the info
converted ok but its not full screen when selected..! any ideas?
its ok sorted it out...!!!!!!!!!

Can the Vibrant play .mkv files?

I downloaded some Family Guy Episodes that are like 25MB each are .mkv files. I put them on my SD Card, and they play for a few seconds, and than a message pops up saying this video cannot be played. However, the video actually starts and I can see and hear everything. So is there a way for this message to not pop up? Thanks.
BigWorldJust said:
I downloaded some Family Guy Episodes that are like 25MB each are .mkv files. I put them on my SD Card, and they play for a few seconds, and than a message pops up saying this video cannot be played. However, the video actually starts and I can see and hear everything. So is there a way for this message to not pop up? Thanks.
Click to expand...
Click to collapse
The built in video player usually handles .mkv containers just fine. Having said that, .mkv is merely an advanced CONTAINER format that allows for the easy assembly of video, multiple audio streams, subtitle streams, chapters, so on and so forth.
The contents of those streams can be almost anything. And this is where your problem lies.
In the windows universe with advanced players like KMPlayer, GomPlayer, VLC, MPC, and advanced codec packs like Combined Community Codec Pack, it is easy to create a situation where your Windows PC will play pretty much everything you throw at it.
For us, though the native video player is probably the best one ever released on the Android platform, it is not perfect. I would imagine that those MKV containered episodes are using a codec for video or audio that the player is stumbling over, or one of those streams is using a bitrate or encoding method that the player hasn't accounted for.
So far in my experiences the built in player DEFINITELY does not like mkv's where the video format is AVC1 encoded using Nero Digital's version of the AVC1 encoder. Also, I've encountered audio issues with AAC audio. This isn't a problem with the AAC audio though, rather it's bad MKV stream header information where whatever tool was used to mux the MKV failed to put in proper bitrate info.
Bottom line, and I'm speaking from the experience of having over 3 terabytes of media on my media NAS server here at home, MKV containers do not necessarily have any "standards" to them, in the sense that being an MKV doesn't really tell you what the video and audio are within. This is just due to the nature of the MKV container format, but it is a problem slowly disappearing as more people use more standard encoding bitrates and codecs within these containers.
As a suggestion, visit the market and download ROCKPLAYER ARM7 version. When I've encountered video files the native player won't play, Rockplayer usually does (with the notable exception of anything using Nero Digital AVC1). Rockplayer is derived from the FFMPEG codebase, so it's a tad more forgiving in what it will play.
It's either another player, downloading a different set of those episodes, or re encoding those episodes...
Thanks RockPlayer Arm7 worked .
The rock player has been able to play videos (tv episodes) that I was not able to play with the default player. I don't know much about codecs, but it's worth a try.
My phone played some 1.4gb TV show episodes that are x264 video and dd5.1 audio 1280x720 (High definition) inside an MKV file just fine.
Maybe your phone was just having a fit because you were trying to watch episodes of family guy?
Lol, might've been. RockPlayer works though, so it's all good .
Anyone know if the full paid version of Rockplayer allows multiple audio and sub streams?
I need that BADLY.

Video play

I have HTC Desire HD and not play the video files.
Please help.
Hi,
What format are these video files? Encoding, resolution, etc...
Have you tried re-encoding them with Handbrake?
The default player will play .avi video files which are mp3 encoded.
Sent from my Desire HD using XDA App
hi,
Download this tool:
http://fixounet.free.fr/avidemux/
It is imo the best video converter available, and its free.
Simply select from the side 'MPEG4 ASP (Xvid)' for video, and AAC for audio. And for format select MP4. The reason why these are the best settings for the Desire HD is that these codecs are supported at the hardware level.
Ok after you're done selecting the formats, the important thing is when you click save, you must write .mp4 at the end of the filename. Without this then the file will have no extension.
You should get the app Rockplayer from the market to play your vids. Its great because it has a hardware playback mode and will play any file you converted, VERY smoothly as long as you chose the settings i described above. I was stunned when i watched a trailer from Gran Tursimo 5 that i converted.
Anyway hope this helps.
Format is 480p BRRip Xvid AC3-FLAWL3SS.avi.
Before I have the Galaxy S and watched moves with mVideo Player, so as I got my HTC installed the same player, but it could not run a movies. I started to install different app palayers and managed to let them in VPlayer beta.
Hi,
I use RockPlayer, you can play Divx, Avi, Mp4... no need change the format I have a full version from 1.5.1 Mod edit: warez url removed from my Megaupload Account
Regards!

Video Format Playback (AVI)

Hey everyone,
I've been trying out all the different apps that claim to be able to play an impressive array of video formats, but none of them can play a simple avi video file (even though it says avi support/playback in the app descriptions).
So, my question for you is, have any of you discovered a way to watch avi files, or any other video formats on the legend without flat out converting it to a playable format? (ex wmv, 3gp, mpeg are the ones supported i believe). Post your comments/thoughts/experiences!
Thanks for reading,
Michael
yxplayer or something like that, and rock player are doing just fine for me...
Vplayer is good
Sent from my HTC Legend
Just for the record, note that AVI is not a video format but a video container.
An AVI video can be encoded in MPEG4, WMV and so on, so even all the players claims they can play AVI videos, that doesn't meant they can play all the formats found in AVI files.
FYI: http://en.wikipedia.org/wiki/Audio_Video_Interleave
And: http://en.wikipedia.org/wiki/Comparison_of_container_formats
Never the less it's not the format that is not supported by the Android core, it's the container...
That's why AVI video will consume much more computing power, the program just has to calculate those frames "manually"...

Unable to play MP4 Video in Player

Hey all,
I never really tried playing video on the nook, but I just tried playing an MP4 and it gives me a "Sorry, this video cannot be played" error.
I've looked into it and it seems that the nook actually supports MP4 playback.
Running on Mirage 7.2.
Also the information VLC Player (on my PC) gives for the mp4 file:
Stream 0
---------
Type: Video
Codec: H264 - MPEG-4 AVC (part 10) (avc1)
Resolution: 640x480
Frame rate: 29.970023
Decoded format: Planar 4:2:0 YUV
Stream 1
---------
Type: Audio
Codec: MPEF AAC Audio (mp4a)
Channels: Stereo
Sample rate: 48000 Hz
I appreciate any effort to sort this one out.
I have had nothing but problems using VLC player on my rooted nook. It has to have soft-decoding enabled for lots of movie files to play on it. This is using the VLC player through the playstore.
One player on the playstore I have had better luck with is called MX player or the Moboplayer, both of those will play the native .mp4 video formats for me.
~~~~~~~~~~~~
Also you might have a corrupted video file if it is not playing on your computer with the correct video codecs downloaded for it. Might want to try to re-download that one video you are having problems with. Check that file in a different video player on your computer and see if it plays. If it doesn't, then you either do not have the correct video codecs downloaded onto your computer for it or it is a corrupted file. On windows OS I have to download a KLite video codec for .mp4 files to play. VLC should play that file by default though on the computer.
~~~~~~~~~~~~~~~~~~~~
Try using the program "handbrake" to encode your video files for playback on the nook to keep from having to soft decode it. Soft decoding takes up lots of processing power on the processor on your nook color. There are guides to show you how to encode video files for your nook color using handbrake here. http://www.androidtablets.net/forum...using-handbrake-convert-video-nook-color.html
Thanks for the quick response.
meteorrock said:
I have had nothing but problems using VLC player on my rooted nook. It has to have soft-decoding enabled for lots of movie files to play on it. This is using the VLC player through the playstore.
Click to expand...
Click to collapse
I only used my Windows VLC Player to determine the codecs information. What I'm trying to do here is to run the mp4 in the native CM7.2 player.
meteorrock said:
Try using the program "handbrake" to encode your video files for playback on the nook to keep from having to soft decode it. Soft decoding takes up lots of processing power on the processor on your nook color. There are guides to show you how to encode video files for your nook color using handbrake here. http://www.androidtablets.net/forum...using-handbrake-convert-video-nook-color.html
Click to expand...
Click to collapse
I will try to re-encode the file. Maybe something with the audio stream there...
Will update! Thanks!
OK it works with the directions what you gave
I tried to give it a go alone with Handbrake. Didn't work.
Then I followed the steps in the link you provided and it plays in the default player, including H/W decoding.
Thanks a bunch!

Categories

Resources