I'm wondering if I can create an application that converts a youtube link to mp3 and save it on a desktop. Does anyone have any suggestions to do this? Any references of links?
Do you mean capturing video - extracting a soundtrack from it and save it as an mp3? There are tools for doing just that called audio extractors. It's possible that some of these are available as libs. Here's link to one of the tutorials that may give you some ideas
You could have a look at how the Easy YouTube Firefox add-on does it.
Try KissYouTube. Extract the audio stream from the flv file to whatever audio format you want.
Related
I'm using Ant Media Server for streaming. My use case requires me to record the Live Streams as VODs so the users can access the content later as well.
Like the live streams, I want to apply adaptive settings to the VODs as well so that users can get the suited resolution as per their network.
I can't find any built in solution for this yet. Can you please tell me any solution as to how can I do this!
I'm using S3 to store the recordings.
Thanks.
Thank you for the question. As far as I understand from the question, it seems that Live Streams are recorded as VoD files.
I think the most efficient way is doing that through HLS. With this way, the VoD files are recorded as HLS and multibitrates is available. No need to transcode again and it'll be played directly. Let me explain this solution step by step.
Set HLS playlist type to event and settings.deleteHLSFilesOnEnded to false . Edit your red5-web.properties for the application and set the following settings
settings.hlsPlayListType=event
settings.deleteHLSFilesOnEnded=false
Restart the server
sudo service antmedia restart
Add adaptive bitrates on the web panel.
Start Live Streaming and let the Ant Media Server create HLS(m3u8 and ts) files for each bitrate.
Stop Live Streaming
Then you can watch the stream by giving the master m3u8 file which is {STREAM_ID}_adaptive.m3u8. It can be even played directly by embedded player even if it's not live.
For more information, take a look at this wiki about HLS Playing
Please let me know if this approach helps you.
antmedia.io
I am developing an iOS app that synchronises with GoPro cameras.
One of the feature requires downloading MP4 from the GoPro (potentially huge).
I basically have a url like: http://10.9.9.5/whatever/video.mp4.
However, I only need parts of the video, let's say between 1:00 and 1:05.
I am thinking on downloading just parts of the MP4, using HTTP "Range" header. I believe that it's possible and I will get a bunch of bytes.
However, is it a valid file? Will I be able to create a MP4 ? Do I need the MP4 header with meta information? Do any of you faced this kind of challenge?
I am using Objective C but I believe that this is a general question.
The MP4 file is a container for video that is structured around something called boxes. Probably you'll have h.264 video in that MP4 file, knowing that, you'll need to know the structure of the file you are trying to chunk.
Depending on the way it is encoded you'll have to look for a box with metadata that'll allow you to search for the correct part of the file either at the beginning or at the end, but you'll have to reconstruct a valid MP4 with the data you get from the original file.
You can see a reference of the file format here http://xhelmboyx.tripod.com/formats/mp4-layout.txt.
In Windows Phone 8.1, I want to play an internet radio station with Windows.Media.Playback.MediaPlayer. I'm aware of a sample which plays mp3 files with MediaPlayer.SetUriSource. However, I don't know how to play a stream. I see MediaPlayer.SetStreamSource, but it appears to be for random access streams which support seek, etc. I'm not sure it's for live streams.
Which method should I use?
Any tutorials or docs on this? I couldn't find any.
You could have a look at the Windows Phone Streaming Media library, which supports live streaming and HLS formats.
http://phonesm.codeplex.com/
Since i cant play an audio file from a DB blob, i have to write it as a file, before i can play it.
Looking at the documentation, my choices are:
Ti.Filesystem.applicationDataDirectory
Ti.Filesystem.tempDirectory
Ti.Filesystem.externalStorageDirectory
Ti.Filesystem.applicationCacheDirectory
Considering that i want my file to be secret, so no other app can see that file, what is my best option?
EDIT: So the issue is more with Android, i'm afraid that any file browser will be able to find the file.
I'm assuming you're building for android, because ios data are sandboxed and not readily accessible by default (until ios8). Rather than hiding them, just encode them using base64encode(). And then you can decode when accessing the file with base64decode().
With that said, I've never had to use it. So, I don't have an example. But you can read about it in the api doc.
Hope that helps.
You haven't mentioned if you are building an app for iOS or Android. For example Ti.Filesystem.externalStorageDirectory is available only for Android (SD card).
Anyway if you want to save an audio file, you should save it in <Application_Home>/Documents ,so you should use Ti.Filesystem.applicationDataDirectory. Don't forgot to set up a remoteBackup flag see http://docs.appcelerator.com/titanium/3.0/#!/api/Titanium.Filesystem.File-property-remoteBackup
Also have a look at iOS Data Storage Guidelines for more details
https://developer.apple.com/icloud/documentation/data-storage/index.html
*If you want to save an audio file only because you need to play it ,but you don't need to store it in a fileSystem then is better to use Ti.Filesystem.tempDirectory
I want to develop small mac (not iphone) application for self-educational purpose.
What application should do: just open video file and show information about video codec.
Main problem is that i never work with media files and i don`t now from which point i can start.
May be somebody can advice some articles or may be even examples?
I strongly recommend using something like FFmpeg to get codec information.
Simply run the following command through NSTask:
ffmpeg -i video.mpg
Project page:
http://www.ffmpeg.org/
Extracting this information yourself is a LOT of work.
Every video format stores things different.
Not to mention error-handling and corrupted files.
The codec data is usually held in container formats. To start you should pick one container format and parse that, a popular one would be the MPEG4 container format. Follow the links from this page to get you started.
http://en.wikipedia.org/wiki/MPEG-4_Part_14