Encoding BD movie help

Discussion in 'Blu-ray players' started by Idioteck, Dec 17, 2007.

  1. Idioteck

    Idioteck Member

    Joined:
    Nov 19, 2007
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    11
    Ive read up on a way to encode BD movies, i have having an immense amount of trouble using xport. Meaning i cant even get by the first step, so if someone could assist me by telling me how to use xport that would be amazing, thank you

    heres the guide i was using..

    For BluRay titles with MPEG-2 video and AC3 or LPCM audio:

    You need:
    dgindex
    optional: xport
    optional: eac3to.exe (1.8 is latest as of June 3)
    virtualdubmod or a graphical avisynth frontend such as AvsP
    avisynth 2.5.7
    MeGUI (preferrably)

    Directions:

    If the movie is spread across multiple m2ts files, concatenate them together in the correct order via the copy /b command. copy /b 0001.m2ts+0002.m2ts+0003.m2ts out.m2ts.

    Load the m2ts file in dgindex just like a regular transport stream.

    Save a d2v project file. Normally the english AC3 track is the first track in the m2ts. If the english track is not the first track (rare, but it happens) you will need to select the audio PID manually with the Set PIDs option, or extract it manually with xport.

    If you are planning on extracting the LPCM audio for FLAC or DTS creation, you will need to do so with xport.

    xport -h 0001.m2ts 1 0 1 0 # (replace audio PID with the LPCM PID if it is not 1)



    Play the AC3 audio and note its length. Open MeGUI and load its bitrate calculator. Enter the audio length in here and pick 23.976 for framerate. A frame calculation will come up. Jot this down. Enter 640 for the audio bitrate for track 1, then pick a target filesize (DVD5, DVD9). If you want 1.5 DVD5, calculate the DVD5 bitrate with no audio track, multiply by 1.5, then subtract 640 to get the correct target bitrate. For ALL target sizes, subtract about 5kbps off the bitrate to compensate for x264 overhead and to leave room for muxing subtitles.

    Create the following .avs script and load it in MeGUI's preview or virtualdubmod:

    dgdecode_mpeg2source("yourmovie.d2v")

    converttoyv12()



    Proceed to the "common directions" section below.

    For BluRay titles with AVC video and AC3 or LPCM audio:

    You need:
    dgavcindex 0.5a or newer
    optional: Sonic Cinemaster decoder package 4.2 (commercial, easily found)
    optional: xport
    optional: eac3to.exe (1.8 is latest as of June 3)
    virtualdubmod or a graphical avisynth frontend such as AvsP
    avisynth 2.5.7
    MeGUI (preferrably)

    Directions:

    If the movie is spread across multiple m2ts files, concatenate them together in the correct order via the copy /b command. copy /b 0001.m2ts+0002.m2ts+0003.m2ts out.m2ts.

    Demux the disc using xport. Program stream is 1. Video stream is usually 1. Audio stream is 1 or 2 depending on wheither you want LPCM or AC3 audio. xport will tell you which type of audio it's demuxing when run.

    xport -h 0001.m2ts 1 1 1



    You will get a video file and an audio file. Rename the video file to .264 and load it in dgavcindex. Preview the video stream. If the video stream looks fine and doesn't have weird artifacting or goofy colors, it is not PAFF and dgavcindex will work fine on it. If you get odd colors or artifacting, you will need to use sonic's decoders as follows: Build a graph in graphedit of file source (your .m2ts) -> sonic HD demuxer -> sonic cinemaster 4.2 video decocder, save the graph. If you are using graphedit/sonic to display the video, you must still extract the audio with xport.

    xport -h 0001.m2ts 1 0 1 0 # (replace audio PID with the LPCM PID if it is not 1)



    Play the AC3 audio and note its length. Open MeGUI and load its bitrate calculator. Enter the audio length in here and pick 23.976 for framerate. A frame calculation will come up. Jot this down. Enter 640 for the audio bitrate for track 1, then pick a target filesize (DVD5, DVD9). If you want 1.5 DVD5, calculate the DVD5 bitrate with no audio track, multiply by 1.5, then subtract 640 to get the correct target bitrate. For ALL target sizes, subtract about 5kbps off the bitrate to compensate for x264 overhead and to leave room for muxing subtitles.

    Create the following avs:

    avcsource("yourmovie.dga",audio=false) # if stream was decodeable with dgavcindex, you do not need a framecount value this way

    directshowsource("yourmovie.grf",audio=false,fps=23.976) # if stream was not decodeable with dgavcindex

    converttoyv12()



    Proceed to the "common directions" section below.

    --------------------------------------------

    COMMON DIRECTIONS

    Seek to a bright frame, take a screenshot, load it in paint or photoshop, calculate how many pixels of black borders need to be cropped off all edges. You can only crop in multiples of 2, for quality's sake you are better off overcropping by 1px than undercropping by 1px and leaving a black bar. Add

    crop(w,x,-y,-z)



    to your .avs. w=left, x=top, y=right, z=bottom

    CROP ALL BLACK AND/OR DARK GREY COLORED BARS AROUND ALL EDGES FOR THE LOVE OF GOD.

    Resize to the appropriate aspect ratio:

    spline36resize(1280,720) # for video with a source roughly 1920x1080 after cropping

    spline36resize(1280,688) # for video with a source roughly 1920x1040

    spline36resize(1280,544) # video source 1920x816

    spline36resize(1280,536) # video source 1920x800 - pick 536 or 528 depending on which one looks better to you.

    spline36resize(1280,528) # video source 1920x800



    You can sharpen when downsizing to 720p if you like. There's assorted guides on how to sharpen which I won't go into here.

    Save the .avs.

    Encode with x264. Get x264 here. These are pretty good commandlines which I base many of my x264 encodes on:

    x264.exe --pass 1 --bitrate XXXX --stats ".stats" --bframes 3 --b-pyramid --direct auto

    --deblock -3:-3 --subme 1 --analyse none --me dia --threads auto --thread-input --cqmfile "prestige.cfg"

    --progress --no-psnr --no-ssim --output NUL "yourmovie.avs"



    x264.exe --pass 2 --bitrate XXXX --stats ".stats" --ref 5 --mixed-refs --no-fast-pskip

    --bframes 3 --b-pyramid --b-rdo --bime --weightb --direct auto --deblock -3:-3 --subme 7

    --analyse all --8x8dct --trellis 1 --aq-strength 0.3 --me umh --threads auto --thread-input

    --cqmfile "prestige.cfg" --progress --no-psnr --no-ssim --output "yourmovie.mkv" "yourmovie.avs"



    Use mkvmerge to mux the video and ac3 audio together. That's it.

    end common directions
     
    Last edited: Dec 17, 2007
  2. Idioteck

    Idioteck Member

    Joined:
    Nov 19, 2007
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    11
    Got it to work, delete please
     
  3. philly37

    philly37 Regular member

    Joined:
    Apr 17, 2006
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    26
    hey what did you do to get it to work
     
  4. Idioteck

    Idioteck Member

    Joined:
    Nov 19, 2007
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    11
    well i already have the BD source and i think i just uninstalled and reinstalled and whatnot i dont really recall i remember being surprised it worked cause i didnt think anything i specifically did to fix it sorry
     
  5. philly37

    philly37 Regular member

    Joined:
    Apr 17, 2006
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    26
    How long does it take from start to finish to rencode a movie
     

Share This Page