I would like to show some video in my android application.
Video are like: http://myserver.com/video/myvideo.mov All the video are in .mov and some in .flv.
.mov have H264 - MPEG-4 AVC (avc1) video channel, and MPEG ACC Audio (mp4a) audio channel.
.flv have Flash Video (flv1) video channel, and MPEG Audio layer 1/2/3 (mpga) audio channel.
If I play the .mov with the default android player I can see the video image, but I can't hear anithing.
With the .flv I can see and hear the file in the default android player.
Is there a way to play correctly the .mov with the MPEG ACC Audio (mp4a) audio channel?
Anyone know if there is a custom library to play this .mov files? Thank you in advance!
As stated here MOV container even with H264/AAC inside is not supported in Android. The underlying reason is that MOV (aka quicktime file format) is a proprietary container from Apple (it is a close one from MP4 but still not the same) - most of the time it works 100% only on Apple device and/or quicktime player.
FLV container from Adobe is also not supported in Android (FLV can be packed with H263 or H264 video inside).
It can work on some device but as you experienced it, it can be clunky and surely inconsistent across devices.
Your best bet is to package/transcode your file in a format where you know you will have cross-Android compatibility.
If you want it badly you could think about building your own video player/decoder to play back mov/flv files (like with ffmpeg) but it is an advanced project in itself and providing code for that would be outside of the scope of stackoverflow - maybe have a look here.
Related
I am trying to play video on chrome browser, which has been recorded from android device.
video link is this https://mumbaistreet.s3.amazonaws.com/Roshani/Video/REC_1428044820068.mp4
Video is displayed on html5 with video tag, problem is video is not displaying but audio is playing.
Video codec is MPEG-4 Video, AAC
If i change codec video does not play on android device.
That file contains video in MPEG-4 Part 2 format, which isn't supported by Chrome. You would need it to be in H.264 (aka MPEG-4 Part 10), or some other supported format, like WebM. H.264 should work on most Android devices, although I guess there might be some older devices that don't support it.
I am currently using Wowza to stream videos. I am currently trying to integrate Wowza, Android, and ChromeCast Device (CCD). According to this document, https://developers.google.com/cast/docs/media, Google Cast supports the "MP4 protocol".
So, my question is this: is MP4 a streaming protocol, file format, or both?
In the ChromeCast Android demo applications, they simply pass a URL like this http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4 as metadata to the CCD.
To me, this implies that no server is required to stream the MP4 file. Meaning, I won't even need Wowza as an intermediary party to stream.
Is this understanding correct?
It seems that the client player will then be responsible to interact with the MP4 file directly (e.g. seek, pause, stop, play, etc...).
While you've already accepted an answer, and gotten your app to work (which was likely your ultimate goal), I thought it might be helpful to answer your question as well about what MP4 really is.
MP4 is a video container format; inside the MP4 container is video stream data (generally encoded in the H.264 format) and audio stream data (often encoded in the AAC format). The client player can interact with it directly because the Chromecast's browser has HTML5 video support for interpreting the MP4 container format and playing back the H.264 video and AAC audio, but it isn't "streaming" in the way that term is often used ... it's just downloading it from your web server in chunks and playing it back. There's nothing wrong with this if it's performing as you'd like (in fact, this is one of the big benefits of HTML5 video, that it doesn't need a streaming server backend), but if you actually want true media streaming (to leverage things such as adaptive bitrate switching, licensing, and so forth), you would have the MP4 file served via Wowza rather than via your web server.
If you simply have an MP4 file, just pass its url and it should work fine, just like the samples (CastVideos) projects that we have on the Github.
I have searched high and low, and nowhere can I find if newer Android/iOS devices ship with media players that can stream media (with the following characteristics) from inside an app:
Streaming MPEG-TS over UDP/IP
Video using h.264 codec
Audio using AAC codec
Is this even possible? If not, why (is the container incompatible, or some other reason)? If so, how (what software/media player do they need)? If it is possible, I need a way to open that media player from inside the app, but have no idea how to do that. Thanks in advance.
I found that the default video player on Android 2.2.1 can't play the format of H.264(640*320) video file, instead it can play the format of H.263(353*288) video file.
However, the quality of H.263 video is very bad, anyone can suggest how to make the Android 2.2.1 default player can play H.264 video?
Other solution is welcome.
Thanks
According to this, Android supports h.264 Baseline Profile playback. So your h.264 video is not Baseline Profile or possibly it contains an unsupported audio.
You should note that there are many h.64 flavors, so you should check your video file: http://www.niallkennedy.com/blog/2010/07/h264-video.html
I'm creating mobile version of YouTube-like website. And i'm going to use Darwin Streaming Server for streaming low-res clips compressed with x264 and NeroAAC and hinted with MP4Box.
When i'm playing it with VLC player streaming works fine, as expected. When i'm trying to open URL with my HTC Hero, it switches to player mode, then starts "loading video" animation, then after some time it shows "unable to connect to server". Sample movies provided with DSS streamed fine regardless bitrate.
I tried few encoding options, but always the same result. I suspect nocabac and level=11 but it didn't changed nothing.
Is there some more specific encoding options for such type?
Thank You!
264 and AAC are supported, but is better to use:
a)RTSP streaming URL for mobile video playback. H.263 video and AMR audio.
or
b)RTSP streaming URL for mobile video playback. MPEG-4 SP video and AAC audio.
Android Streaming is only supported with 3gp format files
rtsp://myStreamingserver/myvideo.3gp