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 26th April 2016, 22:49   #3621  |  Link
Ma
Registered User
 
Join Date: Feb 2015
Posts: 324
Quote:
Originally Posted by stax76 View Post
Do you by chance have a 8/10/12 bit multilib build?
www.msystem.waw.pl/x265/utf16_output.7z

It is only output file fixed (remains: input y4m + yuv and stat file).
Ma is offline   Reply With Quote
Old 26th April 2016, 23:00   #3622  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: Germany
Posts: 5,635
Quote:
Originally Posted by Ma View Post
www.msystem.waw.pl/x265/utf16_output.7z

It is only output file fixed (remains: input y4m + yuv and stat file).
works great, thanks!
stax76 is offline   Reply With Quote
Old 27th April 2016, 00:17   #3623  |  Link
Magik Mark
Registered User
 
Join Date: Dec 2014
Posts: 538
I have a single Xeon 2695v3 CPU. May I ask which among the x265 build is best for my CPU? Is it the ICC build? GCC 5.3 / 6? AVX2?

Thanks
__________________
Asus X99 Sabertooth - Xeon E5 2695 - Asus Strix GTX 960 4G - DDR4 16GB Predator - Pioneer KRP 600M (isf calibrated) - Yamaha A3030 - Windows 10 x64 - Kodi with DSplayer - Lav - MadVR - XYsubtitle
Magik Mark is offline   Reply With Quote
Old 27th April 2016, 05:26   #3624  |  Link
x265_Project
Registered User
 
Join Date: Jul 2013
Posts: 596
Quote:
Originally Posted by Magik Mark View Post
I have a single Xeon 2695v3 CPU. May I ask which among the x265 build is best for my CPU? Is it the ICC build? GCC 5.3 / 6? AVX2?

Thanks
x265 has over a thousand kernels that have been hand-optimized with the latest SIMD instruction sets (SSE2, SSE3, SSE4, AVX, AVX2). Your compiler won't change these kernels one bit. For the rest of the code, there are very minor differences in performance due to different compilers (ICC vs GCC).
x265_Project is offline   Reply With Quote
Old 27th April 2016, 18:28   #3625  |  Link
Ma
Registered User
 
Join Date: Feb 2015
Posts: 324
I've made extended version of Unicode patch for Windows -- now output file works and stat file(s). Console info is also fixed including error messages, example:
Code:
i:\vs\x265\ma\XP>x265 --pass 1 --bitrate 4500 --stat Łojezu_Łotr-jeden?.stat /speed/720p50_parkrun_ter.y4m -o W_żółtych_płomieni
ach_liści.hevc
y4m  [info]: 1280x720 fps 50/1 i420p8 sar 1:1 frames 0 - 503 of 504
raw  [info]: output file: W_żółtych_płomieniach_liści.hevc
x265 [info]: HEVC encoder version 1.9+147-19cced21060f
x265 [info]: build info [Windows][GCC 6.1.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x265 [info]: Main profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 4 threads
x265 [info]: frame threads / pool features       : 2 / wpp(12 rows)
x265 [error]: can't open stats file Łojezu_Łotr-jeden?.stat.temp
x265 [error]: failed to open encoder
Sample multilib build (WinXP compatible, 64-bit and 32-bit + patch):
www.msystem.waw.pl/x265/utf16_output-stat.7z

If there will be no errors, tomorrow I will send this patch to devel-list.
Ma is offline   Reply With Quote
Old 27th April 2016, 19:13   #3626  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: Germany
Posts: 5,635
@MA

The first was perfect, this one encodes but the console output looks wrong:



My code works for all other tools:

Code:
Overloads Sub Encode(passName As String, batchCode As String)
    batchCode = "@echo off" + BR + "CHCP 65001" + BR + batchCode
    Dim batchPath = p.TempDir + p.TargetFile.Base + "_encode.bat"
    File.WriteAllText(batchPath, batchCode, New UTF8Encoding(False)) 'UTF8 without BOM

    Using proc As New Proc
        proc.Init(passName)
        proc.Encoding = Encoding.UTF8
        proc.File = "cmd.exe"
        proc.Arguments = "/C call """ + batchPath + """"
        proc.Start()
    End Using
End Sub

Last edited by stax76; 27th April 2016 at 19:17.
stax76 is offline   Reply With Quote
Old 27th April 2016, 20:02   #3627  |  Link
Ma
Registered User
 
Join Date: Feb 2015
Posts: 324
@stax76
Thanks for info! I've changed output mode for stderr from _O_U16TEXT to _O_U8TEXT. New test build (only 64-bit + patch):
www.msystem.waw.pl/x265/utf16_output-stat2.7z
Ma is offline   Reply With Quote
Old 27th April 2016, 20:45   #3628  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: Germany
Posts: 5,635
@Ma

Thanks for the test build, I tested various things without noticing any problem!
stax76 is offline   Reply With Quote
Old 27th April 2016, 23:05   #3629  |  Link
pingfr
Registered User
 
Join Date: May 2015
Posts: 185
The true power of the Open Source.
pingfr is offline   Reply With Quote
Old 27th April 2016, 23:45   #3630  |  Link
x265_Project
Registered User
 
Join Date: Jul 2013
Posts: 596
Quote:
Originally Posted by pingfr View Post
The true power of the Open Source.
It's unbeatable. Thanks guys.
x265_Project is offline   Reply With Quote
Old 28th April 2016, 09:20   #3631  |  Link
Ma
Registered User
 
Join Date: Feb 2015
Posts: 324
Patch which allows Unicode filenames in Windows (for now output file and stat files) has been sent
https://patches.videolan.org/patch/13109/

Next we can fix input files.
------------------------
GCC on old mingw-w64 not works with this code. First workaround is:
Code:
diff -r 00ea3784bd36 source/common/common.cpp
--- a/source/common/common.cpp	Thu Apr 28 09:59:30 2016 +0200
+++ b/source/common/common.cpp	Fri Apr 29 03:12:31 2016 +0200
@@ -185,7 +185,7 @@
     MultiByteToWideChar(CP_UTF8, 0, buffer, -1, buf_utf16, sizeof(buf_utf16)/sizeof(wchar_t));
     fflush(stderr);
     int oldmode = _setmode(_fileno(stderr), _O_U8TEXT);
-    fwprintf(stderr, L"%ls", buf_utf16);               // WARNING: due to bug in msvcrt.dll fputws doesn't work in mingw/gcc 
+    fwprintf_s(stderr, L"%ls", buf_utf16);             // WARNING: due to bug in msvcrt.dll fputws doesn't work in mingw/gcc
     fflush(stderr);
     _setmode(_fileno(stderr), oldmode);
 }
Under investigation...

Last edited by Ma; 29th April 2016 at 02:14.
Ma is offline   Reply With Quote
Old 29th April 2016, 03:52   #3632  |  Link
Ma
Registered User
 
Join Date: Feb 2015
Posts: 324
Could someone with WinXP test this 32-bit version of x265:
www.msystem.waw.pl/x265/32bit-xp.zip

I've tested on Win7 64bit and Vista 32bit -- works. I don't have WinXP.
It should work and should be line "raw [info]:"
Code:
y4m  [info]: 1280x720 fps 50/1 i420p8 sar 1:1 frames 0 - 503 of 504
raw  [info]: output file: Żółć.hevc
x265 [info]: HEVC encoder version 1.9+150-00ea3784bd36
x265 [info]: build info [Windows][GCC 5.3.0][32 bit] 8bit
This is due a bug in old mingw-w64 (v4 for example) in function fwprintf, so we can try fwprintf_s instead.
-------------------
Finally I give up with mingw-w64 (for ver. 3 I can't write working code), so it is easier switch to Windows API. If someone wants to try new code:
hg import --no-commit https://patches.videolan.org/patch/13138/raw/

Last edited by Ma; 29th April 2016 at 09:31.
Ma is offline   Reply With Quote
Old 29th April 2016, 14:16   #3633  |  Link
pie
Registered User
 
pie's Avatar
 
Join Date: Sep 2012
Posts: 17
Quote:
Originally Posted by Ma View Post
Could someone with WinXP test this 32-bit version of x265:
www.msystem.waw.pl/x265/32bit-xp.zip

Doesn't work:
http://i.imgur.com/v4bLZpq.png
pie is offline   Reply With Quote
Old 29th April 2016, 14:57   #3634  |  Link
Ma
Registered User
 
Join Date: Feb 2015
Posts: 324
Quote:
Originally Posted by pie View Post
Thanks!

I've prepared new samples compiled with patch
https://patches.videolan.org/patch/13138/
Could you test this on WinXP (on 99% should work, both compiled by GCC 4.8.3 and GCC 5.3):
www.msystem.waw.pl/x265/32bit-xp2.zip
Ma is offline   Reply With Quote
Old 29th April 2016, 15:12   #3635  |  Link
pie
Registered User
 
pie's Avatar
 
Join Date: Sep 2012
Posts: 17
Quote:
Originally Posted by Ma View Post
Thanks!
Could you test this on WinXP (on 99% should work, both compiled by GCC 4.8.3 and GCC 5.3):
www.msystem.waw.pl/x265/32bit-xp2.zip

Both versions seem to work.

raw [info]: output file: Zólc.hevc
pie is offline   Reply With Quote
Old 29th April 2016, 15:23   #3636  |  Link
Ma
Registered User
 
Join Date: Feb 2015
Posts: 324
Quote:
Originally Posted by pie View Post
Both versions seem to work.

raw [info]: output file: Zólc.hevc
Thanks! So we should make a fix to mingw-w64 code (but this may take a long while). For now it is better to apply 13138 patch.
---------------
After investigation -- mingw-w64 code looks OK, x265 v1.9+150 code looks OK, the bug is in msvcrt.dll. Almost all mingw-w64 stdio code is written with use of fputwc/fputc functions from msvcrt.dll. fputwc function from msvcrt.dll doesn't work with _O_U8TEXT mode (works only with _O_U16TEXT mode). If you build x265 v1.9+150 by mingw-w64/gcc linked to msvcrt.dll, there will be no "raw [info]" line in console. If you link to msvcr110.dll instead of msvcrt.dll, all is working (without any changes in x265 code nor mingw-w64 code). Example www.msystem.waw.pl/x265/gcc483-xp.7z -- x265n.exe is linked to msvcr110.dll and works OK without any patches.

Last edited by Ma; 29th April 2016 at 20:22.
Ma is offline   Reply With Quote
Old 1st May 2016, 13:07   #3637  |  Link
James Freeman
Registered User
 
Join Date: Sep 2013
Posts: 919
Quote:
Originally Posted by James Freeman View Post
I realized that HEVC main10 output chroma subsampling has to be equal to the input, in raw YUV (uncompressed), so it has to be 10bit 4:2:0 uncompressed first.

If it is Lossless (compressed) I have to push it to HEVC through Avisynth with avs4x265 so only AVI is optional.
I want to export from AE in 10bit 4:2:0 4K (P010), MOV or AVI so that I can encode with HEVC.

Any idea?
Bump this.

Any idea how I can push a EXR sequence (individual file fer frame) to x265?
I tried everything in after effects but can't generate a 10bit 4:2:0 4K MOV or AVI file for x265 Main10.

Any suggestion to go from After Effects workflow to 10bit 4:2:0 4K is much appreciated.
__________________
System: i7 3770K, GTX660, Win7 64bit, Panasonic ST60, Dell U2410.

Last edited by James Freeman; 1st May 2016 at 13:15.
James Freeman is offline   Reply With Quote
Old 1st May 2016, 16:27   #3638  |  Link
James Freeman
Registered User
 
Join Date: Sep 2013
Posts: 919
Okay, Ihave managed to maintain a 10bit 4K workflow from start to finish.

First I export to PNG image sequence in 16bit (smallest file format compared to TIFF, DPX, EXR).
Next I use ffmpeg PNG image sequence to Y4M raw in yuv420p10, 16bit RGB full range PNG converted and dithered down to 10bit YUV 4:2:0 Limited range by ffmpeg with 1:1 color accuracy.
8 seconds Y4M (192 frames) = 4GB !!

Anyone knows a better way to keep a 4:2:0 10bit 4K workflow in a smaller footprint?
For test patterns it is pointless to use more than 1 fps, so the Y4M is proportionally smaller since it is uncompressed.

For anyone interested, here are my steps:
Quote:
ffmpeg.exe -framerate 24 -i "E:\Sequence\img-%%05d.png" -strict -1 -pix_fmt yuv420p10 -vf colormatrix=bt601:bt709 "E:\x265\RAW.Y4M"
Quote:
x265.exe --input-depth 10 --uhd-bd --preset slow --crf 18 --colorprim bt2020 --transfer smpte-st-2084 --colormatrix bt2020nc --master-display "G(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(10000000,1)" --max-cll "0,0" --output "E:\x265\output.hevc" "E:\x265\RAW.y4m"
Quote:
mp4box.exe -add E:\X265\output.hevc -new E:\X265\output.mp4
__________________
System: i7 3770K, GTX660, Win7 64bit, Panasonic ST60, Dell U2410.

Last edited by James Freeman; 1st May 2016 at 20:15.
James Freeman is offline   Reply With Quote
Old 1st May 2016, 17:22   #3639  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,881
I guess ffmpeg could read image sequences and pipe Y4M. But no guarantees, and no idea about quirks how to manage the color depths.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 1st May 2016, 17:31   #3640  |  Link
James Freeman
Registered User
 
Join Date: Sep 2013
Posts: 919
What do you mean "no guarantee" and "quirks how to manage the color depths"?
Can you be more specific?
__________________
System: i7 3770K, GTX660, Win7 64bit, Panasonic ST60, Dell U2410.
James Freeman 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 21:50.


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