How to copy not recognized streams on conversion with FFmpeg?
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?
video ffmpeg video-conversion metadata
add a comment |
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?
video ffmpeg video-conversion metadata
In theory, the answer is to add-copy_unknown
but those tracks in the output may not be usable.
– Gyan
Jan 4 at 4:35
Thanks, 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
Jan 12 at 10:41
add a comment |
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?
video ffmpeg video-conversion metadata
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?
video ffmpeg video-conversion metadata
video ffmpeg video-conversion metadata
edited Jan 4 at 2:36
JakeGould
31.3k1096138
31.3k1096138
asked Jan 4 at 2:23
LukeLRLukeLR
8031419
8031419
In theory, the answer is to add-copy_unknown
but those tracks in the output may not be usable.
– Gyan
Jan 4 at 4:35
Thanks, 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
Jan 12 at 10:41
add a comment |
In theory, the answer is to add-copy_unknown
but those tracks in the output may not be usable.
– Gyan
Jan 4 at 4:35
Thanks, 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
Jan 12 at 10:41
In theory, the answer is to add
-copy_unknown
but those tracks in the output may not be usable.– Gyan
Jan 4 at 4:35
In theory, the answer is to add
-copy_unknown
but those tracks in the output may not be usable.– Gyan
Jan 4 at 4:35
Thanks, 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
Jan 12 at 10:41
Thanks, 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
Jan 12 at 10:41
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1390357%2fhow-to-copy-not-recognized-streams-on-conversion-with-ffmpeg%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1390357%2fhow-to-copy-not-recognized-streams-on-conversion-with-ffmpeg%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
In theory, the answer is to add
-copy_unknown
but those tracks in the output may not be usable.– Gyan
Jan 4 at 4:35
Thanks, 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
Jan 12 at 10:41