From: Evgeny Pavlov <lucenticus@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 10 bit support v5 1/3] avcodec/amfenc: Fixes the color information in the output.
Date: Tue, 28 Nov 2023 15:39:38 +0100
Message-ID: <CADnG-DQwPNtuidQ=GFpveNmhoCuqVR1dEg6yA7FApqhAgTV_Nw@mail.gmail.com> (raw)
In-Reply-To: <96fc6bbf-7b6a-4306-8e52-63905893b6ce@jkqxz.net>
On Mon, Nov 27, 2023 at 8:47 PM Mark Thompson <sw@jkqxz.net> wrote:
> There is something very wrong with how the header information is working
> here.
>
> With this series applied, I ran:
>
> ffmpeg_g.exe -report -y -i in.mp4 -an -c:v hevc_amf -bsf:v trace_headers
> -frames:v 1 out.mp4
>
> My input file is:
>
> Stream #0:0[0x1](und), 60, 1/60000: Video: hevc (Main 10) (hvc1 /
> 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1
> DAR 16:9], 74462 kb/s, 59.94 fps, 59.94 tbr, 60k tbn (default)
>
> [trace_headers @ 0000023184c753c0] Extradata
> [trace_headers @ 0000023184c753c0] Sequence Parameter Set
> ...
> [trace_headers @ 0000023184c753c0] 222
> vui_parameters_present_flag 0 = 0
>
> So no colour information at all in the headers, and the output file indeed
> says:
>
> Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 / 0x31766568),
> yuv420p10le(tv, progressive), 3840x2160, 977 kb/s, SAR 1:1 DAR 16:9, 59.94
> fps, 59.94 tbr, 60k tbn (default)
>
> However! Reading further:
>
> [trace_headers @ 0000023184c753c0] Packet: 2039 bytes, key frame, pts 0,
> dts 0.
> ...
> [trace_headers @ 0000023184c753c0] Sequence Parameter Set
> ...
> [trace_headers @ 0000023184c753c0] 222
> vui_parameters_present_flag 1 = 1
> [trace_headers @ 0000023184c753c0] 223
> aspect_ratio_info_present_flag 1 = 1
> [trace_headers @ 0000023184c753c0] 224 aspect_ratio_idc
> 11111111 = 255
> [trace_headers @ 0000023184c753c0] 232 sar_width
> 0000000000000001 = 1
> [trace_headers @ 0000023184c753c0] 248 sar_height
> 0000000000000001 = 1
> [trace_headers @ 0000023184c753c0] 264 overscan_info_present_flag
> 0 = 0
> [trace_headers @ 0000023184c753c0] 265
> video_signal_type_present_flag 1 = 1
> [trace_headers @ 0000023184c753c0] 266 video_format
> 101 = 5
> [trace_headers @ 0000023184c753c0] 269 video_full_range_flag
> 0 = 0
> [trace_headers @ 0000023184c753c0] 270
> colour_description_present_flag 1 = 1
> [trace_headers @ 0000023184c753c0] 271 colour_primaries
> 00001001 = 9
> [trace_headers @ 0000023184c753c0] 279 transfer_characteristics
> 00010000 = 16
> [trace_headers @ 0000023184c753c0] 287 matrix_coefficients
> 00001001 = 9
> [trace_headers @ 0000023184c753c0] 295
> chroma_loc_info_present_flag 0 = 0
> [trace_headers @ 0000023184c753c0] 296
> neutral_chroma_indication_flag 0 = 0
> [trace_headers @ 0000023184c753c0] 297 field_seq_flag
> 0 = 0
> [trace_headers @ 0000023184c753c0] 298
> frame_field_info_present_flag 0 = 0
> [trace_headers @ 0000023184c753c0] 299
> default_display_window_flag 0 = 0
> [trace_headers @ 0000023184c753c0] 300
> vui_timing_info_present_flag 1 = 1
> [trace_headers @ 0000023184c753c0] 301 vui_num_units_in_tick
> 00000000000000000000001111101001 = 1001
> [trace_headers @ 0000023184c753c0] 333 vui_time_scale
> 00000000000000001110101001100000 = 60000
> [trace_headers @ 0000023184c753c0] 365
> vui_poc_proportional_to_timing_flag 1 = 1
> [trace_headers @ 0000023184c753c0] 366
> vui_num_ticks_poc_diff_one_minus1 1 = 0
>
> Comparing the to the original, the chroma sample location (collocated
> top-left in the original, so the implied default is wrong) has been lost
> but the colours are otherwise correct in the extraneous headers embedded in
> the first packet.
>
> So the colour information has kindof been passed through, except not in
> the place in the headers which matters so it is mostly useless. (I guess
> it maybe works for raw streams with no headers?)
>
> I think you need to fix whatever is making the headers not match the
> actual stream content (which creates invalid files, mp4 and similar
> containers with global headers need them to match).
>
> Thanks,
>
> - Mark
>
Could you test this issue with the latest AMD 23.11.1 driver? This issue
looks similar to issue #9195 in OBS Studio
https://github.com/obsproject/obs-studio/issues/9195. It was fixed in the
latest AMD driver.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2023-11-28 14:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-31 18:57 Evgeny Pavlov
2023-10-31 18:57 ` [FFmpeg-devel] [PATCH 10 bit support v5 2/3] avcodec/amfenc: HDR metadata Evgeny Pavlov
2023-10-31 18:57 ` [FFmpeg-devel] [PATCH 10bit support v5 3/3] avcodec/amfenc: add 10 bit encoding in av1_amf Evgeny Pavlov
2023-11-13 21:48 ` [FFmpeg-devel] [PATCH 10 bit support v5 1/3] avcodec/amfenc: Fixes the color information in the output Evgeny Pavlov
2023-11-27 19:47 ` Mark Thompson
2023-11-28 14:39 ` Evgeny Pavlov [this message]
2023-11-28 19:13 ` Mark Thompson
2023-11-29 10:57 ` Evgeny Pavlov
2023-12-08 9:31 ` Evgeny Pavlov
2023-12-11 21:21 ` Mark Thompson
2023-12-15 12:07 ` Evgeny Pavlov
-- strict thread matches above, loose matches on Subject: below --
2023-10-09 9:52 [FFmpeg-devel] [PATCH avcodec/amfenc: 10 bit support, v4, " Evgeny Pavlov
2023-10-31 17:42 ` [FFmpeg-devel] [PATCH 10 bit support v5 " Evgeny Pavlov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADnG-DQwPNtuidQ=GFpveNmhoCuqVR1dEg6yA7FApqhAgTV_Nw@mail.gmail.com' \
--to=lucenticus@gmail.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git