Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] avformat/vpcc: fix vpcC generation for RTMP
Date: Sat, 2 Sep 2023 14:09:10 -0300
Message-ID: <b2e1bea7-58b6-d972-f9db-0debf04b1976@gmail.com> (raw)
In-Reply-To: <b07e07ba-90af-dd23-a80f-53e1b042a75a@gmail.com>

On 9/2/2023 2:02 PM, Alessandro Ros wrote:
> In order to send VP9 tracks with RTMP, the enhanced RTMP specification
> tells that VPCodecConfigurationRecord, a.k.a. vpcC ISO-BMFF box, must
> be inserted into a metadata message. However, the function responsible
> for generating vpcCs currently returns invalid boxes, that are lacking
> the Version and Flag fields, inherited from FullBox. For some reason,
> both flags were being added manually in movenc. This patch fixes the
> issue.
> 
> Signed-off-by: Alessandro Ros <aler9.dev@gmail.com>
> ---
>   libavformat/movenc.c | 3 ---
>   libavformat/vpcc.c   | 2 ++
>   2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> index 7ef6cef46a..696ae5a6c9 100644
> --- a/libavformat/movenc.c
> +++ b/libavformat/movenc.c
> @@ -1441,10 +1441,7 @@ static int mov_write_vpcc_tag(AVFormatContext *s, 
> AVIOContext *pb, MOVTrack *tra
>        avio_wb32(pb, 0);
>       ffio_wfourcc(pb, "vpcC");
> -    avio_w8(pb, 1); /* version */
> -    avio_wb24(pb, 0); /* flags */
>       ff_isom_write_vpcc(s, pb, track->vos_data, track->vos_len, 
> track->par);
> -
>       return update_size(pb, pos);
>   }
> 
> diff --git a/libavformat/vpcc.c b/libavformat/vpcc.c
> index ea66959abf..256407dd6d 100644
> --- a/libavformat/vpcc.c
> +++ b/libavformat/vpcc.c
> @@ -208,6 +208,8 @@ int ff_isom_write_vpcc(AVFormatContext *s, 
> AVIOContext *pb,
>       if (ret < 0)
>           return ret;
> 
> +    avio_w8(pb, 1); /* version */
> +    avio_wb24(pb, 0); /* flags */
>       avio_w8(pb, vpcc.profile);
>       avio_w8(pb, vpcc.level);
>       avio_w8(pb, (vpcc.bitdepth << 4) | (vpcc.chroma_subsampling << 1) 
> | vpcc.full_range_flag);

This will change the output of the flv muxer. It might be for the 
better, since now both these values will be added to it, but it would be 
best to know that first.
_______________________________________________
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".

  reply	other threads:[~2023-09-02 17:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-02 17:02 Alessandro Ros
2023-09-02 17:09 ` James Almer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-09-02 16:59 Alessandro Ros

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=b2e1bea7-58b6-d972-f9db-0debf04b1976@gmail.com \
    --to=jamrial@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