[FFmpeg-trac] #11047(undetermined:new): Compressing to yuv422p10le with x264 errors

FFmpeg trac at avcodec.org
Thu Jun 6 10:36:01 EEST 2024


#11047: Compressing to yuv422p10le with x264 errors
-------------------------------------+-------------------------------------
             Reporter:  Mads         |                    Owner:  (none)
  Johansen                           |
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  unspecified  |               Resolution:
             Keywords:  libx264,     |               Blocked By:
  yuv422p10le                        |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Description changed by Mads Johansen:

Old description:

> Summary of the bug:
> Compressing to x264 with yuv422p10le triggers unplayable file, but with
> different results depending on resolution.
> As I see it, there is a bug with 1080 and 2160 in vertical resolutions,
> because 1440x1080,1920x1080,2048x1080 and 3840x2160 all has errors.
> The complete logs are below, identified by (n), where n is an integer.
>
> Result 1: Works perfectly: ffmpeg -f lavfi -i mandelbrot -t 5 -pix_fmt
> yuv422p10le mandelbrot.mov (1)
> ffmpeg -f lavfi -i mandelbrot=s=640x480 -t 5 -pix_fmt yuv422p10le
> mandelbrot640x480.mov
> (ruling out the size parameter)
> Result 2: Errors in playback:
> ffmpeg -f lavfi -i mandelbrot=s=1920x1080 -t 5 -pix_fmt yuv422p10le
> 1080p.mov (2)
> ffmpeg -f lavfi -i mandelbrot=s=3840x2160 -t 5 -pix_fmt yuv422p10le
> 2160p.mov (3)
> ffmpeg -f lavfi -i mandelbrot=s=2048x1080 -t 5 -pix_fmt yuv422p10le
> 2048x1080.mov (20)
> ffmpeg -i 2048x1080.mov (21)
>
> There are oddities with resolutions though:
> ffmpeg -f lavfi -i mandelbrot=s=1922x1082 -t 5 -pix_fmt yuv422p10le
> 1082p.mov  gives a perfectly working file. (4)
>
> Just to make sure that it’s not my player, I did ffmpeg -i 1080.mov, with
> [h264 @ 00000245b2270500] deblocking_filter_idc 6 out of range
> [h264 @ 00000245b2270500] decode_slice_header error
> [h264 @ 00000245b2270500] no frame!
> See more at  (5)
> Same for 2160p.mov:
> [h264 @ 000002025a890500] non-existing PPS 0 referenced
>     Last message repeated 1 times
> [h264 @ 000002025a890500] decode_slice_header error
> [h264 @ 000002025a890500] no frame!
> See (6)
>
> In the interest of being thorough I have tested with old versions of
> ffmpeg from https://github.com/BtbN/FFmpeg-
> Builds/releases/tag/autobuild-2022-07-31-12-37
> Same results: (7), (8), (9) and (10)
> That means it’s not a recent problem.
>

> I have also tested if it is lavfi -> codec that is a problem.
> Create the same test file into cineform and ffv1:
> ffmpeg -f lavfi -i mandelbrot=s=1920x1080 -t 5 -c:v cfhd cfhd1080p.mov
> ffmpeg -f lavfi -i mandelbrot=s=1920x1080 -t 5 -c:v ffv1 ffv11080p.mov
> (11), (12)
> Then converting the intermediate file into x264 yuv422p10le:
> ffmpeg -i cfhd1080p.mov -pix_fmt yuv422p10le cfhd_x264yuv422p10le.mov
> ffmpeg -i ffv11080p.mov -pix_fmt yuv422p10le ffv1_x264yuv422p10le.mov
> (13), (14)
> Same result (a broken file). Verified with
> ffmpeg -i cfhd_x264yuv422p10le.mov
> ffmpeg -i ffv1_x264yuv422p10le.mov
> Same results as with lavfi above.
> (15), (16)
> That means it’s not a lavfi problem.
>

> So far I’ve trusted that libx264 supports yuv422p10le.
> Verified by ffmpeg -h encoder=libx264
> Supported pixel formats: yuv420p yuvj420p yuv422p yuvj422p yuv444p
> yuvj444p nv12 nv16 nv21 yuv420p10le yuv422p10le yuv444p10le nv20le gray
> gray10le
> That means it’s not an unsupported format.
>

> To confirm it’s an ffmpeg problem I’ve downloaded x264-r3191-4613ac3.exe
> from https://artifacts.videolan.org/x264/release-win64/
> To create a supported file, I created ffmpeg -f lavfi -i
> mandelbrot=s=1920x1080 -t 5 -strict -1 -pix_fmt yuv422p10 ffmpeg_y4m.y4m
> (17)
> Then I converted the output file with x264-r3191-4613ac3.exe to
> yuv422p10le with
> x264-r3191-4613ac3 --profile high422 --output-depth 10 --output-csp i422
> -o x264.mov ffmpeg_y4m.y4m
> (18)
> And the file works and plays back with no problems.
> Stream #0:0: Video: h264 (High 4:2:2), yuv422p10le(progressive),
> 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 1200k tbn
> (19)
>
> What will the next steps be?
>
> Best regards
> Mads Johansen

New description:

 Summary of the bug:
 Compressing to x264 with yuv422p10le triggers unplayable file, but with
 different results depending on resolution.
 As I see it, there is a bug with 1080 and 2160 in vertical resolutions,
 because 1440x1080,1920x1080,2048x1080 and 3840x2160 all has errors.
 The complete logs are below, identified by (n), where n is an integer.

 Result 1: Works perfectly: ffmpeg -f lavfi -i mandelbrot -t 5 -pix_fmt
 yuv422p10le mandelbrot.mov (1)
 ffmpeg -f lavfi -i mandelbrot=s=640x480 -t 5 -pix_fmt yuv422p10le
 mandelbrot640x480.mov
 (ruling out the size parameter)
 Result 2: Errors in playback:
 ffmpeg -f lavfi -i mandelbrot=s=1920x1080 -t 5 -pix_fmt yuv422p10le
 1080p.mov (2)
 ffmpeg -f lavfi -i mandelbrot=s=3840x2160 -t 5 -pix_fmt yuv422p10le
 2160p.mov (3)
 ffmpeg -f lavfi -i mandelbrot=s=2048x1080 -t 5 -pix_fmt yuv422p10le
 2048x1080.mov (20)
 ffmpeg -i 2048x1080.mov (21)

 There are oddities with resolutions though:
 ffmpeg -f lavfi -i mandelbrot=s=1922x1082 -t 5 -pix_fmt yuv422p10le
 1082p.mov  gives a perfectly working file. (4)

 Just to make sure that it’s not my player, I did ffmpeg -i 1080.mov, with
 [h264 @ 00000245b2270500] deblocking_filter_idc 6 out of range
 [h264 @ 00000245b2270500] decode_slice_header error
 [h264 @ 00000245b2270500] no frame!
 See more at  (5)
 Same for 2160p.mov:
 [h264 @ 000002025a890500] non-existing PPS 0 referenced
     Last message repeated 1 times
 [h264 @ 000002025a890500] decode_slice_header error
 [h264 @ 000002025a890500] no frame!
 See (6)

 In the interest of being thorough I have tested with old versions of
 ffmpeg from https://github.com/BtbN/FFmpeg-
 Builds/releases/tag/autobuild-2022-07-31-12-37
 Same results: (7), (8), (9) and (10)
 That means it’s not a recent problem.


 I have also tested if it is lavfi -> codec that is a problem.
 Create the same test file into cineform and ffv1:
 ffmpeg -f lavfi -i mandelbrot=s=1920x1080 -t 5 -c:v cfhd cfhd1080p.mov
 ffmpeg -f lavfi -i mandelbrot=s=1920x1080 -t 5 -c:v ffv1 ffv11080p.mov
 (11), (12)
 Then converting the intermediate file into x264 yuv422p10le:
 ffmpeg -i cfhd1080p.mov -pix_fmt yuv422p10le cfhd_x264yuv422p10le.mov
 ffmpeg -i ffv11080p.mov -pix_fmt yuv422p10le ffv1_x264yuv422p10le.mov
 (13), (14)
 Same result (a broken file). Verified with
 ffmpeg -i cfhd_x264yuv422p10le.mov
 ffmpeg -i ffv1_x264yuv422p10le.mov
 Same results as with lavfi above.
 (15), (16)
 That means it’s not a lavfi problem.


 So far I’ve trusted that libx264 supports yuv422p10le.
 Verified by ffmpeg -h encoder=libx264
 Supported pixel formats: yuv420p yuvj420p yuv422p yuvj422p yuv444p
 yuvj444p nv12 nv16 nv21 yuv420p10le yuv422p10le yuv444p10le nv20le gray
 gray10le
 That means it’s not an unsupported format.


 To confirm it’s an ffmpeg problem I’ve downloaded x264-r3191-4613ac3.exe
 from https://artifacts.videolan.org/x264/release-win64/
 To create a supported file, I created ffmpeg -f lavfi -i
 mandelbrot=s=1920x1080 -t 5 -strict -1 -pix_fmt yuv422p10 ffmpeg_y4m.y4m
 (17)
 Then I converted the output file with x264-r3191-4613ac3.exe to
 yuv422p10le with
 x264-r3191-4613ac3 --profile high422 --output-depth 10 --output-csp i422
 -o x264.mov ffmpeg_y4m.y4m
 (18)
 And the file works and plays back with no problems.
 Stream #0:0: Video: h264 (High 4:2:2), yuv422p10le(progressive), 1920x1080
 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 1200k tbn
 (19)

 Drive folder with 1920x1080.mov and 2048x1080.mov:
 https://drive.google.com/drive/folders/10rvi-
 sYzGhXyqtjW2HSSG2dJoIHmFkdk?usp=sharing

 What will the next steps be?

 Best regards
 Mads Johansen

--
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/11047#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list