[FFmpeg-devel] [PATCH] fate/matroska: Add test for remuxing file with spherical metadata

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Mon Feb 15 23:06:00 EET 2021


Andreas Rheinhardt:
> Also, test modifying colorspace properties and the default_mode
> passthrough which is used here to create a file that has no default
> track at all.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
>  tests/fate/matroska.mak                      |  8 +++
>  tests/ref/fate/matroska-spherical-mono-remux | 66 ++++++++++++++++++++
>  2 files changed, 74 insertions(+)
>  create mode 100644 tests/ref/fate/matroska-spherical-mono-remux
> 
> diff --git a/tests/fate/matroska.mak b/tests/fate/matroska.mak
> index 1d2921194f..e03579def2 100644
> --- a/tests/fate/matroska.mak
> +++ b/tests/fate/matroska.mak
> @@ -57,6 +57,14 @@ FATE_MATROSKA_FFMPEG_FFPROBE-$(call ALLYES, MATROSKA_DEMUXER OGG_DEMUXER  \
>                                 += fate-webm-dash-chapters
>  fate-webm-dash-chapters: CMD = transcode ogg $(TARGET_SAMPLES)/vorbis/vorbis_chapter_extension_demo.ogg webm "-c copy -cluster_time_limit 1500 -dash 1 -dash_track_number 124 -reserve_index_space 400" "-c copy -t 0.5" "" -show_chapters
>  
> +# This test the following features of the Matroska muxer: Writing projection
> +# stream side-data; not setting any track to default if the user requested it;
> +# and modifying and writing colorspace properties.
> +FATE_MATROSKA_FFMPEG_FFPROBE-$(call ALLYES, MATROSKA_DEMUXER MATROSKA_MUXER \
> +                                            H264_DECODER H264_PARSER) \
> +                               += fate-matroska-spherical-mono-remux
> +fate-matroska-spherical-mono-remux: CMD = transcode matroska $(TARGET_SAMPLES)/mkv/spherical.mkv matroska "-map 0 -map 0 -c copy -disposition:0 -default+forced -disposition:1 -default -default_mode passthrough -color_primaries:1 bt709 -color_trc:1 smpte170m -colorspace:1 bt2020c -color_range:1 pc"  "-map 0 -c copy -t 0" "" "-show_entries stream_side_data_list:stream_disposition=default,forced:stream=color_range,color_space,color_primaries,color_transfer"
> +
>  FATE_MATROSKA_FFPROBE-$(call ALLYES, MATROSKA_DEMUXER) += fate-matroska-spherical-mono
>  fate-matroska-spherical-mono: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_entries stream_side_data_list -select_streams v -v 0 $(TARGET_SAMPLES)/mkv/spherical.mkv
>  
> diff --git a/tests/ref/fate/matroska-spherical-mono-remux b/tests/ref/fate/matroska-spherical-mono-remux
> new file mode 100644
> index 0000000000..c72fc692bc
> --- /dev/null
> +++ b/tests/ref/fate/matroska-spherical-mono-remux
> @@ -0,0 +1,66 @@
> +1a3be6691ace86663faeea688e6bb95a *tests/data/fate/matroska-spherical-mono-remux.matroska
> +161562 tests/data/fate/matroska-spherical-mono-remux.matroska
> +#extradata 0:       43, 0x2b0e0d7b
> +#extradata 1:       43, 0x2b0e0d7b
> +#tb 0: 1/1000
> +#media_type 0: video
> +#codec_id 0: h264
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
> +#tb 1: 1/1000
> +#media_type 1: video
> +#codec_id 1: h264
> +#dimensions 1: 1920x1080
> +#sar 1: 0/1
> +0,        -80,          0,       40,    69118, 0x73cb52f0, S=2,       12, 0x00000000,       36, 0x2cf8035c
> +1,        -80,          0,       40,    69118, 0x73cb52f0, S=2,       12, 0x00000000,       36, 0x2cf8035c
> +0,        -40,        160,       40,     1103, 0x082a059f, F=0x0
> +1,        -40,        160,       40,     1103, 0x082a059f, F=0x0
> +[STREAM]
> +color_range=unknown
> +color_space=unknown
> +color_transfer=unknown
> +color_primaries=unknown
> +DISPOSITION:default=0
> +DISPOSITION:forced=1
> +[SIDE_DATA]
> +side_data_type=Stereo 3D
> +type=2D
> +inverted=0
> +[/SIDE_DATA]
> +[SIDE_DATA]
> +side_data_type=Spherical Mapping
> +projection=tiled equirectangular
> +bound_left=148
> +bound_top=73
> +bound_right=147
> +bound_bottom=72
> +yaw=45
> +pitch=30
> +roll=15
> +[/SIDE_DATA]
> +[/STREAM]
> +[STREAM]
> +color_range=pc
> +color_space=bt2020c
> +color_transfer=smpte170m
> +color_primaries=bt709
> +DISPOSITION:default=0
> +DISPOSITION:forced=0
> +[SIDE_DATA]
> +side_data_type=Stereo 3D
> +type=2D
> +inverted=0
> +[/SIDE_DATA]
> +[SIDE_DATA]
> +side_data_type=Spherical Mapping
> +projection=tiled equirectangular
> +bound_left=148
> +bound_top=73
> +bound_right=147
> +bound_bottom=72
> +yaw=45
> +pitch=30
> +roll=15
> +[/SIDE_DATA]
> +[/STREAM]
> 
Totally forgot about this one. It applies with one change: The size of
the output file is 21B larger due to
4ebfc13c338423cf48f1a1266c890422367f7775. Will apply the updated version
later.

- Andreas


More information about the ffmpeg-devel mailing list