I know this has been asked around, but couldn't find a straight answer.
My App uploads .caf files from ios to Webserver, where .caf isn't a recognized format. What Should I do programatically in iOS to turn it into mp3, .wav..etc before uploading to server?
EDIT : I had the same problem and solution is given below
I had same issue, As .caf isn't a recognized format in ISS 6.0 or greater (not sure about which ISS) so u convert into base64 then save in server as .cab file
When retrieving again convert form .cab to .caf file
I couldn't find an easy way to do this. So, I ended up downloading caf players on my windows machine.
Related
I have recorded audio and saved in .caf format in document directory. I need to convert the .caf to .wav file to upload the file to server. I researched and didn't get much input in swift. Please help me out to find a solution?
Did you try AudioKit?
Maybe you can use AKConverter https://audiokit.io/docs/Classes/AKConverter.html
I have several audio files which all of them are in .mp3 format. But playing .mp3 won't maximize the efficiency of audio playing on iOS. From one of research, .wav or .caf is a go for short loop or sound effect audio file used in game. Thus I need to convert this .mp3 file into those two formats.
Currently I use the following command to convert .mp3 to .caf.
afconvert -f caff -d LEI16 kick_sfx.mp3
However, I see that .caf is a container format thus I have a bad feeling that it's still not so efficient. According to that, I think I need to convert those .mp3 files to .wav first in order to maximize efficiency in playing audio file.
Do I need to really convert those (.mp3) files to .wav first before convert them again to .caf? Or using that command alone will do the work for me ?
Any additional info is welcome.
Using carrierwave or another file upload plugin, there should be an easy way to convert uploaded mp4 (H.264) video files to Apple HLS. You need this for streaming videos on mobile devices.
This way, while uploading 1 streaming video file you can support most of the browsers (every browser except Opera and FF for Linux/OSX).
It can be done with ffmpeg, is anyone working on a gem?
How about streamio-ffmpeg? It seems to support custom command line parameters. You could add then use parameters like from this answer: https://stackoverflow.com/a/10047372/759140
You might also give carrierwave-video a try. It's backed by streamio-ffmpeg and allows passing custom settings through.
I am retrieving an MP3 file from the iPod Library and saving it to the application's Documents directory. I need to convert it to .wav or .caf so that I can use OpenAL or any other library to change the pitch of the audio.
Can this be done? Any assistance with code will be greatly appreciated.
Take a look at the AVAssetWriter class. Also, check out this link, its not exactly what you want, but its a start.
http://www.subfurther.com/blog/2010/12/13/from-ipod-library-to-pcm-samples-in-far-fewer-steps-than-were-previously-necessary/
Note that it might be difficult to gain access to the user's actual file as that would require reaching out of your app's sandbox - something Apple doesn't allow.
I'm curious if it's possible for an flv file to contain code like ActionScript or if it can only contain the audio/video data for the video.
I'm specifically asking related to the security of allowing an FLV file to be uploaded a site.
Edit: assume that the contents have been validated to be a real "flv" - the question is whether the format natively supports code inside of the flv.
the question is whether the format natively supports code inside of
the flv.
To that question, the answer is no. For further security discussions, see the other answers.
FLV files are for video/audio: http://en.wikipedia.org/wiki/Flash_Video. but I can rename any executable file of course and add the .FLV extension to it. so I believe you will need to read the uploaded files and check whether they are FLV indeed.
FLV is only a video format. Like akonsu said, you should check if the file is really a FLV file, not just checking it's extension.
You should check if the file's mime type is "video/x-flv".
More info about FLV: http://osflash.org/flv