mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
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>
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
44
tests/ref/fate/sub-ttml-mp4-dfxp
Normal file
44
tests/ref/fate/sub-ttml-mp4-dfxp
Normal file
@@ -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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
44
tests/ref/fate/sub-ttml-mp4-stpp
Normal file
44
tests/ref/fate/sub-ttml-mp4-stpp
Normal file
@@ -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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user