Converting multiple avis using Handbrake

Discussion in 'Mobile Phones and Media Players' started by pasc, Apr 26, 2013.

Apr 26, 2013
  1. pasc
    OP

    Member pasc GBATemps official GBA Freak

    Joined:
    Sep 9, 2006
    Messages:
    2,570
    Location:
    Germany
    Country:
    Germany
    Well I got around 200 avi files that I want to convert into the mp4 format.

    Thing is. I want to soft sub them with ".ass" soft subtitle files.

    The folder looks like this:

    File 1.avi
    File1.ass
    File2.avi
    File2.ass

    I know that it would be possible to first encode all to the mp4/m4v format and later add the softsubtitles by hand, however I want an approach that will complete this task in a single rush.

    Any help of the Handbrake/whatever Windows compatible conversion program cracks is recommended.

    Thanks in advance.
     
  2. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,731
    Country:
    United Kingdom
    Just to avoid confusion when you say softsub you mean you want to continue having the option for the users to turn the subs on and off. If so neither MP4* nor avi can really handle the files being bundled.
    *MP4 has a horrible format called MP4 timed text and if you thought the encoding of SSA/ASS subs was madness you have seen nothing yet not to mention you will lose data if the ASS subs are using functionality ASS is designed to have (karaoke, positioned, colours and such like). If subs can be tacked onto AVI it will be as a horrible hack. Most players worth a damn will automatically load said subs though and that is how it was sorted before MKV came along.

    Similarly MP4 and AVI do not mean an awful lot when you say convert- MP4 and AVI are both containers and can both happily handle MPEG4-ASP aka xvid/divx. MP4 does better on later formats like MPEG4-AVC aka H264 where AVI will again be a hack to get it in there (though somewhat less horrible than the subs options).

    If you do just need it in the MP4 container you can just remux it as such- Mp4box will handle this though frontends like YAMB and my MP4box GUI are also nice, I say that but many files and simple operations are command line country really so maybe just mp4box.

    Otherwise you probably are looking at a batch encode. Myself I quite like megui for this sort of thing but such things can be discussed later.
     
  3. pasc
    OP

    Member pasc GBATemps official GBA Freak

    Joined:
    Sep 9, 2006
    Messages:
    2,570
    Location:
    Germany
    Country:
    Germany
    Well I called them soft subs because - like you already stated - they can be turned off.

    Well that megui, is that capable of encoding those multiple files and automatically at ass/srt files that have the same filename ?
     
  4. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,731
    Country:
    United Kingdom
    Auto adding might be a stretch though once you set the settings up it is just a matter of clicking through enough times.

    A sample of what you will see on the one click encoder settings
    meguioneclick_1.jpg

    That is if you do want to encode something, if you are happy with the video size in the AVI you can likely just get away with a muxer.
     
  5. pasc
    OP

    Member pasc GBATemps official GBA Freak

    Joined:
    Sep 9, 2006
    Messages:
    2,570
    Location:
    Germany
    Country:
    Germany
    slowly but surely I tend to think that

    1. convert with handbrake
    2. batch add all subtitles to the newly created files would be the best...

    Can mp4box do that with command line inputs ?
     
  6. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,731
    Country:
    United Kingdom
    The only reason for using handbrake in this case would be because the video in the AVI files is taking up too much space and you want to convert them to another format that is can achieve quality with lower bitrates. Full video encoding is outside MP4box's remit so yeah you need to make something handle it.

    Assuming you are willing to take the quality hit on conversion from ASS to MP4 timed text then yes MP4box can convert the subs and stick them on. What will ultimately support MP4 timed text in a reasonable manner is an entirely different discussion.
     
  7. pasc
    OP

    Member pasc GBATemps official GBA Freak

    Joined:
    Sep 9, 2006
    Messages:
    2,570
    Location:
    Germany
    Country:
    Germany
    So what you are saying essentially is:

    Batchadding subtitles is a pain in the a** ?
     
  8. trumpet-205

    Member trumpet-205 Embrace the darkness within

    Joined:
    Jan 14, 2009
    Messages:
    4,363
    Country:
    United States
    First of all, MP4 doesn't support ASS/SSA subtitles. The only subtitle MP4 supports is basic text style subtitle.

    If you feed these subtitles to MeGUI/Handbrake, they are either burned in (hard sub) or converted to basic text style (lose color, position, etc).

    So I have to ask, why MP4 container? Do you intend to play them at hardware player?
     
  9. pasc
    OP

    Member pasc GBATemps official GBA Freak

    Joined:
    Sep 9, 2006
    Messages:
    2,570
    Location:
    Germany
    Country:
    Germany
    Mp4 is mandatory because iDevices natively support it (opposed to other formats like avi).

    While it is true that avi mkv etc. can be played on said devices aswell, it doesn't work well when streaming said files.

    I'm well aware that ass/srt's aren't directly supported. Therefore I'll need a programm to embed them into the files (probably converting them to said text style subtitle in the process).

    MP4Box works for this, however it doesn't do batch (as far as I'm aware).
     
  10. trumpet-205

    Member trumpet-205 Embrace the darkness within

    Joined:
    Jan 14, 2009
    Messages:
    4,363
    Country:
    United States
    MP4Box drops all the formatting SSA is using. One problem with that is if you have subtitle at top and bottom they will messed together at the bottom.

    Plus if you plan to watch it on iDevices, chances are you need to do re-encoding. A simple remux from AVI to MP4 probably isn't enough.
     
  11. pasc
    OP

    Member pasc GBATemps official GBA Freak

    Joined:
    Sep 9, 2006
    Messages:
    2,570
    Location:
    Germany
    Country:
    Germany
    Thats what I feared actually...

    Well off I go firing up Handbrake... I was hoping it could automagically add them subtitles, guess I hoped wrong.

    Thanks either way.
     
  12. pasc
    OP

    Member pasc GBATemps official GBA Freak

    Joined:
    Sep 9, 2006
    Messages:
    2,570
    Location:
    Germany
    Country:
    Germany
    Well, I guess I'll be going this route:

    1. Convert ass's to srt's
    2. Convert avi's to mp4's using Handbrake
    3. do this http://ubuntuforums.org/showthread.php?t=2101166 (could probably include this step in the second.. however since I want on/off switchable subtitles...)
     
  13. optimusiq
    This message by optimusiq has been removed from public view by FIX94, Jun 28, 2013, Reason: advertising.
    Jun 28, 2013

Share This Page