Welcome to the Linux Foundation Forum!

bash script to join files

Hi,

I am creating a bash script which search video files in a folder and join video files which are splitted into multiple parts.

for e.g.

shark.cd1.avi

shark.cd2.avi

catroon.cd1.avi

cartoon.cd2.avi

cartoon.cd3.avi

so as to make a single file for e.g. shark.avi and cartoon.avi

Please tell me some tips and suggestions, how to do it. i.e. what way i can find and join the files accordingly ordered by ther cd number.

Thanks

usmangt

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Comments

  • Posts: 647
    It seems like you were asking us to do the script... ;)

    I could do the script, the only problem is that I do not know how to join the video files... I guess ffmpeg could help in there? I'll try this afternoon

    Regards
  • Posts: 2,177
    That should be wasy with your experience, setup a bash script which accepts a keyword, then greps the current working directory for all files with that word in the name, orders then using seq and adds their names to the syntax for ffmpeg to join them.
  • Posts: 2
    Here's two commands you could try working into your script.
    1. mencoder -oac copy -ovc copy part1.avi part2.avi part3.avi -o complete.avi

    OR
    1. avimerge -o complete.avi -i part1.avi part2.avi part3.avi

    Hope one of these helps you out, :-)
  • Hello Guys I was trying to back-up a the .vob files were all in different information with the same computer file name.I had to rename them sequentially then shift them to another directory. Is there a better way using the console?Any idea then please share!!
  • Posts: 647
    markspend wrote:
    Hello Guys I was trying to back-up a the .vob files were all in different information with the same computer file name.I had to rename them sequentially then shift them to another directory. Is there a better way using the console?Any idea then please share!!

    That makes no sense to me, at all

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training