Search Unity

Localized strings in Full Screen Movie

Discussion in 'iOS and tvOS' started by bpritchard, Feb 6, 2013.

  1. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    Hey all,

    I've brought this up a while ago w/no responses so wanted to see if anyone out there has solved this issue yet? Essentially we have a number of full screen movies, which all need subtitles. We have 5 languages we support and can either embed all the strings as languages into the movie or make a movie per language. Obviously suggestion 2 is easier and is something that we're currently doing but it add a considerable amount of overhead to the overall app size.

    We've tried embedding all the languages into a single movie and that does work to a degree. If we turn on the controls for the movie there's an option to turn on and pick the subtitles you want to see. Thats pretty close... but not quite right. For started the subtitles are not on by default, and secondly swapping the languages at the user level seems like a bad user experience.

    So the question is is there any way in xcode or through unity plugins to tell iOS to SHOW the embedded english subtitles automatically and then show them in language x based on the current system language, assuming the system language isn't English?

    Really appreciate the help on this one. We've been stumped on this for a while. It does seem that we can go into the movie player class on xcode side and write an entire structure just for playing movies but seems like a lot of extraneous and potentially problematic work for a relatively simple problem.

    Cheers
    Bryan
     
  2. StoneFish

    StoneFish

    Joined:
    Aug 26, 2012
    Posts:
    123
    My first question: How are you creating and displaying the movies? Are you just creating mpegs or whatever and loading them up?

    If you do get subtitles displaying, how do you intend to time them to the movie accurately?

    I can't think of any way of doing this, considering that iphone movie playback is always going to be fullscreen using the Xcode movie player.

    I would be looking at doing this instead:
    1. I would NEVER make a movie for each language! Erch sounds like a waste of time for both you and the purchaser
    2. Do they have to be in the App? i.e What if the movie was hosted on say YouTube, and when a movie has to play, it links to YouTube and plays from there. On youtube you can have subtitles.
    3. Go in-game. How are your movies created? Are they from game assets? 3D/2D? Why not set up an ingame camera and 'script' the movies, rather than use an external video editor etc etc.... It's hard for me to give an example without seeing the movies themselves.
     
    Last edited: Feb 7, 2013
  3. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    Yep, they are just mp4's w/embedded strings currently (baked in). You can also bake in all the languages so they are timed perfectly and selectable via the video... but we've yet to figure out how to "force them to show" xcode side.
     
  4. StoneFish

    StoneFish

    Joined:
    Aug 26, 2012
    Posts:
    123
    How do you do that? ** Aren't the strings part of the render video? Or are you saying you can select a video to play?
     
  5. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    Lemme clarify a bit.

    you can import srt files into a quicktime movie using things like Roadkill for mac or Motion, whatnot. It allows you to set an srt per language, and them cook them into the files as soft rendered (somehow contained in the mp4 as a readable and renderable format). Once you do that, if you use the playfullscreen movie function in unity and make sure the on screen controls are on, you can easily swap between the languages via a drop down... which really is not a great user experience.

    Currently we handle it by loading in individual movies.. it creates size issues but our apps are generally well over 300-400 megs (some are over a gig). I'd rather avoid any extra overage where possible.

    So to us it seems as though there SHOULD be a way, in iOS, for the system to understand what language its in and have the movies play back in that language if the subtitles are encapsulated in said video. I feel like we're literally 2 steps away from a usable solution, just can't find any connection xcode wise for driving the video languages.

    To answer your questions more directly...

    1. I would NEVER make a movie for each language! Erch sounds like a waste of time for both you and the purchaser
    - would love to! But... time wise its not a big waste for us.. and for the purchases its transparent.
    2. Do they have to be in the App? i.e What if the movie was hosted on say YouTube, and when a movie has to play, it links to YouTube and plays from there. On youtube you can have subtitles.
    - Absolutely. Can't host external (customer requirement).
    3. Go in-game. How are your movies created? Are they from game assets? 3D/2D? Why not set up an ingame camera and 'script' the movies, rather than use an external video editor etc etc.... It's hard for me to give an example without seeing the movies themselves.
    - We do a ton of ingame movies... and all of that works great. These are full screen movies, and unfortunately they don't play as well if they are applied as textures vs. using the fullscreen movie function in unity.

    I do appreciate the time your taking... and lemme know if i'm still talking in riddles. :)

    Cheers
    Bryan
     
  6. MatthewLeeFarmer

    MatthewLeeFarmer

    Joined:
    Jul 31, 2012
    Posts:
    14
    I'm a developer w/bpritchard working on the same task.

    We're essentially trying to play a prerendered cutscene mid-game. In Unity iOS, this can be handled by calling the following:

    Handheld.PlayFullScreenMovie ("MovieFileName.mp4", Color.backgroundColor, FullScreenMovieControlMode.ControlMode);​

    There are other ways of handling full-screen movies, but those methods are impractical or quite sluggish on some mobile devices such as the iPhone 4.

    Upon calling the "Handheld.PlayFullScreenMovie" from Unity, you can pass in a Control Mode. The "Full Controls" mode will send your iOS device a flag that allows for On-Screen Controls such as "Play", "Pause", and "Select Subtitles". "Select Subtitles" allows you to pick one of the subtitles baked into the video file.

    What we would like is the following:
    • Same behavior of the "Handheld.PlayFullScreenMovie" function
    • No On-Screen Controls.
    • Subtitles to default to "On" and in the correct language

    Thank you!
     
  7. StoneFish

    StoneFish

    Joined:
    Aug 26, 2012
    Posts:
    123
    Ah, I see, thanks for explaining that! Hm.... sorry I haven't been able to offer a solution though... will put thinking cap on too, because no doubt the solution may benefit me or someone else later on...
     
  8. ilmario

    ilmario

    Joined:
    Feb 16, 2015
    Posts:
    71
    Has this problem been solved by now in 2015/Unity 5? We need to localize our game for several languages, and need some movieclip subtitles also localized.

    This sounds like they way we'd also like it to work:

    "What we would like is the following:
    • Same behavior of the "Handheld.PlayFullScreenMovie" function
    • No On-Screen Controls.
    • Subtitles to default to "On" and in the correct language"
     
  9. NonoSTG

    NonoSTG

    Joined:
    Feb 22, 2017
    Posts:
    1
    I am face to the same problem, google redirect me to this thread, someone have an answer or a place to redirect me? :)