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 1st May 2019, 21:14   #6801  |  Link
~ VEGETA ~
The cult of personality
 
~ VEGETA ~'s Avatar
 
Join Date: May 2013
Location: Planet Vegeta
Posts: 115
Quote:
Originally Posted by sneaker_ger View Post
I thought you wanted to use libx265 from within ffmpeg. Ignore my last post.

Use:
Code:
ffmpeg -i "INPUT" -f yuv4mpegpipe -strict -1 -
Then make sure the log says it's "yuv420p10le".
I see:

video: wrapped_avframe, yuv420p10le in cmd so I guess this is ok.

what about my other question about better way to encode next time?
~ VEGETA ~ is offline   Reply With Quote
Old 1st May 2019, 21:36   #6802  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,413
Quote:
Originally Posted by ~ VEGETA ~ View Post
I encoded .vpy file to lossless 10-bit H.264 since my device is slow with the filters I used

Plus, next time when I want to encode like this (lossless 10-bit H.264 then 10-bit HEVC), should I encode to .yuv/.h264 in x264 (--muxer yuv\raw)? So I can input it directly to x265 without piping??
I don't understand the need for a temporary file at all in this case. Usually this is to speed up encoding when we do slow filtering + multiple passes of video encoding and time of
filtering + 1st pass + filtering + 2nd pass + .. > filtering + encode to lossless + 1st pass from lossless + 2nd pass from lossless ..

But you are encoding CRF, e.g. now instead of filtering + x265 crf you do filtering + x264 lossless + x265 crf. That's slower?
sneaker_ger is offline   Reply With Quote
Old 1st May 2019, 21:46   #6803  |  Link
~ VEGETA ~
The cult of personality
 
~ VEGETA ~'s Avatar
 
Join Date: May 2013
Location: Planet Vegeta
Posts: 115
Quote:
Originally Posted by sneaker_ger View Post
I don't understand the need for a temporary file at all in this case. Usually this is to speed up encoding when we do slow filtering + multiple passes of video encoding and time of
filtering + 1st pass + filtering + 2nd pass + .. > filtering + encode to lossless + 1st pass from lossless + 2nd pass from lossless ..

But you are encoding CRF, e.g. now instead of filtering + x265 crf you do filtering + x264 lossless + x265 crf. That's slower?
I have very low fps doing my filters, so I put everything to lossless x264 --preset ultrafast... then I can encode directly using x264 with slow settings in both 1080p and 720p. While If I want to encode in 1080 and 720 from vpy in both times I guess it will be slower since now I've gotta encode the filtering twice.

while if I wanna encode 720p only (from horriblesubs tv shows), then yes I go vpy directly without lossless.


what do you do for encoding BDs to 1080 and 720?
~ VEGETA ~ is offline   Reply With Quote
Old 1st May 2019, 22:18   #6804  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,413
So you encode to multiple resolutions? Ok, then it may make sense to create an intermediate to only do (slow) filtering once.

I think you may save a little bit of time/CPU by saving to uncompressed y4m/yuv instead of encoding x264 lossless as intermediate. But with slow filtering + slow x265 it will probably not make too much of a difference either way. And the size of the file increases so the wear on the HDD/SSD increases. P.S.: ffmpeg allows multiple outputs but I don't know how it affects speed and it may result in HDD fragmentation.


Quote:
Originally Posted by ~ VEGETA ~ View Post
what do you do for encoding BDs to 1080 and 720?
I don't.

Last edited by sneaker_ger; 1st May 2019 at 22:20.
sneaker_ger is offline   Reply With Quote
Old 1st May 2019, 22:28   #6805  |  Link
~ VEGETA ~
The cult of personality
 
~ VEGETA ~'s Avatar
 
Join Date: May 2013
Location: Planet Vegeta
Posts: 115
Quote:
Originally Posted by sneaker_ger View Post
So you encode to multiple resolutions? Ok, then it may make sense to create an intermediate to only do (slow) filtering once.

I think you may save a little bit of time/CPU by saving to uncompressed y4m/yuv instead of encoding x264 lossless as intermediate. But with slow filtering + slow x265 it will probably not make too much of a difference either way. And the size of the file increases so the wear on the HDD/SSD increases. P.S.: ffmpeg allows multiple outputs but I don't know how it affects speed and it may result in HDD fragmentation.

save to uncompressed video?? like using virtualdub2 to do that? not bad but I never tried it. I just hope it won't be more size than lossless h.264, at least not too much. plus, it has to be 10-bit.

I encode on a dedicated server so no problem about HDD xD, or so I think.
~ VEGETA ~ is offline   Reply With Quote
Old 1st May 2019, 22:35   #6806  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,413
You don't need VirtualDub. vspipe can create y4m files. But yes, unsurprisingly, uncompressed files are bigger than compressed ones...

But again: if you are doing slow filtering and slow x265 encoding the difference between uncompressed or lossless x264 --preset ultrafast intermediate is probably not worth worrying about. If you want to know exactly you have to benchmark it.

Last edited by sneaker_ger; 1st May 2019 at 22:38.
sneaker_ger is offline   Reply With Quote
Old 1st May 2019, 22:41   #6807  |  Link
~ VEGETA ~
The cult of personality
 
~ VEGETA ~'s Avatar
 
Join Date: May 2013
Location: Planet Vegeta
Posts: 115
Quote:
Originally Posted by sneaker_ger View Post
You don't need VirtualDub. vspipe can create y4m files. But yes, unsurprisingly, uncompressed files are bigger than compressed ones...

But again: if you are doing slow filtering and slow x265 encoding the difference between uncompressed or lossless x264 --preset ultrafast intermediate is probably not worth worrying about. If you want to know exactly you have to benchmark it.
I thought of doing this:

Code:
ffmpeg -i inputfile.vpy -c:v rawvideo outputfile.yuv
so you suggested vspipe, so maybe this:

Code:
vspipe script.vpy output.raw
or add --y4m

I will try next time to see how much time will it take. Lossless x264 ultrafast 1080p is about 8 hours.
~ VEGETA ~ is offline   Reply With Quote
Old 3rd May 2019, 14:11   #6808  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Germany
Posts: 620
Quote:
I will try next time to see how much time will it take. Lossless x264 ultrafast 1080p is about 8 hours.
If you really need a lossless mezzanine that doesn't require much computational cost, I think you're better off with UTVideo.
Alternatively, you can use other lossless codecs like FFV1, HuffYUV or Lagarith, although my suggestion is UTVideo or FFV1.
__________________
Broadcast Encoder
LinkedIn
FranceBB is offline   Reply With Quote
Old 3rd May 2019, 14:56   #6809  |  Link
~ VEGETA ~
The cult of personality
 
~ VEGETA ~'s Avatar
 
Join Date: May 2013
Location: Planet Vegeta
Posts: 115
Quote:
Originally Posted by FranceBB View Post
If you really need a lossless mezzanine that doesn't require much computational cost, I think you're better off with UTVideo.
Alternatively, you can use other lossless codecs like FFV1, HuffYUV or Lagarith, although my suggestion is UTVideo or FFV1.
I tried make it .yuv raw from virtualdub2 using ffv1 lossless, it took the same time as x264-10bit lossless if not a bit more.

Also, now x265 inputs it directly but it encodes it WAY much slower for IDK reason. Also file size is so freaking huge, maybe I did something bad despite using the exact same encoding commands:

Code:
x265_64bit_10bit.exe --preset slower --crf 17 --ref 6 --rd 6 --psy-rd 1 --ctu 32 --aq-strength 0.8 --output-depth 10 --input-res 1920x1080 --fps 24000/1001 --input "C:\videp.yuv" --output "C:\output.hevc" 

pause

Last edited by ~ VEGETA ~; 3rd May 2019 at 15:00.
~ VEGETA ~ is offline   Reply With Quote
Old 4th May 2019, 07:12   #6810  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Germany
Posts: 620
Quote:
Also file size is so freaking huge
That's not surprising, considering that lossless codecs have limited algorithms to use in order to achieve a compression; as to the uncompressed .yuv file, well, uncompressed is uncompressed.

Quote:
it took the same time as x264-10bit lossless if not a bit more.
Oh... I didn't expect that- Apparently x264 lossless is more optimized or perhaps it's because you used VirtualDub rather than ffmpeg to encode it.

Quote:
now x265 inputs it directly but it encodes it WAY much slower
I didn't expect that. Encoding an uncompressed yuv source shouldn't take more than encoding an uncompressed A/V stream like the one Avisynth pipes to x265 nor encoding a lossless x264 source.
I mean, x265 is still gonna use its internal decoder to take the source in input, right?
Encoding-wise, I wonder whether its own internal decoder is more optimized for taking one thing in input rather than the other, or perhaps is just the way things have been allocated... but that cannot be since each source is lossless and there are little differences on filesize to justify a big speed different, besides compressed lossless, although with less space, still have to be "decoded", while uncompressed lossless files are ready to go but way bigger, so perhaps the hard drive is not fast enough to justify an uncompressed source as it takes longer to buffer it than decoding a losslessly compressed one... I don't know.
Perhaps someone can enlighten me as well about this.
__________________
Broadcast Encoder
LinkedIn

Last edited by FranceBB; 4th May 2019 at 07:17.
FranceBB is offline   Reply With Quote
Old 4th May 2019, 07:27   #6811  |  Link
Wolfberry
Helenium(Easter)
 
Wolfberry's Avatar
 
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 104
x265-3.0_Au+24-4217e691387c-win64-multilib

Code:
x265 [info]: HEVC encoder version 3.0_Au+24-4217e691387c
x265 [info]: build info [Windows][GCC 9.1.1][64 bit] 8bit+10bit+12bit
x265 [info]: (libavcodec  58.52.101)
x265 [info]: (libavformat 58.27.103)
x265 [info]: (libavutil   56.26.101)
x265 [info]: (lsmash       2.16.1)
__________________
Monochrome Anomaly

Last edited by Wolfberry; 16th May 2019 at 04:05.
Wolfberry is offline   Reply With Quote
Old 4th May 2019, 08:56   #6812  |  Link
Leeloo Minaļ
Registered User
 
Join Date: Nov 2007
Posts: 50
Quote:
now x265 inputs it directly but it encodes it WAY much slower
FFV1 offers one of the most efficient compression rate, size-wise, but it is also slow as hell.
And if it is slower than others lossless codecs in compression, it is also slower in decompression !

I am not surprised that x265 encoded slower too, you should try UTVideo instead.
Leeloo Minaļ is offline   Reply With Quote
Old 13th May 2019, 05:29   #6813  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: Germany
Posts: 5,632
The help output has one dash too much I think:

Code:
---hrd-concat            Set HRD concatenation flag for the first keyframe in the buffering period SEI. Default disabled
stax76 is offline   Reply With Quote
Old 13th May 2019, 18:37   #6814  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 543
Quote:
Originally Posted by ~ VEGETA ~ View Post
I tried make it .yuv raw from virtualdub2 using ffv1 lossless
Did you say you make .yuv raw using ffv1 lossless? So would that be an AVI file instead?
MeteorRain is offline   Reply With Quote
Old 15th May 2019, 22:59   #6815  |  Link
iAvoe
Registered User
 
Join Date: Sep 2017
Posts: 8
I wish the next x265 update or build can get rid of piping files in. Something like a straight file input as x264 builds (I'm not sure why it's not working through so many years tho)
iAvoe is offline   Reply With Quote
Old 15th May 2019, 23:21   #6816  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 2,891
Quote:
Originally Posted by iAvoe View Post
I wish the next x265 update or build can get rid of piping files in. Something like a straight file input as x264 builds (I'm not sure why it's not working through so many years tho)
No one is making a build with ffmpeg integrated is why.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 16th May 2019, 00:34   #6817  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,049
*cough*. We're still on the same forum page.

LAVF input is only supported through patches. MCW more or less put the kibosh on the idea of it being in the upstream source a few years ago, IIRC. Something about not wanting to deal with the maintenance burden of input modules other than raw and y4m, as I recall.

I mean, I use the LAVF support patches for my personal builds of x265 CLI, but more often than not, I just use libx265 through FFmpeg, which is probably more what MCW expects people to do if they want all the exotic input file support.
qyot27 is online now   Reply With Quote
Old 16th May 2019, 00:49   #6818  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 92
Last time I tested avs input with this patch was quite slower than avs2yuv+x265.
StvG is offline   Reply With Quote
Old 16th May 2019, 07:08   #6819  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,512
+1 for just using ffmpeg

The only downside AFAICT is when you want to use qpfiles, this still requires piping. I'm sure there are other things too, but this is a big one
Blue_MiSfit is offline   Reply With Quote
Old 16th May 2019, 09:14   #6820  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: Germany
Posts: 5,632
How do I use the patch?

x265.exe --crf 18 --output C:\out.hevc C:\test.avs

Code:
[avs2 @ 0000000002763500] Format avs2 detected only with low score of 1, misdetection possible!
[avs2 @ 0000000002763500] Could not find codec parameters for stream 0 (Video: avs2, none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[NULL @ 0000000002747480] No codec provided to avcodec_open2()
[NULL @ 0000000002747480] No codec provided to avcodec_open2()
lavf [error]: could not find decoder for video stream
x265 [error]: unable to open input file <C:\Users\frank\Daten\Samples\test_temp\test.avs>
stax76 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 04:04.


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