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.....
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 11 of 11
Thread
-
-
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"
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"
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"
-
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 -
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 -
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.
-
encoder set would be awesome hehehe thx
edit: i understood what you wrote now and made the encoder set thxLast edited by OrangeBanana; 10th Mar 2014 at 05:57.
-
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 ....? -
Correct me if I'm wrong. But those scripts directly output .265 files ?
If you leave out the part behind the pipe and instead of '-' use a file name your can get raw or y4m files. -
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. -
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 -
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
Similar Threads
-
Aspect Problem: AVCHD -> Premiere -> YUV -> deinterlace -> YUV -> Encore
By fleischverpackung in forum Video ConversionReplies: 8Last Post: 21st Feb 2014, 13:15 -
MENCODER: how to convert from YUV to RGB?
By marcorocchini in forum Newbie / General discussionsReplies: 1Last Post: 19th Dec 2013, 13:24 -
help on convert m2ts to YUV
By jason_tsai in forum Video ConversionReplies: 0Last Post: 29th Nov 2012, 06:08 -
convert raw video .y4m to mpg video with certain GOP
By abeer in forum Video ConversionReplies: 1Last Post: 26th Nov 2012, 10:23 -
Convert from YUV to h.264
By Comrinec in forum Video ConversionReplies: 1Last Post: 24th Mar 2011, 10:07