Mp4 unofficial extension allows Stereo3D and Spherical Mapping data in header if users explicitly set "-strict unofficial" or values less than "-1".
Currently side_data like stereo3D and spherical data in mp4 would be dropped by default in a transcoding procedure even if user uses streamcopy to get the same bitstreams. Spatial data missing in containers seems to cause troubles for the players like VLC while detecting the projection type for 360 video. Set the default value of "strict" to "unofficial" for mp4. Signed-off-by: Linjie Fu <linjie.justin...@gmail.com> --- I would prefer to add the default value for format-specific options in something like AVCodecDefault, however didn't find one. libavformat/mux.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavformat/mux.c b/libavformat/mux.c index 44d5e5d1c0..ffb9109a6f 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -237,6 +237,11 @@ static int init_muxer(AVFormatContext *s, AVDictionary **options) const AVCodecDescriptor *desc; AVDictionaryEntry *e; + if (s->oformat) { + if (!strcmp("mp4", s->oformat->name)) + s->strict_std_compliance = FF_COMPLIANCE_UNOFFICIAL; + } + if (options) av_dict_copy(&tmp, *options, 0); -- 2.28.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".