How to concatenate 360° videos with FFmpeg?

2

I have some video mp4 files that I need to concatenate. I'm working with FFmpeg (self-built version N-93863-g58d167b) under Ubuntu Linux 18.04. I found a lot of information about this, but nothing that works with 360° video format. What I have tried so far:

ffmpeg -i file1.mp4 -i file2.mp4 -f concat -c copy outfile.mp4

that complains that Line 4: unknown keyword 'ftypisom' file1.mp4: Invalid data found when processing input

ffmpeg -i file1.mp4 -i file2.mp4 -filter_complex "[0:v] [0:a] [1:v] [1:a] concat=n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" outfile.mp4 (as found here)

but, because it re-encodes the file, it loses the 360° format and makes it just flat.

I tried with the -strict unofficial parameter, with the -fflags keepside, -map_metadata 0 (as found here) and with several other combination of -c:v (copy, h264, h265, ...), as well as with .mkv as file type, all to no avail.

What am I doing wrong?

Andyc

Posted 2019-05-17T14:46:01.743

Reputation: 21

Can't test but it should be ffmpeg -f concat -i list.txt -c copy -strict -1 outfile.mp4 where list.txt is in the form shown at https://trac.ffmpeg.org/wiki/Concatenate#demuxer

– Gyan – 2019-05-17T16:31:58.767

@Gyan That didn't work either: it doesn't give any error (but a lot of warnings), but it flattens the video out again and introduces some other codification artifacts. – Andyc – 2019-05-18T06:39:12.220

No answers