I am making a Unity dictionary app. It contains 10000 pronunciation mp3 files.
Every time the user selects one English word, it will automatically pronounce the words.
I can successfully install the apk file to my mobile phone. Unfortunately, it failed and stopped to run. It may be due to out of memory!
Total apk file size is around 65M, which is ok to me. What is the best way to handle 10000 mp3 files in my case?
Check out this article:
http://blog.theknightsofunity.com/wrong-import-settings-killing-unity-game-part-2/
Maybe setting Load Type to Streaming can help.
I believe keeping 10,000 media file in the app itself is not a good idea. As you said the APK size is 65MB it's very big for a simple app. I will recommend to keep those files in web and use URL in the app to download them at the beginning. after downloading save them to SD card or phone memory and access them from the storage location. It will not crash your app.
Related
I want to develop an Audio Monitoring Software, for example to know how many ads of certain company where published on x radio station ?
There is any way to analyse "realtime" the audio stream and detect when any version of an ad is played on the radio?
Or the best way is to analyse every x seconds the audio fragment, if this is the way to go, what can I do to know if only a segment of an audio has the sample audio (for example analyse 20 minutes of radio and return true if the spot (ad) where player in that audio sample)
(Sorry for my English, I hope is understandable)
I guess realtime could be difficult due to the fact that you have to analyze your radiostream. For that you need to cache, analyze / fingerprint and run against an existing database.
But take a look on these questions:
https://stackoverflow.com/questions/2462410/acoustic-fingerprint-opensource
Musicbrainz fingerprinting
More Links:
http://acoustid.org
https://musicbrainz.org/doc/Fingerprinting
http://echoprint.me // service by spotify / echonest
https://www.audiblemagic.com/broadcast-infrastructure
Good luck.
An excellent open-source audio fingerprinting library in Python can be found here:
http://github.com/worldveil/dejavu
It allows you to fingerprint an audio file once, store the fingerprints in a database, and do continual recognition and adding fingerprints as time goes on.
You can even fingerprint small sections of song to save disk storage if you are just doing on-disk deduplication.
I'm currently working on a Windows Phone (8.0) application that can record video's. I want to save multiple video files in the Isolated Storage, but i can't find a way to view these saved files in a nice graphical interface with thumnails and information about length or size (much like the Windows Phone Camera Roll).
Could someone help me with this? There doesnt seem to be a lot of documentation on viewing the video files from the isolated storage.
Maybe it's something stupid, but i'm relatively new to developping for phones.
Thanks in advance!
1) I am not clear about your requirement but if you want see the Isolated Storage files in your machine you can use "Windows Phone Power Tools". For more info visit : http://msdn.microsoft.com/en-us/library/windows/apps/hh286408(v=vs.105).aspx
2) If you planning to make your own video gallary in Windows Phone app
Use AudioVideoCaptureDevice class to record videos and implement "PreviewFrameAvailable" event of it.
In that event, implement videoCaptureDevice.GetPreviewBufferArgb(argbPx) method.
For the size of video, when your read file from IsolatedStorage, you will get bytes array for data. That is the size of file. Covert it to Mb, Kb, etc format you want.
I have a video file at my Server and the path to which resembles like "10.151.98.82/Medias/New/Videos/001.dat".
(Actually a video file but the extension is in .dat)
I have already built a WPF application which allows my users to enter the above Server URL and then let them to download it and then play it.
But my guess is that they need not wait till the entire file gets downloaded; just watch the files on the fly.
I have googled on video streaming but could not get a solid material to proceed on with.
[Sorry, if the question is naive or needs modification, i will be happy to do that or move to a relevant forum.]
Any pointers on how to do this is much appreciated.
Edit: This question talks about WCF service and WPF application. But, I dont' use a WCF Service. The video file has to be streamed from the server.
First try to play your file using VLC Player. it also have many advance streaming and Trans-coding Options. you can play, save and trans code simultaneously. Once you are able to Play your file in VLC Player than i would recommend to use VlcDotNet for wpf application. Tutorial for hosting VlcDotNet is available in downloads
I am writing a Windows Forms application in C#, and I want to copy files from a directory on my C:\ drive into the "Computer\SPH-D710\Phone\Music" directory on my Android phone. That music path I just copied and pasted from Windows Explorer to this post, but C# does not recognize it as a valid directory, probably because there is no "C:\" or the like.
What is a C# command that can write a file to an Android?
It appears your phone is connected as a MTP device (media transfer protocol). It is not as simple as a file system access (USB mass storage). Read these series of blogs on how to do it, its not a simple file copy.
https://learn.microsoft.com/en-us/archive/blogs/dimeby8/sending-mtp-commands-through-wpd-part-1-without-a-data-phase
https://learn.microsoft.com/en-us/archive/blogs/dimeby8/sending-mtp-commands-through-wpd-part-2-data-to-the-device
https://learn.microsoft.com/en-us/archive/blogs/dimeby8/sending-mtp-commands-through-wpd-part-3-data-from-device
Beware you will be diving into some unmanaged code for this.
The .NET libraries used to store files won't really care where they are saving the file. Your Android device is seen as a USB storage device (as long as USB storage is turned on from the phone's point of view!). I recommend that you put some of your C# code up so that we can potentially spot an error in the routine that you are running to actually save the file to the phone.
As a quick example - your C# code will likely want to look something like this:
string filePath = #"G:\Music\MySong.mp3";
System.IO.File.WriteAllBytes(filePath, mp3FileContent);
When the Xbox 360 console formats a 1gb USB device, it adds 978mb of data to it in just 20 seconds. I can see the files on the USB and they are that size.
When I copy a file of the same length in Windows, it takes 6 minutes.
Maybe it is because Windows reads/writes, but the 360 just writes?
Is there a way to create large files like that on a USB with that kind of performance? The files can be blank, of course. I need this writing performance for my application.
Most of the cmd tools I have tried have not had any noticeable performance gains.
It would appear that the 360 is allocating space for the file and writing some data to the file, but is otherwise leaving the rest of the file filled with whatever data was there originally (so-called "garbage data"). When you copy a file of the same size to the drive, it is writing all 978MB of, which is a different scenario and is why it takes so much longer.
Most likely the 360 is not sending 978mb of data to the usb stick, but is instead creating an empty file of size 978mb - yours takes longer because rather than simply sending a few KB to alter the file system information, you are actually sending 978mb of data to the device.
You can do something similar (create an empty file of fixed size) on windows with fsutil or Sysinternals "contig" tool: See Quickly create large file on a windows system? - try this, and you'll see that it can take much less than 20 seconds (I would guess that the 360 is sending some data, as well as reserving space for more). Note that one of the answers shows how to use the windows API to do the same thing, as well as a python script.
Could it be that the 360 is just doing some direct filesystem header manipulation? If a blank file is fine for you maybe you could try that?
It is all dependent on the throughput of the usb drive. You will need a high end usb such as the following: this list