Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] fftools/ffmpeg_enc: Prevent duplicate A53 Closed Captions at frame rate up-conversion
@ 2023-06-09 13:19 Artem Smorodin
  2023-06-09 15:13 ` Devin Heitmueller
  0 siblings, 1 reply; 7+ messages in thread
From: Artem Smorodin @ 2023-06-09 13:19 UTC (permalink / raw)
  To: ffmpeg-devel

When up-converting frame rate, ffmpeg duplicates frames including side data. This causes duplicated characters in the output. This patch removes A53 side data from duplicated frames.

Signed-off-by: Artem Smorodin <artem.smorodin@telestream.net>
---
 fftools/ffmpeg_enc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c
index 2bf4782a9f..93d18034ca 100644
--- a/fftools/ffmpeg_enc.c
+++ b/fftools/ffmpeg_enc.c
@@ -1104,6 +1104,9 @@ static void do_video_out(OutputFile *of, OutputStream *ost, AVFrame *frame)
         else if (ret < 0)
             exit_program(1);
 
+        //Prevent duplicate Closed Captions at frame rate up-conversion
+        av_frame_remove_side_data(in_picture, AV_FRAME_DATA_A53_CC);
+
         e->next_pts++;
         e->vsync_frame_number++;
     }
-- 
2.25.1

Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business. Providing a safer and more useful place for your human generated data. Specializing in; Security, archiving and compliance. To find out more visit the Mimecast website.
_______________________________________________
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".

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-06-13 14:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-09 13:19 [FFmpeg-devel] [PATCH] fftools/ffmpeg_enc: Prevent duplicate A53 Closed Captions at frame rate up-conversion Artem Smorodin
2023-06-09 15:13 ` Devin Heitmueller
2023-06-09 16:33   ` [FFmpeg-devel] [External Sender] " Artem Smorodin
2023-06-13 14:11     ` Devin Heitmueller
2023-06-11  3:55   ` [FFmpeg-devel] " Anton Khirnov
2023-06-13 14:16     ` Devin Heitmueller
2023-06-13 14:41       ` Gyan Doshi

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