From patchwork Fri Dec 4 14:46:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jan_Ekstr=C3=B6m?= X-Patchwork-Id: 24340 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 2CB9B449FDE for ; Fri, 4 Dec 2020 16:55:12 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 091CE689C23; Fri, 4 Dec 2020 16:55:12 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D30086880DD for ; Fri, 4 Dec 2020 16:55:05 +0200 (EET) Received: by mail-wr1-f47.google.com with SMTP id z7so5603560wrn.3 for ; Fri, 04 Dec 2020 06:55:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=RE6Q3feRbo1uQHrsEnT3h4UXqL0qtSIHKuOGIe3p6BU=; b=tdh1fotKkpbu3lir4Eq9wsynEInTGlYQJERoFzxfY3OTb6ZtUk5loKS/Dqtl3nF50G kaokGmd1tbpZjGXNla7qHs5X8GAUTVMm+3YL3adzd2xXWz+lGXnPrDisxGNjzE0wroIN S9o9aRWoh22KIeIVG3TvEgdCrilzRNMUt1uBnO8ANGBiuBTmJxe1psGj+rAILO7f1Alr J4RqDRP6ZYOzZ1Y+u3JfUedxy7vcYObqFGUT8+jbqz7zwaYm+8IAhpQk+NpIfnUGDTXZ lymzFPpmsOZfq2c9exnG2i/zj4Cy2xss+Z1/9Av+n0sa778mkBXNBPL6p9zuczf3nOUD efdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=RE6Q3feRbo1uQHrsEnT3h4UXqL0qtSIHKuOGIe3p6BU=; b=X9bFscnJfg2xPsOChr/1Y+8/UQ7ltZ+dNc3prbVh0F7+ecCaNslrZ1nPs658SGVSKI sWqRd10QENtOKZWvbqxcs6P4G08I8Y+i7e702IOiznUSAfGc+wEj3BFZA8i7WwmLrCpT kmm0bfGA7zrxyPYrshwEXuZJbljVnYXmpQ/U/hpsRSuVD1ZH969UlpXPfGcCKKz5L5h0 QIKE8aLeC621xm5CEifTwyMkUANaifkyrdVbXFa9iBgS7FkRz/cizmd7J2z9N5Quj+NB /uZSiD0xMICX+PNTbTR/AJt49nVK4hZveHEFTu9x4RUErg3m8Yw5wRM0KVErHCg8V3/D 5Pjw== X-Gm-Message-State: AOAM533zKJhAJ77f0X+5Aieb3KuSYu7Dz4V8buYPXjnGej8OdVYJHruK MVBx5PG5YJ9nnZQzdB6gmkQRxfwBRAmDeg== X-Google-Smtp-Source: ABdhPJzS4o3TZHf4DWzMtPjslZ1FIw6QaiODJbRczeZgKfHNUOvyn6qXhy608W6xS3ZgsQKb8vMVLw== X-Received: by 2002:ac2:442d:: with SMTP id w13mr3403212lfl.336.1607093206886; Fri, 04 Dec 2020 06:46:46 -0800 (PST) Received: from localhost.localdomain (91-159-194-103.elisa-laajakaista.fi. [91.159.194.103]) by smtp.gmail.com with ESMTPSA id t2sm1750308lfd.59.2020.12.04.06.46.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2020 06:46:45 -0800 (PST) From: =?utf-8?q?Jan_Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Fri, 4 Dec 2020 16:46:40 +0200 Message-Id: <20201204144643.73279-1-jeebjp@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 0/3] Initial implementation of TTML encoding/muxing X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" I've intentionally kept this initial version simple (no styling etc) to focus on the basics. As this goes through review, additional features can be added (I had initial PoC for styling implemented some time around previous VDD), and there is another patch set in my queue which would then add support for muxing TTML into MP4. The basic issue with this specific patch set is that implementing subtitle encoding/muxing as it is implemented with all other subtitle formats now mis-matches the behavior of how the TTML demuxing in various formats currently works in FFmpeg: * The demuxers return AVPackets with full documents (as most containers' packets just contain a full document). * Subtitle encoding returns single paragraph's content based on the AVSubtitle rectangles fed to it. Thus codec copy remuxing from, say, MXF would not work as the demuxer pushes out full documents, and the TTML muxer expects paragraphs' contents. There are multiple ways of handling this, such as: * Some sort of check based on ?!?! ** adding flags into extradata ** string comparison of packet's contents against "