A Layman's Guide to Shrinking Blu-ray Size on Hard Drive

Discussion in 'High Definition Software' started by rlung, Jan 5, 2008.

  1. rlung

    rlung Well-Known Member

    (UPDATED) A Layman's Guide to Shrinking Blu-ray Size on Hard Drive

    A Layman's Guide to Shrinking Bluray Size on Hard Drive

    01/05/08 original
    01/12/09 major update


    Background:

    This is a guide aimed squarely at reducing the Bluray movie size stored on a hard drive. Here we will concentrate on stripping unneeded audio tracks & movie supplements while preserving subtitles. In the end we will be left with (1) .iso file which will be mountable with VCD and playable through PDVD 8. Burning to disc is an option though file size will vary by movie and BD-50 media might be required.

    On my movies all I want is (1) 1080p video stream, (1) TrueHD / DTS-MA HD / PCM audio stream and (1) PGS subtitle stream. There is no re-encoding involved so A/V bitrate is untouched, movie will be as pristine as original, just smaller. Of greater interest is no menus or forced trailers, as soon as disc is mounted movie will play. We will keep the original chapter breaks and have natively imbedded subs, something the old guide couldn’t do. On that note this update streamlines the entire process down from ~ 2 hrs to ~ 20 min, not counting step 0. No more OCRing subs or manually joining seamless branching titles, that’s so 2008ish. Also no more Nero Showtime, we’ll be using the clear next-gen winner, PDVD 8.

    My goals:

    1. subtitles (they are not hard-coding in, just embedded…still have the ability to turn on/off through PDVD 8 )
    2. no re-encoding
    3. simple (for me, that means no graphs), fast (relatively) and easily replicated title to title with consistent results

    Programs I Used:

    AnyDVDHD v6.5.1.1 (courtesy of Slysoft) - without this amazing program none of what follows is possible, current version or above required for BD++ titles

    Eac3to v3.01 (courtesy of madshi @ doom9) - lists playlist order of mpls, enables preserving original chapter breaks

    TSmuxer v1.8.4b (courtesy of roman76r @ doom9) - removes unwanted A/V/S streams, creates new BD file structure

    IMGburn v2.4.2.0 - converts BD file structure to .iso

    Virtual Clone Drive (courtesy of Slysoft) - mounts .iso as a virtual drive

    PowerDVD 8 - player


    Step 0

    Backup our BD to hard drive with AnyDVDHD

    For example we’ll be doing King King ripped to D:\

    [​IMG]


    Step 1

    - Our goal is to use eac3to and find the appropriate m2ts order, seamless branching or otherwise -

    Start eac3to by opening a DOS prompt, start/run/cmd.

    We need to find where eac3to.exe is, mine’s in <c:\program files\eac3to\eac3to.exe>

    [​IMG]

    I kept DOS commands simple, after all this is a layman’s guide.

    <dir> = list contents of current directory
    <cd> = change directory to specified
    <cd..> = change directory, up one folder

    Eac3to command is <eac3to <drive letter>:\targetmovie>
    My example is <eac3to “d:\king kong”>

    The quotation around king kong is required because of the space.

    [​IMG]

    This is the meat & potatoes, telling us that when selected 00000.mpls playlist will play 00001.m2ts file @ 3hr 20min which in turn contains (1) 1080p + (1) DTS-MA. Astute readers will realize that King Kong is in fact a seamless branching disc, I used an already “shrunk” version for this guide…the concept works exactly the same. Under normal circumstances eac3to will list a LOT more, in seamless branching titles it’ll list the .m2ts file sequence for each .mpls. Generally the first .mpls listed is the one we want, check run times for unrated / director / theatrical variations. We want to isolate & identify which mpls we want to feed TSmuxer in the next step. Also keep in mind the extraneous steams that we’ll be stripping in the next step.

    (continued)
     
    Last edited: Jan 13, 2009
  2. rlung

    rlung Well-Known Member

    A Layman's Guide to Shrinking Bluray Size on Hard Drive

    (continued)

    Step 2

    - Our goal is to use TSmuxer to strip unwanted streams -

    Start Tsmuxer, add the xxx.mpls we found in step 1, it’s located in D:\king kong\bdmv\playlist

    [​IMG]

    Again usually TSmuxer will list a whole lot more, here it’s listing what eac3to already told us existed with the addition of our PGS subtitle track. Either uncheck or remove the undesired stream(s). Newer titles tend to have more than 1 video track, usually another copy @ 480p. I take them all off, leaving just 1 vid, 1 audio, 1 subtitle. In fact because this is an already shrunk version of King Kong, it gives you an idea of what the end result will be. Under output select another folder, preferably on another drive, to write the shrunk version of movie.

    Under Blu-ray tab check custom chapter list, this preserves original chapter breaks.

    [​IMG]

    Start muxing.

    Note: after muxing you can test the movie from HD using PDVD 7, not required but useful.
    Note: sometimes TSmuxer will spit out an error after muxing, can’t remember what it said, it’s that rare. Simple solution under Split & cut tab enable split by size every 2GB.

    [​IMG]

    (continued)
     
    Last edited: Jan 13, 2009
  3. rlung

    rlung Well-Known Member

    A Layman's Guide to Shrinking Bluray Size on Hard Drive

    (continued)

    Step 3

    - Our goal is turn newly created movie file structure in an .iso

    Open IMGburn, select create image file form file/folders.

    [​IMG]

    Select source folder N:\king kong final, destination as M:\king kong. Click OK through any prompts, it’ll auto detect as BD and change file structure to UDF 2.50.

    [​IMG]

    Click build.

    That’s it, we’re done!

    Mount .iso with VCD, playback with PDVD 8.


    Results:

    <before / after> GB

    A Few Good Men = 41.2 / 23.1
    Memento = 22.4 / 15.1
    The Patriot = 42.2 / 30.6
    The Replacement Killers = 30.3 / 18.7
    Ghost Rider = 46.4 / 28.3
    Underworld = 43.3 / 25.3
    Rocky Balboa = 43.1 / 22.0
    Spiderman 3 = 44.7 / 31.3

    02/24/08 update:

    Cars = 38.5 / 20.3
    Crash = 20.8 / 18.0
    Shoot Em up = 46.4 / 17.0
    War = 40.3 / 19.3

    03/04/08 update:

    The Rock = 36.4 / 24.1

    01/13/09 update:

    Babylon AD = 38.6 / 26.4
    Black Hawk Down = 46.4 / 32.2
    King Kong = 36.1 / 31.8
    The Chronicles of Riddick = 30.4 / 19.1
    The Kingdom = 38.5 / 24.5

    02/03/09 update:

    Any Given Sunday = 45.7 / 28.7
    Predator 2 = 38.0 / 32.0
    Sideways = 42.1 / 36.2
    Sin City = 45.2 / 31.5
    Superman Returns = 36.2 / 21.2

    02/14/09 update:

    A History of Violence = 21.5 / 18.5
    Taken = 31.1 / 26.1

    Nothing written here is new info, I just humbly compiled a method that works for me and hopefully can help others.

    Good Luck

    Ryan
     
    Last edited: Feb 12, 2009
  4. Kartman

    Kartman Member

    One step further...

    Good summary...

    Most of what you've summarized here I've pieced together myself but I'm going one step further in that I'm trying to create down-res'd versions of the BD rips for consumption by my kids (they just don't appreciate 1080p :D)

    Used AnyDVD to rip to disk... Pieced the seamless branching M2TS files together with tssplitter and then remuxed using tsremux. This is where I'm getting an issue... I then open the remuxed M2TS file (again in tsremux) and demux the DD5.1 AC3 stream.

    I've converted the AC3 to MP3 and then use meGUI to encode the video as an AVI (xvid) and then finally mux the MP3 and the AVI together.

    The problem is that my result is very close but the audio is out of sync just a bit. Interestingly, my AC3 to MP3 conversion tool is showing a different total stream length (1:33:41) that what tsremux is reporting (1:33:39) before I demux the audio. I've tried trimming the AC3 but this didn't fix the issue.

    Does anybody know why I might be seeing different stream lengths from the audio and video portions of the same M2TS. Obviously, the mismatch in lengths is getting my audio out of sync when the audio and video get muxed back together.

    Ahhhh... So close...
     
  5. rlung

    rlung Well-Known Member

    Thank you

    I've been experiencing very similar problems, took the fight out of me for doing any type of container change.

    Could there be a ~2sec silence at beginning / end of movie?

    Is eac3to the prog reporting the differating duration time?

    Have we tried running tsremux twice before dumuxing the audio?

    What if we keep the .ac3 native and temp mux to say .mkv?

    Good Luck

    Ryan
     
    Last edited: Jan 7, 2008
  6. YaniD

    YaniD Well-Known Member

    A very interesting guide. When I go neutral, I will definitely be referring back to this.

    However, I was wondering what might happen if the studios author certain .m2ts segments with audio on different tracks. I'm not sure whether the BD format supports changing audio references on the fly, but I do recall some DVDs used to change the audio track layout from PGC to PGC and it was supported by the DVD spec. This approach was, I think, yet another method to frustrate rippers in the early days if one was not actively using the ifo files to determine on the fly structure.

    Using only the .m2ts files seems like a vulnerability for this type of rip corruption, especially if a trial and error approach is necessary to determine which is the english language track in the first place. I guess one would have to extract a test section of audio from each .m2ts to confirm the language track arrangement: not difficult, but another potential slowdown.
     
  7. Kartman

    Kartman Member

    I tried just trimming the audio at the end becuase it seemed the sync started out OK but was getting worse and worse as the movie played. Didn't really help.

    What's the thinking behind the 2nd remux?
     
  8. rlung

    rlung Well-Known Member

    To more "properly" align the headers on seamless branching discs, might be worth a shot.

    Courtesy of dmz01 @ doom9, author of Tsremux:

    http://forum.doom9.org/showthread.php?p=1080968#post1080968

    post # 875

    Good Luck

    Ryan
     
    Last edited: Jan 7, 2008
  9. sfc

    sfc New Member

    . . .

    Very impressive. Definitely sticky worthy.
     
  10. captain_video

    captain_video Well-Known Member

    I've posted a similar question in the HD-DVD tutorial but since the two formats are different I thought I'd post it here since the process is different between the two. Assuming I don't have a seamless branching disc and it's not BD+ and I don't need subtitles, it appears that all I need to do is select the main .m2ts file for playback and then discard everything else, correct? I suppose if I wanted to discard extraneous soundtracks and subtitles I'd use TSremux to remux the m2ts file while trimming out all the fat. Are any other files required for playback in either Nero Showtime or PowerDVD?
     
  11. rlung

    rlung Well-Known Member


    That is 100% correct, no bdmv folder structure of any kind is required for playback, thereby eliminating the need of PDVD for playback.

    Use TSremux, discard extraneous material, watch xxxxx.m2ts in Showtime / MPC...the process takes only ~ 20mins.

    Good Luck

    Ryan
     
  12. pete_bond

    pete_bond New Member

    How do I remove the unwanted extras, and just have the movie?

    Thanks rlung for the guide - really useful.

    But how can I remove every mt2s file except the main movie - i don't want any extras, trailers etc - just the movie and that's it.
     
  13. rlung

    rlung Well-Known Member

    Hey Pete

    Thank You.

    This guide does indeed deal with leaving only the main movie on 1 xxxxx.m2ts file...no trailers, adverts, warnings, menu screen, folder structure, bonus material, alternate ending, deleted scenes, bloopers or the like.

    Just the movie, the whole movie and nothing but the movie.

    This is what we should expect, BD root folder:
    [​IMG]

    Final movie folder, 2 files only:
    [​IMG]


    Another alternative, less efficient / more frustration (although the only viable way currently for BD+ titles), would be to keep the bdmv folder structure, manual find which xxxxx.m2ts file(s) are non-mission critical, delete and check playback integrity through PDVD. Rinse & repeat.

    Good Luck

    Ryan
     
  14. gwolfman

    gwolfman Well-Known Member

    amazing, thanks!
     
  15. captain_video

    captain_video Well-Known Member

    I made an interesting discovery while processing my Blu-Ray rips per this guide. When you set up the .m2ts file for processing I noticed that there is an option to output the file as a .ts file. There is also an option for converting Blu-Ray TrueHD to AC3. I was processing Paprika, which is a Japanese anime feature film, and found that the AC3 conversion was necessary to get any audio output from the stripped-down .m2ts file. The default audio was in Japanese TrueHD and the English soundtrack was also in TrueHD. There were no standard Dolby Digital soundtracks in English so I had to convert it to AC3 in order to hear any English audio using Nero Showtime.

    What makes the .ts output so interesting is that by selecting this output you now have a standard transport stream that is recognizable by any number of off-the-shelf codecs, at least in theory anyway. I haven't tried any other playback options because I was more interested in the fact that the file is now recognizable in VideoReDo. With VideoReDo I can cut the file into DVD-5 size chunks and save them as mpeg files.

    The mpeg files can then be imported into Ulead DVD Movie Factory 5 or 6 and processed as HD-DVDs. The result is a Blu-Ray disc that is now converted to a set of HD-DVDs that you can burn on standard DVD+/-R/RW discs using your existing burner. The discs will play back on any HD-DVD player. If you burn the discs with Nero you have to burn them as UDF files with X-Box compatibility mode enabled.

    The whole process for creating homebrew HD-DVDs is outlined in the AVSForums under the HD DVD software section (it's a sticky). I've been using this process for almost a year using recordings I've culled from my HDTivo, series 3 Tivo, and HTPC. I have a standalone HD-DVD player, an X-Box 360 HD-DVD add-on drive, and a Pioneer Blu-Ray reader in my main PC. With this method I now have a means of creating a set of HD-DVDs from any non-BD+ disc that should play back in my standalone player.

    I have not actually tried to create an HD-DVD using a Blu-Ray source yet but I have no reason to believe it won't work if VideoReDo can see the .ts file. I plan on investigating this further but at the moment my PC is tied up converting a crapload of Blu-Ray and HD-DVD rips to single files to free up space on my HTPC drives.

    ADDENDUM: I just tried this process with Spiderman 3 and the .ts file was not recognizable by VideoReDo. I checked and Spiderman 3 has an AVC (VC-1?) video stream whereas many other titles have an mpeg stream. As long as the video is an mpeg stream you should be able to process the files and convert it to an HD-DVD format. Otherwise, you're SOL unless there's an app that will convert an AVC stream to an mpeg file.
     
    Last edited: Jan 13, 2008
  16. heydude1

    heydude1 Member

    Help...

    When I try to join the files with TS splitter the files in the stream folders do not show. There are only two files 00026 and 00027 for the main movie. I did the remux but then realized the movie was split in half so went back to join and ts splitter doesn't recognize?
     
  17. eclipse98

    eclipse98 Member

    When you click Add in 'Join TS Files' by default it shows only TS files, in the dropdown 'Files of type' select 'All files' and all your non-TS files (m2ts) will show up. HTH, Davie.
     
  18. rlung

    rlung Well-Known Member

    Thank you Davie, I'll change the guide to more properly reflect this.
     
  19. eclipse98

    eclipse98 Member

    Problems with seamless branching discs

    I tried 2 different movies (Ratatoulle and Surfsup) and experienced the same problem -- I used TSsplitter (TSsplitter 1.00, downloaded from fast forward projects, they say 1.00 is the latest version) to join seamless branching discs (some 20+ streams in Rat and 3 streams in Surf). Then I used TSremux 0.0.19 to get rid of unwanted audio streams.
    When I play final .m2ts file (I use PowerDVD 7.3, version that came with LG combo drive) I get some video freezing issues which appear to occur at the point where files have been joined. What strange is that audio plays normally but video stream seems to freeze for 3-4 seconds then normal playback continues. I am not sure if it's PowerDVD issue, but other non-seamless movies (CasinoR, Prestige) converted with TSremux play without any problem. Does anybody else have this problem ?

    Thanks, Davie.
     
  20. YaniD

    YaniD Well-Known Member

    I used TSremux 0.0.19 to reduce a Bluray title down to the main video (H.264), audio (LPCM) and subtitle streams only. However, I saved as .TS format (file size down to 30GB from 40GB).

    Is there an advantage to saving in .m2ts versus .ts format?

    I'm aware that playing back in MPC etc, the audio is likely to have channels swapped from normal, since Bluray uses a special channel mapping, but for a first test of the process, I don't mind. My aim is to ultimately convert the LPCM to Flac, so will do a remap during that phase (will this require a matroska container rather than .m2ts or .ts?).

    However, when playing back the .TS with MPC, I get full size video (coreavc) but no audio.

    When playing back in graphedit, I get video (PowerDVD AVC) and audio; however the video is approx 1/4 size in the activex window. Whilst I can expand the window to full screen, I expect it is just scaling. I'm curious as to why PowerDVD decoder is downscaling the video. I have suspected PowerDVD was downscaling for playback through the PowerDVD player, but have never been able to prove it: maybe this is the evidence.

    I think maybe Haali splitter is being used in graphedit, but the internal MPC splitter which maybe can't handle the audio format.

    Can anyone suggest what is wrong with the above process and maybe a better arrangement to achieve the desired outcome (full res playback in MPC)?