ππ Merge Videos inside a directory into a Single Video file :)
Let's say you wish to merge videos inside Learn Merging Videos
folder like
Learn Merging Videos
βββ 1. Section A
βββ 1. Learn Merging I.mp4
βββ 2. Learn Merging II.mp4
βββ 3. Learn Merging III.mkv
βββ 4. Learn Merging IV.mkv
βββ 5. More.html
βββ 2. Section B
βββ 1. Learn MergingB I.mp4
βββ 2. Learn MergingB II.txt
βββ 3. Learn MergingB III.mp4
βββ 3. Section C
βββ 1. Learn MergingC I.txt
βββ 2. Learn MergingC II.mp4
βββ 3. Learn MergingC III.mp4
βββ 4. Learn MergingC IV.txt
βββ 5. Learn MergingC V.mkv
βββ 6. Learn MergingC VI.mp4
βββ 7. Learn MergingC VII.txt
βββ 8. Learn MergingC VIII.mp4
βββ 9. Learn MergingC IX.mp4
βββ 10. Learn MergingC X.txt
βββ 11. Learn MergingC XI.mp4
βββ 12. Learn MergingC XII.mp4
βββ 4. Section D
βββ 1. Learn MergingD I.mp4
βββ 2. Learn MergingD II.mp4
βββ 3. Learn MergingD III.mp4
and you wish to merge the mp4 or mkv or m4v files together just
-
Star and Clone this Repo into your Computer.
git clone https://github.com/jugshaurya/merge-videos.git
-
Copy/Move the
Learn Merging Videos
folder(you wish to merge) into assets folder. -
Change directory to the local merge-video repo
cd merge-videos
-
Install Dependencies
yarn
-
Execute the below command and wait for something to be printed on the screen. When something prints, outputfile is generated congrats!π or some error occured.π€. Feel free to open a issue or PR.
node index.js
-
Congrats!, you got all the video files merged into output directory as congrats.mp4
-
If you wish to do the same with one more video folder, delete the added folder from the assets folder and congrats.mp4 from output(optional but will
override
the previous generated congrats.mp4) and follow the steps again.
output will here:-
βββ output
βββ congrats.mp4
Please make sure all videos and folders name are marked with <number>.<anything>
i.e. 1.something
2.somethingelse
and so on...
- Let user input the output filename.
- Let user input the output path.
- Write tests via jest.
- Create a command (node jugshaurya clean) to delete files from assets and output folder.
- Add timestamp to the generated congrats_[timestam].mp4 file, so to merge more videos without deleting congrats.mp4 first and update corresponding rule from readme(point before output will be there!).