I want to create a new android app and this app consists in showing many video files (10 sec videos, without sound).
They are simple videos (black and white , without sound and with 10 sec), but They are more than 300 videos. I'm thinking to apply a codec or something like that, but the videos still have a big size (80-150 KB).
I also thought in split videos by frames, because the image compression is easier, but by this way the videos will have some breaks and I don't want to.
What is the best way to create an application with these requirements?
I would like the application could be played offline, so it's important to save the video files on the mobile phone, but in other hand the apps in Play store have in general 7-15 MB.
Some big apps (games usually) have small apk files and download additional content after installation. If you can, put the video files on a server and download them when the user starts the app for the first time.
I can suggest a crude solution. Keep the vieos as a zipped file in asset folder. When application starts, copy that zip file to sd card, unzip it there and them use it from that place
Related
I am trying to develop an android application which can securely play the videos size 64gb (around 200 videos combine size is 64). I don't want anyone to copy(or to provide maximum security). I have thought of 2 methods to do it.
1) store all the videos in the android assets folder(64 gb i am not sure if it can accumulate). Then providing the secure flag to the page where they are running to stop the screen and video grab, also i am planning for a check in which the wifi is switched off before running of those videos so that screen sharing is not possible.
2) i bought a SD card yesterday in which there was some encrypted video file, they also provided an app through which we can access those files but, i was able to access those files and i am pretty sure that that can be decrypted. Also i don't know how to do this?
It will be a great help if you guys can suggest some help me sought out this.
Thank you so much
How do I put audio files into an android native application without taking too much data (about 50 songs for example, at least), like in "Don't tap the white tiles" ... I thought about converting the songs into MIDI but there is lot of losses in the sound ... Or, if someone knows how to handle those kind of application, please, help
I'm not sure how to approach the next problem.
I'm developing a video based app which has to play different short video clips estimated at around 300 MBs.
Packaging the clips locally will probably cause less people to download it, and in the Apple App Store I don't think it's even possible due to the 100MB limit.(?)
How do I tackle the problem if I'm interested in downloading the clips to the user's device (while he uses the app) from a storage server?
What are my options?
I wonder what is the best option to store a single picture and short voice memo in one file? That needs to be openable by mobile phones in browser (iOS, Android) and preferably be shown as a single full screen photo and sound playing in background.
Effectively i'm looking for a most size efficient combination of something like MP3 + JPG.
If i do it in a single .mov i guess i loose a lot of space due to compression of each and the same frame 24 frames/second.
A rough list of options which comes to mind:
.mov
Mpeg4
H.264
QuickTime
HTML5 video format (Theora?)
store it in Flash (but this is not supported by iOS)
EDIT1:
tried storing h.264 in .mp4 container, files are small enough (around 1Mb), but somehow it does not work on an Android phone of my friend. Probably i need more testing, but it seems Android OS does not like proprietary codecs...
My most intuitive solution for this would be to store a JPEG and an MP3 separately on the server. To download one entity as a single unit, download a bit of JSON or XML data that contains pointers to the picture and the audio file.
If you are set on having one file do the job, you might try embedding the JPEG inside the ID3 metadata of an MP3 file (this type of metadata functionality exists to, e.g., store album art with a music file). You would want to make sure that the ID3 tag is near the start of the file. JavaScript within the mobile browser could fetch the file, a third party library could do the ID3 parsing (some Googling reveals that such libraries exist; don't know if they all support fetching a JPEG image). Then the JS would need to be able to feed the file into an audio tag for playback, which I'm not sure is possible.
Another thing to experiment with is a .MP4 which encodes the audio track along with a single video frame with a really, reeeaaallly long duration. You would have to experiment to determine if the mobile browsers handle that gracefully while also allowing smooth audio seeking. If they don't, then perhaps re-encode the frame with every 1-5 seconds to keep the bitrate minimal.
I've seen a number of similar questions, but so far I've not been able to get anything working.
I'm trying to playback a video (.MP4) from the res/raw folder and only get audio, no video. The video is short (about 3 seconds), small (350KB) and if I put the video on the device (Motorola Droid) directly, it plays fine. It also plays fine if I modify the app to read it from the SD card rather than the resource folder. The behavior is the same on both the emulator and the actual device.
Unfortunately, I need this video to be an intro shown just prior to the main screen for my app, so it has to be part of the package. Additionally, one of the app requirements is that the app is available offline, so I can't stream from a web server. I've tried a VideoView, SurfaceView and MediaPlayer, none of them work.
Is it possible to playback video from the resource folder? I've read something about compression possibly screwing the video up, is it possible to manually decompress the video and then play it, and if so, how would that work? This seems like it should be a pretty basic operation, am I just missing something?
I was having the same trouble, tried everything too, agree it should be easier... and documented. Just fixed by passing VideoView.setVideoUri a string with the android.resource protocol, as described here.
The first option doesn't work for me, but the second does:
Uri uri = Uri.parse("android.resource://[package]/"+R.raw.[video_resid]);
Hopefully works for you too.