1
I am trying to compress some Videos using FFmpeg, that contain multiple streams, some of them not recognized by FFmpeg:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'GX010686.MP4':
Metadata:
major_brand : mp41
minor_version : 538120216
compatible_brands: mp41
creation_time : 2018-12-10T19:09:25.000000Z
firmware : HD7.01.01.51.00
Duration: 00:08:52.54, start: 0.000000, bitrate: 60136 kb/s
Stream #0:0(eng): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 59886 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 59.94 tbc (default)
Metadata:
creation_time : 2018-12-10T19:09:25.000000Z
handler_name : GoPro H.265
encoder : GoPro H.265 encoder
timecode : 19:27:44:06
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)
Metadata:
creation_time : 2018-12-10T19:09:25.000000Z
handler_name : GoPro AAC
timecode : 19:27:44:06
Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default)
Metadata:
creation_time : 2018-12-10T19:09:25.000000Z
handler_name : GoPro TCD
timecode : 19:27:44:06
Stream #0:3(eng): Data: bin_data (gpmd / 0x646D7067), 35 kb/s (default)
Metadata:
creation_time : 2018-12-10T19:09:25.000000Z
handler_name : GoPro MET
Stream #0:4(eng): Data: none (fdsc / 0x63736466), 13 kb/s (default)
Metadata:
creation_time : 2018-12-10T19:09:25.000000Z
handler_name : GoPro SOS
When I use ffmpeg -i $file -c:v libx265 -crf 23 -c:a libvorbis -q:a 5 $newfilename
, only the audio and the video stream ends up in the new file. So I tried ffmpeg -i $filename -map 0 -c copy -c:v libx265 -crf 23 -c:a libvorbis -q:a 5 $newfilename
, but that gives me the following error:
[mp4 @ 0xf974ce7d500] Could not find tag for codec none in stream #2, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 --
I know that FFmpeg does not understand that additional metadata, but it doesn't need to. How can I just copy the streams with codec none
into the new file?
1In theory, the answer is to add
-copy_unknown
but those tracks in the output may not be usable. – Gyan – 2019-01-04T04:35:52.467Thanks, I'll give that a try, as soon as I find the time :) I don't want those output tracks to be usable, I just want them to be a 1:1 copy of the input tracks, for later use. This is metadata for GPS, accelerometer and stuff during the video. – LukeLR – 2019-01-12T10:41:59.237