Hi,
Wondering if someone could help an FFMPEG noob with this. I am trying to replace a video stream in a file that includes multiple streams. The output file needs to be identical to Video1.mov (including the data stream), except that the first video stream (stream 0) would be replaced with the video from Video2.mov.
Any help is appreciated!
This is the info for Video1.mov, which has multiple video, audio streams, plus a data stream:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'CLIP0000186_092_ORIGINAL.mov':
Metadata:
major_brand : qt
minor_version : 537331968
compatible_brands: qt CDes
creation_time : 2008-06-06 20:25:39
timecode : 23:10:43;18
Duration: 00:01:01.19, start: 0.000000, bitrate: 492224 kb/s
Stream #0:0(eng): Video: prores (apcn / 0x6E637061), none(bt709), 1920x1080, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 2997 tbn, 2997 tbc (default)
Metadata:
creation_time : 2008-06-06 20:25:39
encoder : Apple ProRes 422
Stream #0:1(eng): Video: prores (apcn / 0x6E637061), yuv422p10le(bt709), 1920x1080, 154190 kb/s, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 2997 tbn, 2997 tbc (default)
Metadata:
creation_time : 2008-06-06 20:25:39
encoder : Apple ProRes 422
Stream #0:2(eng): Video: prores (apcn / 0x6E637061), yuv422p10le(bt709), 1920x1080, 170018 kb/s, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 2997 tbn, 2997 tbc (default)
Metadata:
creation_time : 2008-06-06 20:25:39
encoder : Apple ProRes 422
Stream #0:3(eng): Video: prores (apcn / 0x6E637061), none(bt709), 1920x1080, SAR 1:1 DAR 16:9, 2997 tbr, 2997 tbn, 2997 tbc
Metadata:
creation_time : 2008-06-06 20:25:39
encoder : Apple ProRes 422
Stream #0:4(eng): Video: prores (apcn / 0x6E637061), none(bt709), 1920x1080, SAR 1:1 DAR 16:9, 2997 tbr, 2997 tbn, 2997 tbc
Metadata:
creation_time : 2008-06-06 20:25:39
encoder : Apple ProRes 422
Stream #0:5(eng): Audio: pcm_s32be (lpcm / 0x6D63706C), 48000 Hz, 2 channels, s32, 3072 kb/s (default)
Metadata:
creation_time : 2008-06-06 20:25:39
Stream #0:6(eng): Audio: pcm_s32be (lpcm / 0x6D63706C), 48000 Hz, 2 channels, s32, 3072 kb/s (default)
Metadata:
creation_time : 2008-06-06 20:25:39
Stream #0:7(eng): Audio: pcm_s32be (lpcm / 0x6D63706C), 48000 Hz, 2 channels, s32, 3072 kb/s (default)
Metadata:
creation_time : 2008-06-06 20:25:39
Stream #0:8(eng): Audio: pcm_s32be (lpcm / 0x6D63706C), 48000 Hz, 2 channels, s32, 3072 kb/s
Metadata:
creation_time : 2008-06-06 20:25:39
Stream #0:9(eng): Audio: pcm_s32be (lpcm / 0x6D63706C), 48000 Hz, 2 channels, s32, 3072 kb/s
Metadata:
creation_time : 2008-06-06 20:25:39
Stream #0:10(eng): Data: none (tmcd / 0x64636D74) (default)
Metadata:
creation_time : 2008-06-06 20:25:39
reel_name : Odyssey
timecode : 23:10:43;18
This is the info for Video2.mov, which is just a single video stream:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'V0.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
encoder : Lavf57.19.100
Duration: 00:01:01.20, start: 0.000000, bitrate: 149960 kb/s
Stream #0:0(eng): Video: prores (apcn / 0x6E637061), yuv422p10le, 1920x1080, 149959 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc (default)
Metadata:
handler_name : DataHandler
encoder : Apple ProRes 422
timecode : 00:00:00;00
Stream #0:1(eng): Data: none (tmcd / 0x64636D74)
Metadata:
handler_name : DataHandler
timecode : 00:00:00;00
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 5 of 5
Thread
-
-
Code:
ffmpeg -i input1.mov -i input2.mov -c copy -map 0:2 -map 0:1 output.mov
Depending how ffmpeg displays the streams,adjust the -map selections. -
Thanks aazerty. That produced a playable file, but a there are a couple of issues.
1. There are empty streams in the original file that did not copy (there were 11 streams in the original, and now there are only 7) - not sure if there is any way to fix that.
2. The audio codec changed in the new file.
It was:
Audio: pcm_s32be (lpcm / 0x6D63706C), 48000 Hz, 2 channels, s32, 3072 kb/s (default)
And now it is:
Audio: pcm_s32be (in32 / 0x32336E69), 48000 Hz, stereo, s32, 3072 kb/s (default)
Any ideas?
Here is the the info on the newly created video:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'CLIP0000186_092.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
encoder : Lavf57.19.100
timecode : 23:09:20:06
Duration: 00:01:01.20, start: 0.000000, bitrate: 483275 kb/s
Stream #0:0(eng): Video: prores (apcn / 0x6E637061), yuv422p10le, 1920x1080, 149959 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc (default)
Metadata:
handler_name : DataHandler
encoder : Apple ProRes 422
timecode : 23:09:20:06
Stream #0:1(eng): Video: prores (apcn / 0x6E637061), yuv422p10le, 1920x1080, 154190 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 11988 tbc (default)
Metadata:
handler_name : DataHandler
encoder : Apple ProRes 422
Stream #0:2(eng): Video: prores (apcn / 0x6E637061), yuv422p10le, 1920x1080, 170018 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 11988 tbc (default)
Metadata:
handler_name : DataHandler
encoder : Apple ProRes 422
Stream #0:3(eng): Audio: pcm_s32be (in32 / 0x32336E69), 48000 Hz, stereo, s32, 3072 kb/s (default)
Metadata:
handler_name : DataHandler
Stream #0:4(eng): Audio: pcm_s32be (in32 / 0x32336E69), 48000 Hz, stereo, s32, 3072 kb/s (default)
Metadata:
handler_name : DataHandler
Stream #0:5(eng): Audio: pcm_s32be (in32 / 0x32336E69), 48000 Hz, stereo, s32, 3072 kb/s (default)
Metadata:
handler_name : DataHandler
Stream #0:6(eng): Data: none (tmcd / 0x64636D74) (default)
Metadata:
handler_name : DataHandler
reel_name : Odyssey
timecode : 23:09:20:06 -
Do you know what created that file in the first place ? Is it on purpose that it has 5 video streams ? This doesn't seem standard, perhaps ffmpeg puts a limit to the number of video streams for the MOV container.
Perhaps copying the whole output of the command would allow some ffmpeg wizard to pinpoint the issue.
(By the way this is not the correct forum subsection for such a question, more like "Video conversion".)
Similar Threads
-
grabbing video streams ffmpeg
By lomero in forum Video Streaming DownloadingReplies: 65Last Post: 12th Oct 2019, 08:19 -
Stream image and video in youtube with ffmpeg
By jonaszo in forum ffmpegX general discussionReplies: 1Last Post: 6th Jan 2018, 16:45 -
How i can remove or replace logo in video stream with FFmpeg
By sarjukhe in forum Video Streaming DownloadingReplies: 5Last Post: 26th Mar 2017, 21:28 -
Replacing ALL audio streams of a video in ffmpeg but keep meta?
By kekeinself in forum AudioReplies: 0Last Post: 19th Aug 2015, 02:48 -
FFMPEG copy or download video stream issue!
By kairukun in forum ProgrammingReplies: 1Last Post: 13th May 2015, 16:14