Cocoa way to edit id3 tag in .mp3 files? - objective-c

Is there a way to edit id3 tags in mp3 files in Cocoa way on OSX without using C lib such as taglib or id3lib?
I've tried using AVAssets. But I just could read the tags in mp3 files, I can't write tags to mp3 files. Does it support m4a audio file only?
I've also tried using AudioToolbox(AudioFile Get/Set Property). But I always got errors says media type is not supported.

AVFoundation does not provide metadata keys or other functionality for MP3. You have to convert to MP4 to edit metadata within AVFoundation.

Related

Embedding a video to HTML that does not have the .mp4 filename extension

I changed the filename extension of my videos on the server from .mp4 to .zip. Now I want to embed the videos in my HTML web page, but it doesn't work due to the filename extension. I'm looking for a way to tell my front-end how to interpret the embedded file and read it as MPEG-4.
Why did you change the .mp4 to .zip? Video has pretty good compression already, and making it a zip file is unlikely to save you much (if any) in terms of the size of the object.

How can I get closed-captions embedded inside mp4 file with VideoJS?

I want to use VideoJS in my project, and I also need closed-caption support. I have read the VideoJS docs on how to use a text-track from a WebVTT file, but most of my .mp4 files have captions embedded in the file itself, there is no WebVTT file available. How can I get the captions out of the mp4 using VideoJS?
Edit: We will be live-streaming video, which is why the closed-captions are embedded into a stream.
To do the extraction step, you don't/can't use VideoJS itself. Instead, there are various standalone video editors that can do the job...just do a google-search like 'video tools to extract sub-titles'. Preferably, find/use a tool that extracts subtitles/captions into an "SRT" file-type. Then, to convert into VTT files, there are various tools for that, too. [ For that step,I use the free SRT->VTT converter avail at: http://atelier.u-sub.net/srt2vtt ]

Playing m3u8 on any devices (IOS, Android, PC)

is it possible to play a m3u8 file using video.js on any devices?
So far, I am only able to play them on Android or IOS. Want to play them on PC as well.
This is what I am using but no luck.
Thanks for your help
<source src="http://www.domaine-name.com/name/playlist.m3u8" type='video/mp4'>
From Wikipedia:
An M3U file is a plain text file that specifies the locations of one
or more media files. The file is saved with the "M3U" or "m3u"
filename extension. Each entry carries one specification. The
specification can be any one of the following:
an absolute local pathname; e.g., C:\My Music\Heavysets.mp3
a local pathname relative to the M3U file location; e.g. Heavysets.mp3
a URL.
As M3U only stores the multimedia items locations, you should parse it and play them using the proper audio/video playback lib.
Take a look at this question
EDIT: The link in the comment points to another m3u, you just should get the link to the multimedia files:
Content of first m3u:
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=613798
http://tveurope1.zion3media.com:1935/demoweb1/mystream/playlist.m3u8?wowzasessionid=506379083
When you follow that link you will get a playlist like this:
#EXTM3U
#EXT-X-ALLOW-CACHE:NO
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:1343
#EXTINF:11,
media_1343.ts?wowzasessionid=506379083
#EXTINF:12,
media_1344.ts?wowzasessionid=506379083
#EXTINF:9,
media_1345.ts?wowzasessionid=506379083
Example of multimedia resource from playlist:
http://tveurope1.zion3media.com:1935/demoweb1/mystream/media_1343.ts?wowzasessionid=506379083

Code to play AVI file in xcode

I am creating an iPhone application, which can play many media formats. I am not able to play AVI file format, where as I am able to play other formats (for e.g. MP3, MP4, MOV etc). When I try to play AVI, it shows black screen and display is hidden. Any suggestions on what I can do to fix this issue?
Take a look at this tutorial on playing video with ffmpeg and SDL, both available for the iPhone.
An ffmpeg and SDL Tutorial or How to Write a Video Player in Less Than 1000 Lines
It's written in C, but consider it pseudocode, and adapt it in Objective C accordingly.
.avi is a container format, not a specific audio/video codec. Depending on the contents of the .avi container, it may or may not be possible to decode the video on an iOS device (due to hardware limitations). If it is possible to decode the video in real time, you may have some luck using the libav (aka ffmpeg) library to decode it.

Add a word to a .mp3 file

In my Mac app I need to take a .mp3 file and add a spoken word to it programmatically. The word is custom and is entered by the user.
How can I do it? Which frameworks should I use and are there any custom libraries to do it?
Any help is really appreciated.
Apple has libraries for editing video (and I assume, audio) in iOS 4. You should look into AV Media Framework.