Guides 35

Published on February 28th, 2012 | by exo

30

H.264 Anime Encoding Guide for the PS Vita

In celebration of the PS Vita’s release, I’ve put together a mini-guide outlining how to encode anime (and videos) for viewing on the new handheld system. This isn’t the only way to do it, but I have found it to be the easiest.
(Note: The following information can also be applied to Apple Devices and other compatible portable media devices, albeit a different preset for the specific device should be used).

Last updated on 8/02/13 for Handbrake 0.9.9.5530.

The program that I will be employing for this task is a popular encoding software by the name of Handbrake. In this post, I have also included a custom preset I created for the Vita that fiddles around with a number of advanced settings and is specifically tailored towards animation. If you are curious, this wiki goes into greater detail about each setting. My goal with these tweaks was to ensure a maximum picture quality to size/encoding time ratio.

Download link for the AT Playstation Vita preset: http://www.mediafire.com/?fg8vr9voe1gc8yb

1. Open up Handbrake. To load the preset, locate the Options Button on the bottom right of the application, and select Import. Locate the Handbrake settings file provided in this post and press Ok.

2. Next, Handbrake requires a default output destination to be set. Go to Tools -> Options -> Output Files and select a location to be the default path for the output files.

3. The rest of the settings have been automatically selected through the preset. However, you can fiddle around with the Quality settings in the Video Tab. The AT preset sets the RF at 21 but you can adjust it to your needs (Lower RF=Higher Bitrate). The video quality can also be changed via Avg Bitrate if that’s more your thing. Keep in mind though, that the output is only as good as the input, and your encoded video should almost never have a larger file than your source. Vita memory cards are prohibitively expensive, which makes space on the handheld all the more valuable. If you know the show you are encoding doesn’t have much high-motion and/or CG scenes, it may be a good idea to lower the video bitrate to save space without sacrificing too much quality.

Here’s comparison between different size/bit rate settings to picture quality (File size/bitrate).
(100Mb/450kbs, 200Mb/1034kbs, 300Mb/1616kbs):

4. Next you must select the file to be encoded. Click the Source icon located on the top menu and select video file. Browse for the video to be encoded and press Ok.

5. Now its time to adjust the resolution of the video to fit the Vita’s screen. Navigate to the Picture Tab and take a look at the Size options. Anamorphic should already be set to None, and Modulus at 16. What we are interested in here is the Width x Height options. Make sure the Keep Aspect Ratio button is checked and enter in the following values based on your video source:
High Definition Video (16:9 – 720p,1080p,etc): Width=960, Height=544
Standard Definition Video (4:3): Width=640, Height=480

6. Soft subtitles are not appropriate for the Vita and a hard sub must be done in order to maintain the same positioning, styling, and fonts as the original subtitles. Go to the Subtitles Tab, press Add, and select the subtitle track to be used with the video via the Source drop down menu. Check the Burn In box to hard code the subtitles onto the video.

7. Now that all of the setup is done, its time to start encoding the videos. If you have multiple files, they can all be added to a queue with the Add to Queue icon and encoded in succession automatically. If there is only one video to be encoded, press Start. Handbrake will begin to do its work. The encoding is one-pass and shouldn’t take longer then 5-8 minutes for a normal 22min episode on a decently equipped computer.

And that’s it! Enjoy your anime on dat beautiful OLED screen.
-exo


About the Author

Co-founder and contributor of AT. Enjoys all types of anime, and light/visual novels in his free time.



30 Responses to H.264 Anime Encoding Guide for the PS Vita

  1. marthaurion says:

    Well…this looks pretty simple…I should get a Vita just to try it :P

    Thumb up 0 Thumb down 0

  2. Rei says:

    I have a Vita and I should definitely use this tutorial when i’m going on a vacation just so I don’t get left behind when it comes to watching anime.

    Thumb up 0 Thumb down 0

    • exo says:

      Sweet, I’m glad this tutorial will be put to good use. I have to say that anime looks beautiful on the vita, you won’t be disappointed.

      Thumb up 0 Thumb down 0

  3. nosef says:

    I’m not sure if you still are paying attention to this article, but I need to ask a question.
     
    The subtitles work perfectly! I’m very happy because that is a great thing :D, but the problem is that the video itself is in very very poor quality. This might be because I’m using Handbrake ver. 0.9.6? Anyways, I’m wondering how you can increase the quality if possible.

    Thumb up 0 Thumb down 0

  4. Kellan says:

    or youcould just download anime directly to your vita and save you the trouble  just go to anime shippuden mobile. yourwelcome :)
     
     

    Thumb up 0 Thumb down 0

  5. dood says:

    Im lost. Do you need a computer to use handbrake or just the vita?
    If you do need a computer, do you have to download the episodes then encode it? 

    Thumb up 0 Thumb down 0

    • exo says:

      Yes, you’ll need a computer to use Handbrake. And just like you said, the episodes must be downloaded and put through Handbrake to be encoded into a usable format for the Vita.

      Thumb up 0 Thumb down 0

      • guy says:

        It’s been quite a few months since this post was published. 2 questions: Is this method outdated and do you know if this will get the best quality out of any other methods? Thanks.

        Thumb up 0 Thumb down 0

        • exo says:

          This method is still very viable. Encoding technology hasn’t changed very much within the past months (although 10bit is getting more popular), but I doubt the Vita will support it any time soon.

          As for your second question, all encoders are the same. They just provide an easy to use gui front-end for x264, and so it probably won’t matter which program (method) you use for encoding as it’ll probably come out the same in the end. For the most part, quality is most strongly affected by file size. The higher the bit rate, the higher the quality. Play around with the quality settings and see what works for you.

          Thumb up 0 Thumb down 0

  6. Hunter-Wolf says:

    Excellent method .. works like a charm .. i have seen other methods that take long pages and lots of time to setup/tune the settings .. the idea providing the preset is great too.

    Thumb up 0 Thumb down 0

  7. byakuay says:

    man this tutorial is awesome but how to make the handrbrake stop cropping/strecthcing my video..it look really ugly when played in my vita…
     
    sory for my bad english   :3

    Thumb up 0 Thumb down 0

    • exo says:

      After you select your source, navigate to the Picture tab and check the height & width settings.

      If your video is in 16:9 format (generally 720p/1080p) the width x height should be 960×544.

      If your video is the old school 4:3 standard definition (squarish looking) format the width x height should be 640×480.

      Hopefully this helps.

       

      Thumb up 0 Thumb down 0

      • byakuya says:

        tq man…
        another question i have encoded a movie to my vita but it doest have the sub when i played in the vita…maybe it bcoz of srt file that cnnot be burned in ..????
         
        2) why i encoded anime it look pretty in the vita but like a live  action movie it bcame ugly….
         
         
        sory for my bad eng :3

        Thumb up 0 Thumb down 0

        • exo says:

          Handbrake supports .srt files. It should be working. Make sure you check the burned in box and click the add button. You could also try playing around with the track selection. If track 1 doesn’t work, try track 2 if available.

          Anime usually doesn’t have as much detail as a live action movie. Color palettes are simpler and there isn’t usually as much stuff going on, on screen. You will probably have to up the bit rate (see Step 3) for live action movies to get similar results to anime shows.

          Thumb up 0 Thumb down 0

  8. Paul says:

    Using Handbrake 0.9.9 with this preset…
    To add this preset to Handbrake, it’s not done in the Presets menu anymore since it’s been removed, it’s now at the Options button > Import at the lower right of the window.
    The option to adjust the bitrate in step 3 to meet certain video sizes is not there, I see it says Constant Quality and an RF slider instead. It’s set at RF 20.
    Also the comment above in response to byakuay which mentioned changing the height & width settings — I can’t do it on my program, the preset has anamorphic set in strict and I can’t change height and width.
    Other than that it looks good, guess it’s up to the end user which options to tweak to make the output look even better. :)

    Thumb up 0 Thumb down 0

    • exo says:

      Guess it’s time for an update! Thanks for the heads up Paul.

      Thumb up 0 Thumb down 0

    • Paul says:

      Just saw the instructions were updated, thanks. Setting the resolution to PS Vita’s native made for a huge decrease in file size, it’s about 33% smaller.
      It seems the plist linked did not change though, it’s the one from 2012-02-28. The RF preset is RF 20 and anamorphic remains strict.
      Are the RF preset and anamorphic the only settings that were updated? I just thought maybe there were other settings that changed too, we can’t apply it if we’re using the old plist.

      Thumb up 0 Thumb down 0

      • exo says:

        Strange. The link is definitely for the updated (2.00) plist. Anyway if the preset isn’t working, you can just manually change the anamorphic setting to None, and RF to 21. All the other settings should be the same.

        Thumb up 0 Thumb down 0

      • Paul says:

        I did a checksum comparison with the previous plist which was uploaded here — http://www.mediafire.com/?ntivnezvwax8x7n
         
          File: [absolute.animeblogger.net]vitasettings v1.00.plist
        CRC-32: 1efcd4e5
           MD4: 213d518ea948c925572c02258e609330
           MD5: b0b2fe13466b5cefd2be3a3abc88a3f7
         SHA-1: 140bca919584caab4621505619722cd67171c9b2
         
        It has the exact same checksums as the 2.00 plist.
         
          File: [absolute.animeblogger.net]vitasettings v2.00 HD.plist
        CRC-32: 1efcd4e5
           MD4: 213d518ea948c925572c02258e609330
           MD5: b0b2fe13466b5cefd2be3a3abc88a3f7
         SHA-1: 140bca919584caab4621505619722cd67171c9b2

        Thumb up 0 Thumb down 0

  9. Rz says:

    Hello. I’ve read your guide and it’s very helpful.
    But, when I tried it by myself (using your guide and encode the video), when it’s finish and I want to copy to my Vita, somehow my Vita unable to detect the video. (There are no video).
     
    My Vita’s system software is 2.61, I suspect perhaps because of the system software?
     
    Any idea what I did wrong?

    Thumb up 0 Thumb down 0

    • exo says:

      Hmm…

      Ensure the file type of the encoded video is correct (.mp4) and that it plays fine on another media player.

      If you are still having problems, perhaps something went wrong when transferring the video to your Vita? Refer to this: http://manuals.playstation.net/document/en/psvita/cm/content_pc.html and see if it matches to what you did.

      Thumb up 0 Thumb down 0

      • Rz says:

        It’s on my mp4, and I transfer it right.
        I don’t meet any issue on playing the video too.
         
        That’s why I’m not sure which one the problem is.
         
        Oh yeah, here is the media info if you want to check:
        ===
        General
        Complete name                    : C:\Users\Public\Videos\[horriblesubs] Noukome – 03 [720p]-1.m4v
        Format                           : MPEG-4
        Format profile                   : Base Media / Version 2
        Codec ID                         : mp42
        File size                        : 192 MiB
        Duration                         : 24mn 40s
        Overall bit rate                 : 1 091 Kbps
        Encoded date                     : UTC 2013-10-25 05:47:27
        Tagged date                      : UTC 2013-10-25 06:29:20
        Writing application              : HandBrake 0.9.9 2013052900

        Video
        ID                               : 1
        Format                           : AVC
        Format/Info                      : Advanced Video Codec
        Format profile                   : Main@L3.1
        Format settings, CABAC           : Yes
        Format settings, ReFrames        : 4 frames
        Codec ID                         : avc1
        Codec ID/Info                    : Advanced Video Coding
        Duration                         : 24mn 40s
        Bit rate mode                    : Variable
        Bit rate                         : 927 Kbps
        Width                            : 960 pixels
        Height                           : 544 pixels
        Display aspect ratio             : 16:9
        Frame rate mode                  : Constant
        Frame rate                       : 23.810 fps
        Color space                      : YUV
        Chroma subsampling               : 4:2:0
        Bit depth                        : 8 bits
        Scan type                        : Progressive
        Bits/(Pixel*Frame)               : 0.075
        Stream size                      : 164 MiB (85%)
        Writing library                  : x264 core 130 r2273 b3065e6
        Encoding settings                : cabac=1 / ref=2 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=6 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=3 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=2 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=0 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=21.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
        Encoded date                     : UTC 2013-10-25 05:47:27
        Tagged date                      : UTC 2013-10-25 06:29:20
        Color primaries                  : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
        Transfer characteristics         : BT.709-5, BT.1361
        Matrix coefficients              : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177

        Audio
        ID                               : 2
        Format                           : AAC
        Format/Info                      : Advanced Audio Codec
        Format profile                   : LC
        Codec ID                         : 40
        Duration                         : 24mn 40s
        Bit rate mode                    : Variable
        Bit rate                         : 159 Kbps
        Maximum bit rate                 : 339 Kbps
        Channel(s)                       : 2 channels
        Channel positions                : Front: L R
        Sampling rate                    : 44.1 KHz
        Compression mode                 : Lossy
        Stream size                      : 28.1 MiB (15%)
        Encoded date                     : UTC 2013-10-25 05:47:27
        Tagged date                      : UTC 2013-10-25 06:29:19
        ===

        Thumb up 0 Thumb down 0

  10. Kanade says:

    great tutorial.But I have some problem when change resolution .EX: like this video, I can’t change resolution to 960×544 or even original size 720×480 .When I change height to 960, weight auto change to another number and opposite..Maybe it because aspect ratio, but why I can’t even use original resolution.
     720p and 1080p videos work fine

    Thumb up 0 Thumb down 0

  11. Shizuo says:

    This tuts looks simple, gonna try it.

    Thanks.

    Thumb up 0 Thumb down 0

  12. Bradly says:

    Okay so this seems like it works for everyone BUT me since im using the newest version apparently. Whenever i do try to import the file i get this

    Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Operator ‘==’ cannot be applied to operands of type ‘int’ and ‘bool’
    at CallSite.Target(Closure , CallSite , Object , Boolean )
    at HandBrake.ApplicationServices.Factories.PlistPresetFactory.ParseSetting(KeyValuePair`2 kvp, Preset preset) in c:\HandBrake\Hudson\workspace\Release_WindowsGUI.10.0\win\CS\HandBrake.ApplicationServices\Factories\PlistPresetFactory.cs:line 321
    at HandBrake.ApplicationServices.Factories.PlistPresetFactory.CreatePreset(PList plist) in c:\HandBrake\Hudson\workspace\Release_WindowsGUI.10.0\win\CS\HandBrake.ApplicationServices\Factories\PlistPresetFactory.cs:line 76
    at HandBrakeWPF.ViewModels.MainViewModel.PresetImport() in c:\HandBrake\Hudson\workspace\Release_WindowsGUI.10.0\win\CS\HandBrakeWPF\ViewModels\MainViewModel.cs:line 1691

    IS it me doing something wrong? The handbrake version i have is newest and i think thats the main problem here

    Thumb up 0 Thumb down 0

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Back to Top ↑