What is the Video Format for Asus Transformer? - android

I have an Asus Transformer and would like to put a lot of movies in it. However, it seems like it's very hard to find the proper format for it.
I've tried to convert the movies both in AVI and MP4 format where video codec is either MPEG4/H264/H263/XVID and audio codec is either MP3/AAC/AC3/PCM. However, despite many alternatives, none of them works and I am going insane right now.
At the moment, I have 2 720p movies that can be played and they are AVI with XVID codec. I tried to convert a movie with the same format container and video codec (AVI with XVID) but it does not work.
Do I need a special converter to make it work? Everything is just really weird.
Thank you so much for the help.

Have you try this: http://www.pavtube.com/dvd_ripper/ to convert the files into android .mp4 format?

Related

get audio from one mp4 and use it in resampled (smaller) mp4 in android

I have found a solution for resampling an .mp4 video taken with the camera on the device to make it smaller (resizing by resolution, bitrate, and framerate). The problem is, it doesn't carry the audio over.
I have looked at several different options for trying to get the audio out of my source (large) mp4 and push it into my smaller mp4 and I can't not seem to get any of these procedures to work correctly.
I've tried the following:
1) extracting the PCM audio from the source using: How do I extractor audio to mp3 from mp4 using java in Android?
2) converting the PCM to M4A and then adding the M4A to the smaller MP4 using: https://github.com/tqnst/MP4ParserMergeAudioVideo/blob/master/Mp4ParserSample-master/src/jp/classmethod/sample/mp4parser/MainActivity.java
that's the method I got closest with but the audio was really slow and didn't match up at all with the video in the smaller mp4.
I also tried a "direct copy" from one mp4 to the other with a variation of this: Concatenate multiple mp4 audio files using android´s MediaMuxer
that made my smaller mp4 actually larger (in file size) than my source mp4 and it didn't actually move the sound over.
The android documentation for MediaMuxer is pretty terrible and I can't make heads or tails of what I need to do to get this to work. It seems like it should be a pretty trivial task....
any suggestions or advice would be greatly appreciated.
TIA
I ended up just using ffmpeg with this solution:
https://github.com/WritingMinds/ffmpeg-android-java

Saving h.264 streaming video using MediaMuxer on Android

(I'm not really good in English but I'll do my best.)
I'm working on a Android app that saves received h.264 streaming video/audio frames into a clip. And I ran into a problem that mentioned here, "Missing codec specific data."
I tried some method to solve this.
Assign pre-defined codec specific data.
Which I borrow from this post, It worked surprisedly perfect - but only on my personal phone (Sony Xperia Z3, Android 5.1.1). Most test devices just crush.(Android 4.3/4.4).
Parsing codec specific data from video stream itself.
On my phone it crushed. But somehow works on some devices.
I use this code as an example.
Create a encoder to encode received video frames then pass them to MediaMuxer.
Yes it's a stupid idea, it doesn't work.
Create a decoder to decode received video frames, pass them to an encoder, and then pass encoded frames to MediaMuxer, save it.
App isn't able to get any free buffer from the encoder. DEADLOCK.
Now I'm running out of ideas.
The last hope I got is using ffmpeg.
But the resources I found are encode/decode videos from video files, not from stream.
Any suggestions?
Thanks in advance. :)
After been trying out a week including weekend studying h.264 spec and more.
I found out the problem isn't about video.
It's the AUDIO that is causing app to crush.
Case close, thanks for viewing. :\

What format can I use to record on android and play it in ios

I have tried so many different formats when I record a audio on android, that I get dizzy by just thinking about it. When I record by using .wav on ios, I can play it on android without any problem. But Im not able to play the recorded audio from a android on a ios.
I have tried to play it as a base64 and streaming by using the url. I don't know what to do play it, since nothing seems to work. But if some one just can point me in the right direction when it comes to what format I should use to record the audio on android so I can play it on ios, I would be very greatfull.
What I have so far:
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setAudioSamplingRate(44100);
recorder.setAudioEncodingBitRate(96000);
recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
but I got no idea what I should name the file I record on (like this record.mp3). Im using cordova so I have to do it when I start the recording. I have tried mp4, m4v, m4a, mp4, mp4, mpeg4 and mpeg. I have tried to record the file as a wav file as well, but then I get audio/x-wav in my base64 string.. Do I need to change the samplingRate, bitrate, outputformat or audio encoder to something else if I want to use .wav (not x-wav) and still make it work on ios?
After googling this issue, it seems even the very popular app "Evernote" has the same issue, and users are gutted about it. I did come across this question here on SO:
audio format for iOS and Android
They use a web service to convert the files to mp3, which works universally. I am sure you could find some way to do this without a middle man, but it should "point you in the right direction".
Hope this helps.
Cheers

Accessing an mpeg-4 encoded RTSP live stream (Axis server) in Android with the .amp extension

I have a Samsung Galaxy Tab (Android 2.2 Froyo, etc) that I am developing on. I need the application to access a stream via IP, and the stream is originating from an Axis 241Q. The Axis is set to use .mp4 encoding, and I see that Android supports .mp4 natively. The Axis server also provides an RTSP URI to access the stream from media players via the local network.
Let me lead in to this by saying that I know less than nothing about video encoding standards and containers, so I apologize if this is a "no duh" issue.
My question is, how do I get to this stream using an Android VideoView? The Cliff's Notes version of the code I would use to start up the view in my Activity's onCreate():
VideoView v = (VideoView) findViewById(R.id.feed);
Uri video = Uri.parse("rtsp://local/path/to/feed.amp");
v.setVideoURI(video);
v.start();
I've used this with some test .3gp stream URI's that I've found on the internet and it seems to work fine, but all of the test streams that I found were done over HTTP and not RTSP so maybe I have to do a little more magic to get RTSP going; I can't imagine why that'd be though. I do know that Android supports RTSP in URI String resources for its MediaPlayers. Then again, I know nothing about streaming video so I may be wrong in assuming that it works the exact same way.
Regardless, when I attempt to access the Axis feed locally, the feed will not load; my assumption is that this results from use of the .amp extension instead of the ones listed in the Android docs but I have absolutely no idea. I can pass this URI to QuickTime and other such media players with positive results so I'm also assuming that the .amp file extension isn't THAT bizarre. I've had a hard time really finding out because Googling .amp with anything else, even using quotes and whatnot, yields a tedious set of results because of "amp" showing up in HTML escape characters.
The first question is, am I missing something obvious? I'm thinking not but there's a good chance that it's so.
The second question: is there a simple way to access this RTSP stream without having to brew up an insane solution on my own? Any existing and FREE libraries that are already in the wild and could make this easier on me would be a huge help. I was initially going to try out the gstreamer java bindings but after looking at the project page I saw that gstreamer relies on Swing and I don't believe Swing is included in the Android Java jars.
Can you provide the MPEG4 configuration of the stream?
Extension .amp can be replaced with .3gp on all Axis products. So try Uri.parse("rtsp://local/path/to/feed.3gp");. But, extension shouldn't make any difference in RTSP because media stream is determined by SDP, and not its "extension". So it can be media.jpg and server will actually stream H264 video, and not JPEG image.
If that doesn't work, try to configure your MPEG4 stream and be sure that you check ISMA compliant and set Video object type: SIMPLE (not Advanced Simple). That stream now can be played on all media players that decode MPEG4.
If you have difficulties, comment here, and I will update my answer to add new stuff.

Android convert pcm file from AudioRecord to smaller file

I tried to record audio in Android. The quality of the sound using the MediaRecorder really sucks.
So I tried writing the sound to a stream using the AudioRecord function. Great quality but pcm-files are too large in size as I want to upload them to a remote server.
Does anybody know how to compress the pcm (like mp3 or else)?
Any help is mostly appreciated.
Tom
As far as I know, there are no built-in audio converters in Android. Your best bet is to use third party library, maybe even a c/c++ one.
Look at this question for more info: How to encode a WAV to a mp3 on a Android device

Categories

Resources