Useful FFMPEG Command Lines for Youtube.

Is there a working ffmpeg command to merge all videos in a directory, where the videos have different resoltuons. I have tried all solutions on stackoverflow but none works.
 
Is there a working ffmpeg command to merge all videos in a directory, where the videos have different resoltuons. I have tried all solutions on stackoverflow but none works.

Code:
ffmpeg -f concat -safe 0 -i <(for f in /path/to/directory/*.mp4; do echo "file '$f'"; done) -c copy /path/to/output/fusion.mp4

Make sure to replace "/path/to/directory" with the path to the directory containing your videos, and "/path/to/output/fusion.mp4" with the desired output path and filename for the merged video. This command uses the "-f concat" option to specify the concatenation format, "-safe 0" to allow the use of dynamically generated file names, and "-c copy" to copy the video and audio data streams without re-encoding, preserving the original quality. Note that this command assumes that all the videos in the directory have the same resolution and video/audio parameters. If that's not the case, you'll need to adjust the command or preprocess the videos to align them on these parameters before merging them.
 
That's pretty good. Thanks for that. However, I'm wondering if we can do cut 10 seconds from the beginning of the video (00:00-00:10) and cut 30 seconds (00:10-00:40) and then apply this to rest of the video. End of this task, we must get many 10 and 30 seconds clips. It would be awesome if there's such a thing.
 
thanks for code mate ,, I try ,, I am very exited using ffmpeg now .. because simple command to generate video or audio.
 
Sorry but y'all are insane to be downloading random executables on a forum like this. Just find public builds or compile from source. But whatever you do don't nonchalantly run executables from the web.
 
Great post, really helped me a lot. Wishing you the best of luck. Have a nice day!
 
Back
Top