VideoHelp Forum
+ Reply to Thread
Results 1 to 11 of 11
Thread
  1. Im trying to re-encode some of my blu-ray remux files using h.265
    After reading online documentation, i believe x265 can only take y4m or yuv as input.
    How do i extract them from MKV/AVI files?

    I would really prefer y4m unless yuv generates better quality or there are important differences between them.....
    Quote Quote  
  2. Here are some examples:

    mencoder with i420 output:
    Code:
    mencoder -lavdopts threads=8 -really-quiet -of rawvideo -o - -ovc raw -demuxer lavf -vfm ffmpeg -noskip -vf scale,format=i420 -forcedsubsonly -nosub -nosound -mc 0 "F:\TESTCL~1\test.mkv" | x265 --input - --input-res 640x352 --fps 25 --frames 429 --output "H:\Temp\test_19_53_27_8110_01.265"
    ffmpeg with yuv420p output:
    Code:
    ffmpeg -y -v -10 -i "F:\TestClips&Co\test.mkv" -an -sn -threads 8 -vsync 0 -r 25000/1000 -pix_fmt yuv420p -f rawvideo - | x265 --input - --input-res 640x352 --fps 25 --frames 429 --output "H:\Temp\test_19_53_58_0110_01.265"
    ffmpeg with y4m output:
    Code:
    ffmpeg -y -v -10 -i "F:\TestClips&Co\test.mkv" -an -sn -threads 8 -vsync 0 -r 25000/1000 -pix_fmt yuv420p -f y4m - | x265 --input - --colormatrix bt470bg --output "H:\Temp\test_19_53_58_0110_01.265"
    doesn`t matter if you use y4m or raw yuv, y4m is simply a wrapper around raw yuv, so there should be no quality difference.
    Quote Quote  
  3. Correct me if I'm wrong. But those scripts directly output .265 files ?

    Is it doing this?

    Take mkv
    Output yuv/y4m
    Input the yuv/y4m
    encode it with x265
    Output .265 file?

    Thanks
    Quote Quote  
  4. Member
    Join Date
    Nov 2002
    Location
    United States
    Search Comp PM
    The online documentation you read was old. You no longer need to input yuv/y4m. I'm surprised that Selur didn't mention his Hybrid program which will output x265 mp4 or mkv.

    Virtualdub will also convert to x265 mp4 or mkv using the external encoder feature. You'll need to use version 1.10.0 or newer...

    Create an encoder set. Here is a thread explaining how to do that...

    http://forums.virtualdub.org/index.php?act=ST&f=3&t=18840&

    Here are the command arguments for the x265 encoder...

    --preset placebo --input-res %(width)x%(height) --fps %(fps) - -o "%(tempvideofile)"
    --preset veryslow --input-res %(width)x%(height) --fps %(fps) - -o "%(tempvideofile)"
    --preset slower --input-res %(width)x%(height) --fps %(fps) - -o "%(tempvideofile)"
    --preset slow --input-res %(width)x%(height) --fps %(fps) - -o "%(tempvideofile)"
    --preset medium --input-res %(width)x%(height) --fps %(fps) - -o "%(tempvideofile)"
    --preset fast --input-res %(width)x%(height) --fps %(fps) - -o "%(tempvideofile)"
    --preset faster --input-res %(width)x%(height) --fps %(fps) - -o "%(tempvideofile)"
    --preset veryfast --input-res %(width)x%(height) --fps %(fps) - -o "%(tempvideofile)"
    --preset superfast --input-res %(width)x%(height) --fps %(fps) - -o "%(tempvideofile)"
    --preset ultrafast --input-res %(width)x%(height) --fps %(fps) - -o "%(tempvideofile)"

    You'll need the latest x265 build, the latest mkvtoolnix v6.8.0 (mkvmerge.exe) or mp4box.exe from GPAC.

    EXAMPLE:

    Encoder Set: X265 Medium MKV

    Video Encoder: X265 Medium
    Audio Encoder: AC3 Passthrough
    Multiplexer: HEVC MKV

    File Description: mkv
    File Extension: mkv

    Encoder: X265 Medium

    Type: Video encoder
    Program: C:\Tools\X265 Encoders\x265.exe (or wherever your copy is at)
    Command Arguments: --preset medium --input-res %(width)x%(height) --fps %(fps) - -o "%(tempvideofile)"
    Output Filename: %(outputname).hevc
    Checkmarks in first three boxes

    Encoder: AC3 Passthrough

    Type: Audio encoder
    Program: C:\ffmpeg.exe (or wherever your copy is at)
    Command Arguments: -i - -acodec copy "%(tempaudiofile)"
    Output Filename: %(outputname).ac3
    Checkmarks in first three boxes
    Audio Tab: Raw audio data (set audio to direct stream copy)

    Encoder: HEVC MKV
    Type: Multiplexer
    Program: C:\Program Files\MKVToolNix\mkvmerge.exe
    Command Arguments: -q -o "%(outputname)" "%(tempvideofile)" "%(tempaudiofile)"
    Output Filename: (grayed out)
    Checkmarks in first three boxes
    Quote Quote  
  5. Member
    Join Date
    Nov 2002
    Location
    United States
    Search Comp PM
    You could also use DivX265.exe but it is a lot slower or DivXEngine.exe which is faster than both but I can't seem to get it to work. Selur can help with DivXEngine.exe and if you need the encoder set for DivX265 in Virtualdub, I could post that also.
    Quote Quote  
  6. encoder set would be awesome hehehe thx


    edit: i understood what you wrote now and made the encoder set thx
    Last edited by OrangeBanana; 10th Mar 2014 at 05:57.
    Quote Quote  
  7. I kept getting this error

    "The audio encoding process has prematurely exited with an error code of 1 (000000001). Check the log for possible error messages"

    After checking i found this

    "AudioEnc: pipe :: Invalid data found when processing input"

    what did i do wrong ....?
    Quote Quote  
  8. Correct me if I'm wrong. But those scripts directly output .265 files ?
    yes, sounded like this is what you wanted,...
    If you leave out the part behind the pipe and instead of '-' use a file name your can get raw or y4m files.
    Quote Quote  
  9. Member
    Join Date
    Nov 2002
    Location
    United States
    Search Comp PM
    Originally Posted by OrangeBanana View Post
    I kept getting this error

    "The audio encoding process has prematurely exited with an error code of 1 (000000001). Check the log for possible error messages"

    After checking i found this

    "AudioEnc: pipe :: Invalid data found when processing input"

    what did i do wrong ....?
    OK. It looks like your audio is not ac3 so you'll need to create another encoder set like the first one and for audio, you'll need to convert instead of doing passthrough. You can call it AC3 or Aften...


    Type: Audio encoder
    Program: C:\Tools\aften.exe
    Command arguments: -b 192 - "%(tempaudiofile)"
    %(outputname).ac3

    Put checkmark in first three boxes

    Under audio tab you'll need to make sure that Wav file and bypass compression are both ticked.
    Quote Quote  
  10. The files uses DTS-HD MA , not just DTS-HD Core
    Will i lose anything by converting it using aften? i get this feeling since "bypass compression are both ticked" nothing is lost ? but i could be wrong.... ive had problem with DTS-HD high resolution extension being lost and skipped

    thx darrells and Selur for the replies
    Quote Quote  
  11. Member
    Join Date
    Nov 2002
    Location
    United States
    Search Comp PM
    Yes it will. What you need to do is create an mkv with no audio and then use mkvmerge to put the DTS audio in.

    You'll need to create another encoder set and call it X265-NA-MKV

    Video Encoder: X265 (or whichever x265 encoder you're using)
    Audio Encoder: None
    Multiplexer: HEVC-NA-MKV
    mkv
    mkv


    HEVC-NA-MKV

    Type: Multiplexer
    Program: C:\Program Files\MKVToolNix\mkvmerge.exe
    Command Argument:-q -o "%(outputname)" "%(tempvideofile)"
    Checkmark in first three boxes
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!