iOS Localization of large files like movies - objective-c

I am creating a new iOS project, where I have to include a video in my app. We need to access this video also in offline mode - so I need to include it as video file in my project.
The question - what is the best practice for such large file localization? App will be in at least 7 languages and I can not decide - include video in 7 languages which would dramatically change size of app or include it only in English and localize other stuff? Probably someone knows - if my phone language is for example Spanish and I download localizable app - does this app include videos in all languages or only in my selected?
Any answer will be appropriated and thank you in advance.

You could do something nifty with bundling the video and audio separated. You could then play the correct audio for each localization. The same could be done with subtitles.
Most optimized way would be to not bundle any video in the application and just allow the users to download the video for the current localization from within the app. That's what I think.

A single video can have multiple audio streams. So you can simply create one video with multiple audio streams. Audio is general smaller compared to video. So should not hurt as much. User can then select the audio langauage [or program can preselect based on some preference] to play it out.
Almost all container formats can contain more than 1 audio stream. [Almost all, definitely mp4 which is what I guess you are using.]
EDIT: You can possibly also have two files. One with half the languages which are the most common and one with other half which are less common to reduce some size.

Related

video/mp2t browser live streaming support

Is there any way we could live stream "video/mp2t" content in the browser? I'm building a live stream app where some urls don't have any mimetype specified but the content is "video/mp2t". I've tried to use the major html 5 players: jwplayer, shaka-player, video.js, and none of them seem to support this kind of content out of the box. I've read that might be possible to transmux on the fly to mp4, do you guys know any example or some guidelines?
Android and ios seem to support this but the browser not, why is that? Do you think it's something to be incorporated in the future?
Thanks!
I've read that might be possible to transmux on the fly to mp4
Yes, you can write the code yourself, or base it on a another library like mux.js. But as you said, nothing does this out of the box.
Android and ios seem to support this but the browser not, why is that?
There are dozens or hundreds of container formats. Supporting them all would be ridiculous. Different companies, and different standard bodies make different decisions on what they think their users will require.
Do you think it's something to be incorporated in the future?
No, I don't.

Can I sync multiple live radio streams with video?

Is it possible to sync multiple live radio streams to a pre-recorded video simultaneously and vary the volume at defined time-indexes throughout? Ultimately for an embedded video player.
If so, what tools/programming languages would be best suited for doing this?
I've looked at Gstreamer, WebChimera and ffmpeg but am unsure which route to go down.
This can be done with WebChimera, as it is open source and extremely flexible.
The best possible implementation of this is in QML by modifying the .qml files from WebChimera Player directly with any text editor.
The second best implementation of this is in JavaScript with the Player JS API.
The difference between these two methods would firstly be resource consumption.
The second method that would use only JavaScript would require adding one <object> tag for the video, and one more for each audio file you need to play. So for every media source you add to the page, you will need to call a new instance of the plugin.
While the first method made only in QML (mostly knowing JavaScript would be needed here too, as that handles the logic part behind QML), would load all your media sources in one plugin instance, with multiple VlcVideoSurface components that each has it's own Plugin QML API.
The biggest problem I can foresee for what you want to do is the buffering state, as all media sources need to be paused as soon as one video/audio starts buffering. Synchronizing them by time should not be to difficult though.
WebChimera Wiki is a great place to start, it has lots of demos and examples. And at WebChimera Questions we've helped developers modify WebChimera Player to suit even the craziest of needs. :)

Embedded ASS subtitle track in streamed video?

We'd like to build a small specialized clone of the ill-fated popcorn-time project, that is to say a node-webkit frontend for peerflix. The videos we'd like to play are mkv files that have embedded ASS subtitle tracks, and we can't seem to get the embedded subtitles to show up: while VLC nicely shows them, html5 video players in webkit-based things don't, not even in Google Chrome (so it's not a matter of Chromium's reduced codec support).
Now, I'm a bit out of our depths here, I don't really know much about these things, but it seems to me the media engine underneath webkit just ignores the ASS subtitle track here. Is it because it's ASS? Is it a matter of codecs somehow? Or is it, after all, a html5 thing? Now, the html5 video "living standard" mentions that "captions can be provided, either embedded in the video stream or as external files using the track element" - so the feature is at least planned, but I do realize that implementation is lacking. However, given that node-webkit uses ffmpeg as the underlying engine, it seems strange to me that the subtitles are not picked up at all.
Could someone more knowledgeable please advise us the problem? Also, is there anything we could do about it?
Extracting the subtitles beforehand is not an option, though I have been playing with the idea of extracting the subtitles on the fly, and feeding that stream back to the player - I had some modest success with this, and it looks like it could be done with some effort, but I'm really out of my depth here, and the whole idea is pretty contrived anyway.
However, I find it improbable that nobody has run into this problem before, hence this question: is there any way to show embedded (ASS) subtitle tracks in a streamed video in node-webkit?
Not sure if this would help but according to this page node-webkit doesn't ship with codec for patented media formats. They do have a few suggestions on the page, one of which is to compile your own node-webkit.
You could try using Popcorn Time's ffmpegsumo file which is what I used when I needed mp3 support and Chrome's version didn't work. Although, I don't know if that supports ASS subtitle format(considering its use, I would think it has to).
Note: I would have commented this answer but unfortunately I don't have commenting privileges yet. A couple of upvotes sure would be nice ;)

Use phonegap or go native?

I'm about to make an application for ipad that has the following specifications:
download JSON (or xml) from server
download short audiofiles from server (locations are in the JSON from above)
save these to the iPad for offline use.
based on these files the user gets to do some exercises
user progress/results need to be saved to the device so they can continue where they left off the next time they launch the app.
My question: Can this be done with only html/css/jquery Phonegap? Or should I go native and make this all in Objective-C? Or can I combine phonegap and Objective-C?
Now I'd like to know how I can save a json file on the device for offline use.
Also I'd like to know how to download audio (or images or whatever) and save those to the device.
This can be done with PhoneGap/Cordova and its HTML5 approach.
If it is iPad only, then go native.
Your app's high level requirements do not sound too complicated. For more complex apps always consider that facebook just went native for iOS because of their performance issues. In the end, this may be the way to go for a number of apps. PhoneGap or other HTML5 or cross compiling approaches for 1000+ devices plus native solutions for the market leaders.
It depends on what level UX your are aiming for and how you think your app may expand in the future.
If you need full control over the user experience, then you will need to go native. All the physics involved in scrolling/swiping will be done for you. How much content will you have? if it's thousands of items then again native will offer the best performance. You can also perform certain tasks on background threads (my app did image compression and resizing before uploading the image, for example).
Otherwise - if you just want to get something out quick, go with phonegap.
*I speak as a developer who started out with Phonegap but went Native for performance reasons. Others may have had better experiences.
Comparing application build in native Objective-C with applications build with Webtool like PhoneGap, in terms of being fast, Objective-C apps always win, but in terms of building it fast with zero knowledge of Objective-C Web apps win.
If you have knowledge of Objective-C, in my opinion go with native Objective-C app, else do it with PhoneGap.
BTW, those functionality mentioned in your question can be done with both.

is there a Video for writing to plist in iOS?

I'm not saying I'm lazy (I am), but I want to read what is in the plist, and then when the user does something, to append that info to the existing plist, and write it back, so that info is not lost.
Now that's the type of thing I would think there'd be a video on.
Thus, my question is twofold:
a) Where's a good video (iTunes, Standford Univ, iOS App Pgming Guide) on writing to a plist using file handlers ?(gulp)
b) how can I do a search and restrict the media to videos (so I can find videos on these subjects in the future)?
I'm especially looking for how to handle the notorious first time, and how to make sure I don't overwrite good data by wrongly thinking it's empty.
There are plenty of such tutorials on YouTube. Have a look at this one:
iPhone Programming - Reading/Writing .plist Files