mp4-merge icon indicating copy to clipboard operation
mp4-merge copied to clipboard

Merging Files Listed Order

Open ChuckIn85085 opened this issue 10 months ago • 6 comments

Hello.

When merging files together, does it matter what order they are in, or is the software smart enough to read the metadata and know which file follows which?

As you know, GoPro's write such as GX01001.mp4 GX02001.mp4 GX03001.mp4 GX01002.mp4 GX01003.mp4

However, if you do a dir /b > dir.txt to purge the file listings together, they come out in numerical order instead of the order recorded. So would below be smart enough to write correctly?

mp4_merge-windows64.exe GX01001.mp4 GX01002.mp4 GX01003.mp4 GX02001.mp4 GX03001.mp4 --outfile output.mp4

There doesn't seem to be any kind of --help or --? verbose information so I am guessing there is no way to do like a mp4_merge-windows64.exe .\* --out Finished.mp4 command, is there?

Thanks for the awesome program!

ChuckIn85085 avatar Mar 18 '25 00:03 ChuckIn85085

you have to provide them in the correct order.

In case of GoPro, Gyroflow actually recognizes the GoPro sequence naming, but mp4-merge is very basic with no intention of developing advanced features like these

AdrianEddy avatar Mar 18 '25 00:03 AdrianEddy

you have to provide them in the correct order.

In case of GoPro, Gyroflow actually recognizes the GoPro sequence naming, but mp4-merge is very basic with no intention of developing advanced features like these

I had a feeling you were going to say that - UGH! I didn't even think about this until after I did the 3rd of 4th merge and no longer have the originals.

I have no need to advanced features or anything of the sort. I have the 12GB file size enabled and works perfectly. I am also just happy and pleased I came across this program. No other programs I could find anywhere saved the MetaData once merging.

ChuckIn85085 avatar Mar 18 '25 00:03 ChuckIn85085

The code is open source and I'm open to accepting a PR with such detection, but I don't have a need (and time) to work on it myself

AdrianEddy avatar Mar 18 '25 00:03 AdrianEddy

The code is open source and I'm open to accepting a PR with such detection, but I don't have a need (and time) to work on it myself

I will keep that in mind. I am not up on my coding like I used to be (Turbo Pascal, Turbo C, etc.), but will toss the idea around to some folks who I know are more than likely great with coding and see what they say.

Thanks again!

ChuckIn85085 avatar Mar 18 '25 00:03 ChuckIn85085

I have a bash script which moves/renames GoPro files into a more meaningful naming structure. That would make it easier for you generate the list of files to pass to mp4-merge in the right order. Furthermore it wouldn't be too hard to modify it to handle the merging directly if you wanted to.

`#!/bin/bash

sourcedir="/Volumes/LUMIX/DCIM/100GOPRO" targetdir="/Users/username/Movies/GoPro"

if [ ! -d "${targetdir}" ]; then echo "${targetdir} is not an existing directory." exit 1 fi

if [ ! -d "${sourcedir}" ]; then echo "${sourcedir} is not an existing directory." exit 1 fi

IFS=' ' findpattern='G[HXPO][0-9P][0-9R].*.MP4'

for filename in $(ls "${sourcedir}" | grep -e "${findpattern}") do mv -v "${sourcedir}/${filename}" "${targetdir}/${filename:0:2}${filename:4:4}_${filename:2:2}.mp4" done rm ${sourcedir}/.THM ${sourcedir}/.LRV `

willdashwood avatar Mar 18 '25 09:03 willdashwood

I have a bash script which moves/renames GoPro files into a more meaningful naming structure. That would make it easier for you generate the list of files to pass to mp4-merge in the right order. Furthermore it wouldn't be too hard to modify it to handle the merging directly if you wanted to.

`#!/bin/bash

sourcedir="/Volumes/LUMIX/DCIM/100GOPRO" targetdir="/Users/username/Movies/GoPro"

if [ ! -d "${targetdir}" ]; then echo "${targetdir} is not an existing directory." exit 1 fi

if [ ! -d "${sourcedir}" ]; then echo "${sourcedir} is not an existing directory." exit 1 fi

IFS=' ' findpattern='G[HXPO][0-9P][0-9R].*.MP4'

for filename in ( l s " {sourcedir}" | grep -e "${findpattern}") do mv -v "${sourcedir}/${filename}" "${targetdir}/${filename:0:2}${filename:4:4}${filename:2:2}.mp4" done rm ${sourcedir}/.THM ${sourcedir}/_.LRV `

If this would translate to a Windows environment, this would be absolutely awesome!!!

ChuckIn85085 avatar Mar 18 '25 14:03 ChuckIn85085