diff options
author | Jan Ekström <jan.ekstrom@24i.com> | 2021-02-15 16:21:13 +0200 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2021-08-25 09:26:46 +0300 |
commit | e41bd075dd56f20f4eca61790bda5bf88c433bcb (patch) | |
tree | cdc0bc1a7fe2c863de577ff583133bedc5a42409 /tests | |
parent | 460beb948ceddeb86bd2b3b17335176adcaa7223 (diff) | |
download | ffmpeg-e41bd075dd56f20f4eca61790bda5bf88c433bcb.tar.gz |
avformat/movenc: add support for TTML muxing
Includes basic support for both the ISMV ('dfxp') and MP4 ('stpp')
methods. This initial version also foregoes fragmentation support
in case the built-in sample squashing is to be utilized, as this
eases the initial review.
Additionally, add basic tests for both muxing modes in MP4.
Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fate/subtitles.mak | 4 | ||||
-rw-r--r-- | tests/ref/fate/sub-ttml-mp4-dfxp | 44 | ||||
-rw-r--r-- | tests/ref/fate/sub-ttml-mp4-stpp | 44 |
3 files changed, 92 insertions, 0 deletions
diff --git a/tests/fate/subtitles.mak b/tests/fate/subtitles.mak index ee65afe35b..880109f201 100644 --- a/tests/fate/subtitles.mak +++ b/tests/fate/subtitles.mak @@ -109,6 +109,10 @@ fate-sub-dvb: CMD = framecrc -i $(TARGET_SAMPLES)/sub/dvbsubtest_filter.ts -map FATE_SUBTITLES-$(call ALLYES, FILE_PROTOCOL PIPE_PROTOCOL SRT_DEMUXER SUBRIP_DECODER TTML_ENCODER TTML_MUXER) += fate-sub-ttmlenc fate-sub-ttmlenc: CMD = fmtstdout ttml -i $(TARGET_SAMPLES)/sub/SubRip_capability_tester.srt +FATE_SUBTITLES-$(call ALLYES, FILE_PROTOCOL SRT_DEMUXER MOV_DEMUXER SUBRIP_DECODER TTML_ENCODER TTML_MUXER MOV_MUXER) += fate-sub-ttml-mp4-stpp fate-sub-ttml-mp4-dfxp +fate-sub-ttml-mp4-stpp: CMD = transcode srt $(TARGET_SAMPLES)/sub/SubRip_capability_tester.srt mp4 "-map 0:s -c:s ttml -time_base:s 1:1000" "-map 0 -c copy" "" "-of json -show_entries packet:stream=index,codec_type,codec_tag_string,codec_tag,codec_name,time_base,start_time,duration_ts,duration,nb_frames,nb_read_packets:stream_tags" +fate-sub-ttml-mp4-dfxp: CMD = transcode srt $(TARGET_SAMPLES)/sub/SubRip_capability_tester.srt mp4 "-map 0:s -c:s ttml -time_base:s 1:1000 -tag:s dfxp -strict unofficial" "-map 0 -c copy" "" "-of json -show_entries packet:stream=index,codec_type,codec_tag_string,codec_tag,codec_name,time_base,start_time,duration_ts,duration,nb_frames,nb_read_packets:stream_tags" + FATE_SUBTITLES-$(call ENCMUX, ASS, ASS) += $(FATE_SUBTITLES_ASS-yes) FATE_SUBTITLES += $(FATE_SUBTITLES-yes) diff --git a/tests/ref/fate/sub-ttml-mp4-dfxp b/tests/ref/fate/sub-ttml-mp4-dfxp new file mode 100644 index 0000000000..0172e5b7e6 --- /dev/null +++ b/tests/ref/fate/sub-ttml-mp4-dfxp @@ -0,0 +1,44 @@ +2e7e01c821c111466e7a2844826b7f6d *tests/data/fate/sub-ttml-mp4-dfxp.mp4 +8519 tests/data/fate/sub-ttml-mp4-dfxp.mp4 +#tb 0: 1/1000 +#media_type 0: data +#codec_id 0: none +0, 0, 0, 68500, 7866, 0x456c36b7 +{ + "packets": [ + { + "codec_type": "data", + "stream_index": 0, + "pts": 0, + "pts_time": "0.000000", + "dts": 0, + "dts_time": "0.000000", + "duration": 68500, + "duration_time": "68.500000", + "size": "7866", + "pos": "44", + "flags": "K_" + } + ], + "programs": [ + + ], + "streams": [ + { + "index": 0, + "codec_type": "data", + "codec_tag_string": "dfxp", + "codec_tag": "0x70786664", + "time_base": "1/1000", + "start_time": "0.000000", + "duration_ts": 68500, + "duration": "68.500000", + "nb_frames": "1", + "nb_read_packets": "1", + "tags": { + "language": "und", + "handler_name": "SubtitleHandler" + } + } + ] +} diff --git a/tests/ref/fate/sub-ttml-mp4-stpp b/tests/ref/fate/sub-ttml-mp4-stpp new file mode 100644 index 0000000000..a5165b568d --- /dev/null +++ b/tests/ref/fate/sub-ttml-mp4-stpp @@ -0,0 +1,44 @@ +cbd2c7ff864a663b0d893deac5a0caec *tests/data/fate/sub-ttml-mp4-stpp.mp4 +8547 tests/data/fate/sub-ttml-mp4-stpp.mp4 +#tb 0: 1/1000 +#media_type 0: data +#codec_id 0: none +0, 0, 0, 68500, 7866, 0x456c36b7 +{ + "packets": [ + { + "codec_type": "data", + "stream_index": 0, + "pts": 0, + "pts_time": "0.000000", + "dts": 0, + "dts_time": "0.000000", + "duration": 68500, + "duration_time": "68.500000", + "size": "7866", + "pos": "44", + "flags": "K_" + } + ], + "programs": [ + + ], + "streams": [ + { + "index": 0, + "codec_type": "data", + "codec_tag_string": "stpp", + "codec_tag": "0x70707473", + "time_base": "1/1000", + "start_time": "0.000000", + "duration_ts": 68500, + "duration": "68.500000", + "nb_frames": "1", + "nb_read_packets": "1", + "tags": { + "language": "und", + "handler_name": "SubtitleHandler" + } + } + ] +} |