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. |
![]() |
#1001 | Link | |
Registered User
Join Date: Sep 2013
Location: Czech Republic
Posts: 316
|
Quote:
Please note that layout P010 is DIFFERENT than YV12. mpeg2 and h264 are compressed in 8 bits, hence when decompressed you will get pixel layout known as yv12-planar: 1920x1080 bytes of luma-Y 960x540 bytes of chroma-U 960x540 bytes of chroma-V h265 is compressed in 10 bits, hence when decompressed you will get pixel layout called P010: 3840x2160 words of luma-Y 3840x1080 words of chroma-interlaced-U+V (… this chroma-interlaced format is used e.g. by nVidia cards) So the presentation software needs to handle chroma differently than in case of decoded h264 stream! Last edited by videofan3d; 2nd July 2020 at 22:28. |
|
![]() |
![]() |
![]() |
#1002 | Link |
Guest
Posts: n/a
|
view/check the output from decoding of HEVC
Here are the steps:
(Naturally, the CL: FRIMDecode64 -i:h265 "Rambo Last Blood 2019.h265" -start 1240 -length 653 -sw -o - | ffmpeg -hide_banner -f rawvideo -s 3840x2160 -r 23.976 -pix_fmt yuv420p10le -i - -vcodec copy frim2ffmpeg(653).2.yuv generates the same result.) The pixel format yuv420p10le is used by YUV viewers when work with 10-bit color sampled 4:2:0 EDIT: The same result (colorless) generates FRIMDecode64 -i:h265 Rambo_2019_1240_654.h265 -o Rambo_1240_654.yuv -sw Last edited by SpasV; 3rd July 2020 at 05:46. |
![]() |
![]() |
#1003 | Link | |
Registered User
Join Date: Sep 2013
Location: Czech Republic
Posts: 316
|
Quote:
pixel format yuv420p10le corresponds to yv12 but in words, not bytes, i.e.: 3840x2160 words luma-Y 1920x1080 words chroma-U 1920x1080 words chroma-V (and uses only 10 bits in little-endian) This does not corresponds to output from FRIM where chroma U and V are interlaced. Therefore you've got correct luma-Y, but corrupted chroma information.... |
|
![]() |
![]() |
![]() |
#1004 | Link |
Guest
Posts: n/a
|
pixel format yuv420p10le corresponds to yv12
Thank you videofan3d.
I've run: FRIMDecode64 -i:h265 Rambo_2019_1240_654.h265 -sw -length 200 -o - | FRIMEncode64 -i - -o:h265 FRIM.Rambo_2019.h265 -w 3840 -h 2160 -f 24000/1001 -sw -p010 -u 1 -profile main10 -level 5.1H -cqp 13 14 15 and the result is normal. So, it turned out Intel use some intermediate YUV format for their Media SDK version 1.28 ![]() |
![]() |
![]() |
#1005 | Link | |
Registered User
Join Date: Sep 2013
Location: Czech Republic
Posts: 316
|
Quote:
Conversion to/from YV12/I420 (which is standard for DVD and Bluray) is performed in FRIM itself. |
|
![]() |
![]() |
![]() |
#1006 | Link | |
Guest
Posts: n/a
|
I don't fully understand:
Quote:
![]() obtained: FRIMDecode64 -i:h265 FRIM.Rambo_2019.test.h265 -o FRIM.Rambo_2019.test.yuv -sw RawSourcePlus(file="E:\AV Processing\Rambo Last Blood 2019\FRIM.Rambo_2019.test.yuv", width=3840, height=2160, pixel_type="YUV420P10", fpsnum=24000, fpsden=1001, index="", show=true) Thanks. |
|
![]() |
![]() |
#1007 | Link |
Registered User
Join Date: Sep 2013
Location: Czech Republic
Posts: 316
|
Pixel layout yv12 is planar 4:2:0:
YYYYYYYY YYYYYYYY YYYYYYYY YYYYYYYY UUUU UUUU VVVV VVVV Pixel layout nv12/p010 are semi-planar 4:2:0: YYYYYYYY YYYYYYYY YYYYYYYY YYYYYYYY UVUVUVUV UVUVUVUV Overal frame size is identical, luma is identical, chroma differs. FRIMDecode provides P010 but ffmpeg expects YV12 (in 16 bits) Since luma is identical, you get correct B&W part. But incorrectly interpreted color information. |
![]() |
![]() |
![]() |
#1008 | Link | |||
Guest
Posts: n/a
|
Thank you for explanation.
I think there is some discrepancy with pixel formats. In the example below FRIMDecode64 generates an .yuv file and RawSourcePlus displays it in YUV420P10 pixel format. Quote:
Quote:
Quote:
and the screenshot from -o FRIM.Rambo_2019.test.yuv has no chroma. It seems to me FRIMDecode64 implements a not common 10-bit per channel pixel format known to FRIMEncode64, of course. Last edited by SpasV; 4th July 2020 at 19:56. |
|||
![]() |
![]() |
#1009 | Link |
Registered User
Join Date: Sep 2013
Location: Czech Republic
Posts: 316
|
I'm trying to explain the layout principles.
YUV420P10 in ffmpeg terminology is apparently yv12 layout in words (=2 bytes) while P010 in FRIM/Intel Media SDK terminology is nv12 layout in words (=2 bytes) They have identical luma but different chroma. The phenomena which you are facing is typical when you try to interpret "nv12" as "yv12": - correct luma (B&W part) - kind of moire in color domain Bit-depth(10 bits) is interpreted correctly, otherwise you would get completely burned luma as well. To solve it you have three options: 1. find pixelmode in ffmpeg which corresponds to nv12 in words (if such exists) 2. find some interim pipeline software which will convert nv12->yv12 and put it in-between FRIMDecode and ffmpeg 3. wait till I implement "yv12 in words" into FRIM (maybe sometime I will) |
![]() |
![]() |
![]() |
#1010 | Link |
Guest
Posts: n/a
|
Sorry, if I've misunderstood something.
I haven't used ffmpeg for the particular post. I've used FRIMDecode64() and RawSourcePlus(). I've created an .yuv file using FRIMDecode: FRIMDecode64 -i:h265 test.h265 -o test.yuv No FFMPEG involved! I've got a screenshot using RawSourcePlus: RawSourcePlus(file="test.yuv", ... , pixel_type="YUV420P10") RawSourcePlus supports P010 --> YUV420P10. And no colors on the screenshot. Respectfully, Spas |
![]() |
![]() |
#1011 | Link | |
Registered User
Join Date: Sep 2013
Location: Czech Republic
Posts: 316
|
Quote:
Likely RawSourcePlus() uses the same terminology as ffmpeg, when YUV420P10 represents yv12 in words. (Code-naming of pixel_modes is not important, the functional matter (i.e. layout itself) is) Layout nv12 is used often by graphics-cards and this was probably the reason why Intel has chosen it as native format for its Media SDK. Conclusion is the same, you have now three options to solve it - as I enlisted above. |
|
![]() |
![]() |
![]() |
#1012 | Link | |
Guest
Posts: n/a
|
Thanks videofan3d.
The properly generated by FRIMDecode() .yuv file is recognized by ffmpeg and some yuv players as having pixel format yuv420p10le equivalent to YUV420P10 (played by RawSourcePlus as YUV420P16 also). It seems to me the problem I've faced is due to my improper choosing the clips' start frame. The players play this .yuv clip as black&withe but ffmpeg refuses with an error mesage. Quote:
Thank you again. |
|
![]() |
![]() |
#1013 | Link | |||
Guest
Posts: n/a
|
I cannot get proper output from FRIMDecode64
I highly appreciate your work videofan3d.
Thank you. I am interesting in an intermediate result - Windows Named Pipe. In particular, FRIMDecode can serve as a Named Pipe Server for such pipes: Quote:
Unfortunately, I cannot see a properly decoded output from FRIMDecode64, yet. Here are comparison screens which are screenshots from ffplay receiving outputs from DGDecNV and FRIMDecode through a pipe Scripts:![]() ![]() and screens from YUView displaying images in .yuv files created by DGDecNV through ffmpeg and FRIMDecode directly. ![]() ![]() Quote:
Quote:
Last edited by SpasV; 10th July 2020 at 04:20. |
|||
![]() |
![]() |
#1014 | Link |
Registered User
Join Date: Sep 2013
Location: Czech Republic
Posts: 316
|
Pipe is just a memory bitstream (instead of file) - it saves diskspace and is very common in UNIX environment. It has nothing to do with pixel format or decoding/encoding.
You probably still don't understand the difference between pixel formats yv12 and nv12. See again my schematic depicting in previous posts. yuv420p10le (in ffmpeg terminology) is NOT equal to P010 (in Intel/FRIM terminology). Full stop. (You can read this yuv420p10le as "yuv420 planar 10-bits little-endian"). So, you need to wait some time till I implement this pixel format also into FRIM. Then you will get natively what you need. Try to google in the meantime about pixel formats - there are many references and better explanations on the web. |
![]() |
![]() |
![]() |
#1015 | Link |
Guest
Posts: n/a
|
No P010 format converter
As long as I've searched there is no P010 format converter.
I've found s Named Pipe Client code with links to Named Pipe Server codes at https://docs.microsoft.com/en-us/win...ed-pipe-client. I'll try to modify a server code. |
![]() |
![]() |
#1016 | Link |
Registered User
Join Date: Sep 2013
Location: Czech Republic
Posts: 316
|
Here is interim version FRIM 1.32 which will solve your problem.
Please test it and confirm. (I will publish it later as official release.) Code:
set ISTREAM=input.h265 set OSTREAM=ouput.h265 set PSTREAM=\\.\pipe\yuvpipe start /min .\FRIMDecode64 -i:h265 "%ISTREAM%" -sw -o %PSTREAM% -yuv420p10le ffmpeg -hide_banner -f rawvideo -s 3840x2160 -r 23.976 -pix_fmt yuv420p10le -i %PSTREAM% -vcodec hevc "%OSTREAM%" |
![]() |
![]() |
![]() |
#1017 | Link | ||
Guest
Posts: n/a
|
Quick test - FRIMDecode works with option -yuv420p10le
Thank you very much.
I've successfully run a quick test with a short (1005 frames) clip and FFPlay. Quote:
P.S. By the way, RawSourcePlus() supports format P010, too. Quote:
|
||
![]() |
![]() |
#1018 | Link | |
Guest
Posts: n/a
|
psnr - two inputs test
I've used the ffmpeg's psnr filter which works with two inputs.
Quote:
Something, probably, off topic. There are peculiarities in two cases I saw: * FRIMDecode with option -start The decoder seeks slow and synchronization wasn't possible. So, I extracted hevc files using mkvmerge and tsMuxeR * I made a mistake with cropping. With these parameters -dstsize 3840 1612 -area 0 274 3840 1612 -dstarea 0 274 3840 1612 FRIMDecoder entered an infinite loop. Thank you very much, videofan3d. P.S. x265 doesn't support P010 but it does yuv420p10le. Last edited by SpasV; 16th July 2020 at 15:48. |
|
![]() |
![]() |
#1019 | Link |
Registered User
Join Date: Jan 2007
Posts: 43
|
Rendering in premiere pro produces empty file
I have updated to Frim 1.31 64 bit and installed the example frim project into premiere pro cs6. When I try to export I get an empty file. The log is
Media SDK impl SOFTWARE (c:\UTL\FRIM\libmfxsw64.dll) Media SDK version 1.28 Memory type System Async depth 4 Input format I420 Encoder AVC Input picture: Resolution 1920x1088 PAR 1:1 Structure Progressive Crop X,Y,W,H 0,0,1920,1080 Frame rate 23.976 Output picture: Resolution 1920x1088 PAR 1:1 Structure Progressive Crop X,Y,W,H 0,0,1920,1080 Frame rate 23.976 Bitrate control VBR avg,maximum 28000,40000 GOP structure: GOP length 24 I-/P-frame distance 4 IDR-frame interval 0 GOP type Opened Num of slices 6 Target usage 4 (balanced) Encoded frames: 720 Processing finished in 0.20 seconds As you can see it process the correct number of frames but the .h264 file is empty. Please can someone help. |
![]() |
![]() |
![]() |
#1020 | Link |
Registered User
Join Date: Jan 2007
Posts: 43
|
I420 Error
Please can someone tell me how to get I420 frames using 1.31
FRIMEncode64 -avi -i frim2.avs -o:h264 output.h264 -vbr 16000 21000 -u 4 ERROR: Cannot get I420 frame from input avi-file frim2.avs ERROR: File reader initialization failed. ERROR: Cannot start encoding process. The avs file is avisource("garda-l3-test.avi", audio=false) ConvertToYV12(interlaced=false) |
![]() |
![]() |
![]() |
Tags |
encoders, mvc |
Thread Tools | Search this Thread |
Display Modes | |
|
|