Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > High Efficiency Video Coding (HEVC)

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th June 2014, 03:51   #21  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Hi Kurtnoise,

Thanks for this tool, with x265 picking up pace this tool should become very handy.

Any possibility of adding some of the enhancements of avs4x264mod?
Reel.Deel is offline   Reply With Quote
Old 4th June 2014, 07:39   #22  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
Hi,

Yes, sure...Which kind of enhancements would you like to have ?
Kurtnoise is offline   Reply With Quote
Old 4th June 2014, 13:38   #23  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by 06_taro View Post
Modifications:

-- When x264′s parameter “input-depth” is set and is not equal to 8, divide “width” by 2. This makes faked 16-bit avs output, i.e., MSB and LSB field interleaved clip, be treated correctly by x264. If “input-depth” is not defined or equals to 8, avs4x264mod acts in the same way as original avs4x264.

-- Print full command-line piped to x264_64.exe to screen, prefixed by “avs4x264 [info]:”.

-- Make x264_64.exe path changeable. The path of x264 binary can be set by --x264-binary "x264_path" or -L "x264_path". If custom path is not set, default path "x264_64.exe" will be used.

-- Directly output i422/i444 with AviSynth 2.6 csp YV16/YV24.

-- Show help info when running with no options.

-- Improve capability with more styles of parameters in x264.
E.g., --tcfile-in="timecode.txt", --input-depth=16, --x264-binary="x264", -L=x264 and -Lx264.

-- Do not add --input-res/--fps/--frames/--input-csp if already defined.

-- Correct number of frames to be handled when --frames is defined.

-- Add "--seek-mode" to decide use "fast" seek mode or "safe" seek mode when has "--seek". Default is "fast".
---- "fast" mode is similar to x264's internal method of avs demuxer: skip frames until the frame --seek indicates. However, when used with --qpfile/--tcfile-in, it won't skip but add a "FreezeFrame(0, seek, seek)" to avs script to actually skip the process of those frames. I have to play this trick because x264 regards qpfile/tcfile-in as qpfiles/timecodes of input files, not output files, so the frame numbers of input piped raw ( can be only linearly seeked in x264 ) has to be left untouched.
---- "safe" mode uses a safer but slower method: delivering every untouched frame to x264. When the process of frames before "--seek" frame is heavy, the "useless" running time of processing those frames will be much longer than "fast" mode, but the result is safer for scripts like TDecimate(mode=3), which can only be seeked in a linear way.

-- Add "--timebase" when using "--tcfile-in"

-- Correct framerate to proper NTSC fraction if applicable

-- Support direct .d2v/.dga/.dgi input, .vpy input with either VapourSource(VSImport) or vfw interface(AVISource/HBVFWSource), and some media file input such as .avi/.mkv/.mp4/.m2ts/etc
Quote:
Originally Posted by Kurtnoise View Post
Which kind of enhancements would you like to have ?
I think these would be a nice addition to avs4x265. If I only had to choose some I would choose:


-- When x264′s parameter “input-depth” is set and is not equal to 8, divide “width” by 2....
  • IMO this makes it a bit more straight forward and easier to use.

-- Make x264_64.exe path changeable. The path of x264 binary can be set by --x264-binary "x264_path"...
  • self-explanatory.

-- Directly output i422/i444 with AviSynth 2.6 csp YV16/YV24.
  • This option automatically adds the -- --input-csp ixxx to the x264 command line.

-- Do not add --input-res/--fps/--frames/--input-csp if already defined.

-- Correct number of frames to be handled when --frames is defined.
  • These options (--input-res/--fps/--frames/--input-csp) are defined by avs2x264 so there's no need for the user to input these.

-- Add "--seek-mode" to decide use "fast" seek mode or "safe" seek mode when has "--seek"....
  • Can be useful in certain cases.
.
-- Correct framerate to proper NTSC fraction if applicable.
  • May be useful for people like me who live in NTSC land.

I hope I'm not asking for too much.
Reel.Deel is offline   Reply With Quote
Old 5th June 2014, 08:12   #24  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
Let's try with the 0.4 release and tell me if all is fine...
Kurtnoise is offline   Reply With Quote
Old 5th June 2014, 09:01   #25  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
Thank you for developing this tool, as little as it may be. Funny it got even smaller in the last version; now there may even be space for a changelog file in the archive?
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 5th June 2014, 09:27   #26  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
It's smaller because I didn't include the compressor anymore...

About the changelog :

Quote:
- v0.1 : initialization
- v0.2 : added a switch to specify the x265 binary to use.
- v0.3 : replaced the old avisynth_c.h header file by the new one provided in FFmpeg in order to take account the new colorspaces. Thanks to qyot27
- v0.4 : added some enhancements mentioned by Reel.Deel in this post.
I will add it in the package for the next versions...

Last edited by Kurtnoise; 5th June 2014 at 13:40. Reason: fixed typos
Kurtnoise is offline   Reply With Quote
Old 5th June 2014, 12:05   #27  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
^ v0.1
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 6th June 2014, 03:28   #28  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by Kurtnoise View Post
Let's try with the 0.4 release and tell me if all is fine...
Thanks for the quick update Kurtnoise.
Quickly encoded a small sample with 16-bit YV12 input to 10-bit x265, it seems to be working properly. I did not test --seek-mode or 8-bit x265 (will test more thoroughly this weekend).


I hate to bother again but if it's not too much trouble can you please add this:

-- Print full command-line piped to x264_64.exe to screen, prefixed by “avs4x264 [info]:”.
Reel.Deel is offline   Reply With Quote
Old 6th June 2014, 07:57   #29  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
Done in the 0.5 release...
Kurtnoise is offline   Reply With Quote
Old 6th August 2014, 20:17   #30  |  Link
Zathor
Registered User
 
Join Date: Nov 2009
Posts: 2,405
Thanks for the tool, Kurtnoise.

Sadly since 0.4 I get an error which does not appear when using 0.3.

My command line:
"D:\MeGUI\tools\x265\avs4x265.exe" --x265-binary ".\x64\x265.exe" --crf 23 --output "D:\MeGUI\_SAMPLE_VIDEOS\1.mkv.hevc" "D:\MeGUI\_SAMPLE_VIDEOS\1.avs"

avs4x265 output:
Code:
avs  [info]: AviSynth 2.58, build:Dec 22 2008 [08:46:51]
avs  [info]: Video colorspace: YV12
avs  [info]: Video resolution: 1920x1080
avs  [info]: Video framerate: 24000/1001
avs  [info]: Video framecount: 3388
Error: Failed to create process <2>!
Reason is that the x265.exe cannot be located. The path must now be full qualified - so this command works:
"D:\MeGUI\tools\x265\avs4x265.exe" --x265-binary "D:\MeGUI\tools\x265\x64\x265.exe" --crf 23 --output "D:\MeGUI\_SAMPLE_VIDEOS\1.mkv.hevc" "D:\MeGUI\_SAMPLE_VIDEOS\1.avs"

So this is not an important problem. But perhaps you can add in the next version an error message when the exe cannot be located (and maybe revert to the old functionality that relative paths are ok). Thanks for your time!
Zathor is offline   Reply With Quote
Old 6th August 2014, 21:47   #31  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,419
Quote:
Originally Posted by Kurtnoise View Post
About the changelog :
Code:
- v0.3 : replaced the old avisynth_c.h header file by the new one provided in FFmpeg in order to take account the new colorspaces. Thanks to qyot27
Actually, that header is the one kemuri-_9 modified for x264 (and the C-plugin branch of FFMS2). FFmpeg uses it for consistency with them.
qyot27 is offline   Reply With Quote
Old 4th March 2015, 09:55   #32  |  Link
kaefert
Registered User
 
Join Date: Jul 2013
Posts: 60
could somebody compile a 64bit version?

Quote:
avs [error]: Cannot load file 'C:/Program Files (x86)/AviSynth+/plugins64/LSMASHSource.dll'
kaefert is offline   Reply With Quote
Old 4th March 2015, 10:06   #33  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
What you ask it's not related to this tool...

Last edited by Kurtnoise; 4th March 2015 at 14:16.
Kurtnoise is offline   Reply With Quote
Old 4th March 2015, 10:08   #34  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
How about avs4x26x? It has a 64-bit version too, and specifically supports AviSynth+.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 6th March 2015, 12:33   #35  |  Link
kaefert
Registered User
 
Join Date: Jul 2013
Posts: 60
@LigH - thanks for the suggestion! that would work I guess, but I found an alternative that I like much more:

https://github.com/rdp/ffmpeg-windows-build-helpers/
contains a completely automated build script for ffmpeg with x265 (and a lot of other libraries) that has the parameter --high-bitdepth=y which makes it add the -DHIGH_BIT_DEPTH=ON cmake parameter for x265.
with that I can simplify my encoding a bit by doing encoding and packing into an mp4 container in a single step
kaefert is offline   Reply With Quote
Old 6th March 2015, 12:39   #36  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
Just a pity that ffmpeg will probably create an incomplete MP4 file, so you may still need to refresh the container with MP4Box.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 9th March 2015, 18:47   #37  |  Link
conc@n8
Registered Loser
 
conc@n8's Avatar
 
Join Date: Mar 2009
Posts: 3
Quote:
Just a pity that ffmpeg will probably create an incomplete MP4 file, so you may still need to refresh the container with MP4Box.
Could you elaborate please? Thank you.
conc@n8 is offline   Reply With Quote
Old 9th March 2015, 21:17   #38  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
Well, as already documented many times: ffmpeg works like a "filter". It writes an output file preferably only once, so that it could also write to a pipe where "rewind and overwrite the header" is technically not supported. But there are containers which would need values in the header = the beginning of a file which are only known at the end of the conversion. A program which writes a complete container would have to know the whole content before it starts to write the file. ffmpeg may not do that well in all cases. MP4Box does that.

That is my current level of knowledge for years already. If I am wrong now, because ffmpeg improved in this case, please correct me.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 10th March 2015, 01:34   #39  |  Link
conc@n8
Registered Loser
 
conc@n8's Avatar
 
Join Date: Mar 2009
Posts: 3
Quote:
Originally Posted by LigH View Post
Well, as already documented many times: ffmpeg works like a "filter". It writes an output file preferably only once, so that it could also write to a pipe where "rewind and overwrite the header" is technically not supported. But there are containers which would need values in the header = the beginning of a file which are only known at the end of the conversion. A program which writes a complete container would have to know the whole content before it starts to write the file. ffmpeg may not do that well in all cases. MP4Box does that.

That is my current level of knowledge for years already. If I am wrong now, because ffmpeg improved in this case, please correct me.
FFmpeg has implemented a few new muxing options recently, and perhaps -movflags faststart applies to such situations: http://ffmpeg.org/ffmpeg-formats.htm...-mp4_002c-ismv
conc@n8 is offline   Reply With Quote
Old 30th March 2015, 08:26   #40  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
@ Kurtnoise:

The direct link to the v0.5 release returns a valid ZIP download; but the "here" URL in your starting post returns an error page. Looks like you don't have a "website" there anymore.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:24.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.