PDA

View Full Version : h265 file to MKV


Music Rockz
25th February 2015, 12:18
Hello Guys,

I encoded AVS file to .h256 using the "x265GUI"

Preset I used:

--frame-skip 0 --bitrate 260 --tu-inter-depth=1 --tu-intra-depth=1 --rd 0 --subme=1 --me=1 --max-merge=2 --no-amp --no-rect --no-tskip

After encoding it, I muxed it with mkvtoolnix to convert to mkv, but the video didn't work properly!

I checked the avs script with AvsP and it works fine...!

Here is the screenshots and media info of the muxed video..

http://s22.postimg.org/kobjbiqdd/capture_20150225_164212.png

http://s22.postimg.org/hqekhtipt/vlcsnap_2015_02_25_16h42m45s102.png
http://s22.postimg.org/xndcejb41/vlcsnap_2015_02_25_16h42m49s193.png
http://s22.postimg.org/kynn8ludd/vlcsnap_2015_02_25_16h42m56s40.png
http://s22.postimg.org/yj9ttzksh/vlcsnap_2015_02_25_16h42m58s57.png
http://s22.postimg.org/ktfal6xoh/vlcsnap_2015_02_25_16h43m01s86.png
http://s22.postimg.org/cf49aum0x/vlcsnap_2015_02_25_16h43m04s139.png
http://s22.postimg.org/p1a2txz41/vlcsnap_2015_02_25_16h43m16s16.png

General
Unique ID : 196873714358907975396528014394624923709 (0x941C7F885FCF4C9AB0B3849388F9583D)
Complete name : I.mkv
Format : Matroska
Format version : Version 4 / Version 2
File size : 399 MiB
Duration : 2h 50mn
Overall bit rate : 327 Kbps
Encoded date : UTC 2015-02-25 11:05:29
Writing application : mkvmerge v7.6.0 ('Garden of Dreams') 32bit built on Feb 8 2015 12:51:39
Writing library : libebml v1.3.1 + libmatroska v1.4.2
DURATION : 02:50:19.520000000
NUMBER_OF_FRAMES : 239520
NUMBER_OF_BYTES : 81673491
_STATISTICS_WRITING_APP : mkvmerge v7.6.0 ('Garden of Dreams') 32bit built on Feb 8 2015 12:51:39
_STATISTICS_WRITING_DATE_UTC : 2015-02-25 11:05:29
_STATISTICS_TAGS : BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main@L2.1
Codec ID : V_MPEGH/ISO/HEVC
Duration : 2h 50mn
Width : 608 pixels
Height : 256 pixels
Display aspect ratio : 2.40:1
Frame rate mode : Constant
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Default : Yes
Forced : No

Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : HE-AAC / LC
Codec ID : A_AAC
Duration : 2h 50mn
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz / 24.0 KHz
Compression mode : Lossy
Delay relative to video : 31ms
Default : Yes
Forced : No

Someone please help me to correct this error in future! :confused:

Thanks & Regards,
Music Rockz

Music Rockz
25th February 2015, 17:20
Experts please help me on this...!!

foxyshadis
25th February 2015, 23:59
It looks like your VLC decoding is broken, not your encoding, most likely because 608 isn't a multiple of 16. When was the last time you updated VLC?

Edit: Looking at it again, I think it's a bug in ffmpeg's handling of avisynth, since the frame breaks are in the middle of encoding blocks. The x265ui developers will have to fix or workaround that; in the meantime if you make everything mod-16 it'll probably work better.

filler56789
26th February 2015, 01:58
...
Most likely because 608 isn't a multiple of 16.

608÷16 = 38

foxyshadis
26th February 2015, 03:50
608÷16 = 38

I can't math today, obviously. Well, some other bug is being triggered in ffmpeg (or possibly VLC), I wonder what.

Music Rockz
26th February 2015, 04:41
Well, some other bug is being triggered in ffmpeg (or possibly VLC), I wonder what.
Other HEVC encodes by HB and VidCoder working fine in my VLC and its the latest version!

Any x265Gui builders?

x265_Project
26th February 2015, 05:00
This is the first I've heard of x265GUI. I can't recommend it. There are many other better choices available including Handbrake, Hybrid, MeGUI, IFME, and Staxrip.

Don't use --rd 0. That is an experimental RD level, and it is not producing worthwhile results.

I wouldn't recommend changing any x265 options that are defined by our performance presets unless you are willing to first test your changes to see if they are actually better than the default preset values.

qyot27
26th February 2015, 06:10
Edit: Looking at it again, I think it's a bug in ffmpeg's handling of avisynth, since the frame breaks are in the middle of encoding blocks. The x265ui developers will have to fix or workaround that; in the meantime if you make everything mod-16 it'll probably work better.
It doesn't look like they were trying to use the script in VLC. I think it was the actual video file.

Also, last I checked (a few months ago), VLC didn't allow users to input AviSynth scripts through libavformat. It doesn't seem to automatically expose any codec or demuxer present in the libavcodec/format libraries.

SuLyMaN
26th February 2015, 10:29
The file i.mkv from a Sri-Lankan user seems very legit :D

foxyshadis
26th February 2015, 10:35
It doesn't look like they were trying to use the script in VLC. I think it was the actual video file.

Also, last I checked (a few months ago), VLC didn't allow users to input AviSynth scripts through libavformat. It doesn't seem to automatically expose any codec or demuxer present in the libavcodec/format libraries.

That why I changed my mind to think it was ffmpeg's fault. This x265gui software uses ffmpeg to decode avisynth to a y4m pipe into x265, instead of avisynth.dll and an avs pipe, and ffmpeg's avisynth support has never been particularly robust.

Music Rockz
26th February 2015, 11:59
Is there any other ways to convert avs files in x265 video...?
(except MeGUI)

qyot27
27th February 2015, 00:57
That why I changed my mind to think it was ffmpeg's fault. This x265gui software uses ffmpeg to decode avisynth to a y4m pipe into x265, instead of avisynth.dll and an avs pipe, and ffmpeg's avisynth support has never been particularly robust.
Well, after tracking down the application itself and checking the binaries it provides,

x265GUI (Build180 by ozok) uses x265 0.4.1+546-ccac3a7d3622, which is way too old to be at all useful (October 2013). It's little wonder why the output from it is borked. I can't even remember if it supported y4m piping at that point. It could be taking it in raw.

I've never seen any video corruption like in those screenshots when using FFmpeg with AviSynth (before or after the complete overhaul of libavformat's AviSynth demuxer in 2013; it uses the library directly now, just like x264 does), but seeing the old version number from x265 jogged my memory: I do remember that I did see corrupted output like that from wonky configurations of x265 at really early points in its history.


The simple answer to how to convert an AviSynth script to HEVC in MKV is to use a current build of FFmpeg linked against x265 (http://ffmpeg.zeranoe.com/builds/):
ffmpeg -i input.avs -vcodec libx265 -crf 18 -acodec flac output.mkv
(or whatever acodec options are desired)

huhn
27th February 2015, 03:16
Is there any other ways to convert avs files in x265 video...?
(except MeGUI)

http://forum.doom9.org/showthread.php?t=169607
have not used it in a long time.

Music Rockz
27th February 2015, 04:36
http://forum.doom9.org/showthread.php?t=169607
have not used it in a long time.
I think MeGUI is now enough to do with x265..! Its better to use GUI instead of binaries! :D