How do I get the info about a mp3 file? I mean, like, the tags and the artwork? Any one?
I'm not entirely sure if this answers your question, but here goes:
Assuming you mean any kind of audio file that resides in the iPod library, this information is contained in an MPMediaItem instance. These objects can be obtained in various ways, for example by using the MPMediaPickerController. The MPMediaItem is contained in the Media Player framework.
Reference here:
http://developer.apple.com/library/ios/#DOCUMENTATION/MediaPlayer/Reference/MPMediaItem_ClassReference/Reference/Reference.html
Small Example:
NSString *songTitle = [MPMediaItem valueForProperty: MPMediaItemPropertyTitle];
Now, if you're actually talking about an mp3 file residing in your App's sandbox, the answer you're looking for is located in this thread: Reading MP3 information using objective c
Related
I'm building a project where people can upload files, I would like to then display those files in a browser where people can interact with them (vote, comment etc)
However, this means I need to programatically build the html depending on the format of the video or image. Is there a way to feed a file (or filename) into a library, and determine whether I need to display it in a video element or an image element? Even a list of video formats vs image formats would help but I haven't seen anything in regards to that.
No module can reliably determine the file type. The user could either change the extension or even the magic number of the file to obfuscate it. The only reliable way it to try to pass file to some image / video transcoder to let it decide or error out if the format is invalid. This way you know you are working with known formats since all files are transcoded to your specific extensions. That could be mp4 or png. I recommend using handbrake for videos and sharp for images. Leaving the NPM links down below:
https://www.npmjs.com/package/handbrake-js
https://www.npmjs.com/package/sharp
.
I am trying to understand how mpd file plays and i am referring to the following data set:
http://www-itec.uni-klu.ac.at/ftp/datasets/mmsys12/Valkaama/MPDs/Valkaama_1s_act_isoffmain_DIS_23009_1_v_2_1c2_2011_08_30.mpd
In mpd file format there is segment base consists of mp4 chunk and within it has chunk list with extension .m4s.I downloaded mpd file using :
http://www-itec.uni-klu.ac.at/ftp/datasets/mmsys12/Valkaama/valkaama_1s/valkaama_1s_50kbit/valkaama_50kbit_dash.mp4
and m4s chunk by following link:
http://www-itec.uni-klu.ac.at/ftp/datasets/mmsys12/Valkaama/valkaama_1s/valkaama_1s_50kbit/valkaama_1s1.m4s
I tried to play both mp4 and m4s in vlc player but not able to play any of these two so i want to ask which of the chunk links in the mpd file forma i can be able to play standalone in vlc player.
Please correct me if any of my observations is wrong:
Regards
Mayank
MPD file is just a index of streams with various formats in order to adapt to your bandwidth, to get more information follow the links of the other answers here.
It's possible to download all streams and merge them into a single file, you could achieve this by using youtube-dl:
youtube-dl http://URL/TO/manifest.mpd
You can get more information in https://stackoverflow.com/a/39931712/1522342.
Also, VLC 3.0.0+ can play that kind of file from a url, just open VLC, use the shortcut CTRL+N, paste the url and enjoy.
A DASH player plays an MPD by selecting a Period, and in the Period one or more AdaptationSet, and then one Representation per AdaptationSet. For the chosen Representation, it downloads and passes the intialization segment and some media segments to the media engine. As indicated by others you can simulate that by concatenating (simply using caton Linux).
The MPEG-DASH standard requires that initialization segments (in your case the mp4 file) contain no data. This is because when switching the player might use several times the initialization segment. You can open it in a player but it does not contain any media.
For m4s files, they contain media data but they cannot be interpreted without the associated initialization segment.
you can download init segment (SegmentBase/Initialization#sourceURL) and all media segments (SegmentList/SegmentURL#media) and concatenate everything (e.g. with the copy command on windows). The result should be playable on VLC. This has to be done for audio and video separately. In the next step you can then use MP4Box or similar tools to mux audio and video.
Alternatively you can use www.dash-downloader.com to download everything in one step. The page will display some log explaining what it's doing. That might be helpfull.
(full disclosure: that's my website).
I dont think it is possible to play any of the files in a standalone player. The mp4 is the init segment which is required to decode the .m4s media segments. I dont think there is an option in the vlc player to map an init segment to multiple media segments. Nevertheless you can try a Dash player to play the manifest file. For instance dash.js
Initialization segment: A sequence of bytes that contain all of the initialization information required to decode a sequence of media segments. This includes codec initialization data, Track ID mappings for multiplexed segments, and timestamp offsets (e.g. edit lists).
Media segment: A sequence of bytes that contain packetized & timestamped media data for a portion of the media timeline. Media segments are always associated with the most recently appended initialization segment.
Source: http://www.w3.org/TR/media-source/#init-segment
solution with sample using c#,
scenario:
Download encoded pdf file of base64Encode and decode(base64Decode) and store in ApplicationData.Current.LocalFolder;
you can use File.ReadAllBytes to load the PDF file into your program and then u can convert the loaded pdf file using Convert.ToBase64String(bytes) method
You might want to prefer this link
https://social.msdn.microsoft.com/forums/vstudio/en-US/e5965e02-0bbb-4f8d-9e5f-8611aa902457/how-to-convert-pdf-file-to-base64binary
Well, I am not going to write a solution with a complete sample for you, but I will point you to what may be the most exhaustive base42 discussion in Windows Runtime.
http://blog.jerrynixon.com/2014/11/reading-and-writing-base64-in-windows.html
It's a crazy coincidence that I just wrote this a few weeks ago. You'll notice that it is in the context of an image, but you should be able to translate it simple enough.
Remember to post your solution here!
Best of luck!
I know that the EXT-X-STREAM-INF tag provides a mechanism for linking to another playlist file, but this appears to be to support variant encoding's (at lower or higher bandwidth) of the same stream. What I would like to do is return a playlist that references actual .ts files but the last reference in the playlist is to the "next" .m3u8.
The reason I want this is that I can use this mechanism to build a stateless HLS server that is not necessarily serving a "live" stream (because the playlist URL can encode information about WHERE in the stream you are). Any idea what players support this (does iOS?)?
It is not supported in the draft specification (as of draft 10).
Yes They can. The main m3u8 that holds other m3u8 is called variant playlist m3u8.
But why we need a variant playlist? - for storing various bit rates of the same stream
I used "One Click m3u8" app from the mac app store - that created the variant playlist as well the children m3u8. No need of ffmpeg or mediafilesegmenter.
How to video here from youtube
Website
I would like to convert .rm (RealPlayer Media) file to MP3 or another format?
First, I successfully managed that using VLC but the quality was not good. Then I tried the Real Alternative codec with DirectShow, this also worked ok, but then I found that the codec is no longer developed because RealNetworks sued the developer.
Now, I have installed the RealPlayer and I am trying to use it's DirectShow filters to convert .rm to .mp3 but without success:( (Actually after adding RealPlayer Transcode filter and choosing a file the GraphStudio crashes.)
Is there a legal way to programmatically convert .rm file to another format? How to make RealPlayer to programmatically convert files? Do you have any hints or examples, how to use RealPlayer Transcode filter? (I am new to DirectShow.)
UPDATE to make the question more concrete: How can I list implemented interfaces and its members of RealPlayer Transcode filter? I have not found any documentation:( (The GraphStudio says it has 0 pins and just common properties.)
You need to build a DirectShow graph to read and decode .rm, then compress audio into MP3 and write it into a file. This is similar to recompressing an AVI file, described in some detail on MSDN: Recompressing an AVI File. You just have audio without video there, and the container formats are different.
UPDATE: There is no way to reliably list implemented interfaces in COM. Sometimes you can find this out by checking the type library, however a lot of DirectShow filters are coming without it. Typically, you need an SDK header file from the filter vendor to get a definition of implemented so called 'private' interfaces.