Hello
I need to join three MP4 files, where, for some reason, the last two have two audio files:
If I use ffmpeg the standard way, in the output, the last two parts have no audio.Code:Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file1.mp4': Metadata: major_brand : mp42 minor_version : 512 compatible_brands: isomiso2avc1mp41 creation_time : 2036-02-06 06:28:16 encoder : HandBrake 0.10.2 2015060900 Duration: 00:12:52.10, start: 0.000000, bitrate: 525 kb/s Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 720x410 [SAR 8651:8640 DAR 211:120], 390 kb/s, 30 fps, 30 tbr, 90k tbn, 180k tbc (default) Metadata: creation_time : 2036-02-06 06:28:16 handler_name : VideoHandler Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default) Metadata: creation_time : 2036-02-06 06:28:16 handler_name : Stereo Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file2.mp4': Metadata: major_brand : mp42 minor_version : 512 compatible_brands: isomiso2avc1mp41 creation_time : 2036-02-06 06:28:16 encoder : HandBrake 0.10.2 2015060900 Duration: 00:13:50.77, start: 0.000000, bitrate: 750 kb/s Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 720x406 [SAR 406:405 DAR 16:9], 356 kb/s, 30 fps, 30 tbr, 90k tbn, 180k tbc (default) Metadata: creation_time : 2036-02-06 06:28:16 handler_name : VideoHandler Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 160 kb/s (default) Metadata: creation_time : 2036-02-06 06:28:16 handler_name : Stereo Stream #0:2(und): Audio: ac3 (ac-3 / 0x332D6361), 44100 Hz, stereo, fltp, 224 kb/s Metadata: creation_time : 2036-02-06 06:28:16 handler_name : Stereo Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file3.mp4': Metadata: major_brand : mp42 minor_version : 512 compatible_brands: isomiso2avc1mp41 creation_time : 2036-02-06 06:28:16 encoder : HandBrake 0.10.2 2015060900 Duration: 00:07:34.67, start: 0.000000, bitrate: 673 kb/s Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 720x406 [SAR 406:405 DAR 16:9], 279 kb/s, 30 fps, 30 tbr, 90k tbn, 180k tbc (default) Metadata: creation_time : 2036-02-06 06:28:16 handler_name : VideoHandler Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 160 kb/s (default) Metadata: creation_time : 2036-02-06 06:28:16 handler_name : Stereo Stream #0:2(und): Audio: ac3 (ac-3 / 0x332D6361), 44100 Hz, stereo, fltp, 224 kb/s Metadata: creation_time : 2036-02-06 06:28:16 handler_name : Stereo
Does someone know how to 1) check which audio stream actually has audio, and 2) tell ffmpeg to use that audio stream?
Thank you.
+ Reply to Thread
Results 1 to 4 of 4
-
Last edited by yetanotherlogin; 19th Nov 2015 at 05:49.
-
You can use ffplay with the -ast option to specify one or the other of the audio streams to check their content. Then run ffmpeg with the -map option to specify the audio stream you want to output.
-
Thanks much for the infos.
Here's how to play a video by using a specific audio stream:
Code:ffplay -ast 1 -i input.mp4
Code:ffmpeg -i input.mp4 -map 0:v -map 0:a:1 output.mp4
Similar Threads
-
Right way to join two different video files using ffmpeg?
By yetanotherlogin in forum EditingReplies: 15Last Post: 25th Jun 2021, 02:25 -
how to join files mp4?
By h.264 in forum EditingReplies: 10Last Post: 16th May 2014, 06:51 -
Transformation of the transport stream video to MP4 or MKV(without ffmpeg)
By Stears555 in forum Video ConversionReplies: 9Last Post: 1st Apr 2013, 05:51 -
How to record part of live stream m3u8(30min)& save it as mp4 using ffmpeg?
By spiderMan007 in forum Video Streaming DownloadingReplies: 0Last Post: 18th Mar 2013, 17:54 -
Req: free(ish) tool to join mp4 stream chunks grabbed with rtmpdump
By grelga in forum Video ConversionReplies: 0Last Post: 18th Nov 2011, 14:33