Results 1 to 6 of 6
Enjoy an ad free experience by logging in. Not a member yet? Register.
Stitching Videos with Cat Not Working
I was trying to stitch some videos using the same commands I used several months ago but can't seem to do it correctly now.
jun@jun:~$ cat '/home/jun/dwhelper/One1.mp4' '/home/jun/dwhelper/Two2.mp4' '/home/jun/dwhelper/Three3.mp4' '/home/jun/dwhelper/Four4.mp4' '/hom e/jun/dwhelper/Five5.mp4' >> '/home/jun/dwhelper/TOTAL.mp4' jun@jun:~$
I play with totem and just gets the first file.
Linux User #489667
I thought media files had a metadata block at the beginning that described the contents that followed. If you somehow managed to strip the raw data out of two files and stitch them together, you'd still need to recalculate and replace the metadata at the beginning of the file.
Are you sure you did this with cat? You weren't working with raw .wav or video files in an uncompressed format were you?Linux user #126863 - see http://linuxcounter.net/
Are you sure you did this with cat? You weren't working with raw .wav or video files in an uncompressed format were you?
I used cat many times but this was to stitch together DVD vobs that I backed up after ripping and compressing them with handbrake. rds,
Linux User #489667
- Join Date
- Feb 2007
A good analogy is to think of the mp4s as books. If you just take the pages of two books out and stick them in a larger binding, you won't have a useful table of contents (or index). Anyone who attempts to rely heavily on the TOC and/or index to read the book will have issues. To create a new book, you'd have to excise the TOCs and indexes from the original two books and write new ones for your new combined book ("recalculate and replace them"), due to the fact that it now has different page numbers, a different length, etc.
In this case, your video files are not simply raw video data; there is a block of data at the beginning containing information about the file (compression, different media streams in it, etc) that tells video players how to interpret and play back the file. If that block of data is corrupt, you'll likely have trouble playing the file. By combining the files with cat, you've changed the contents of the file and the original metadata block at the beginning of the file is now inaccurate.
Cat alone obviously doesn't recompute this metadata block, so you're best bet is probably finding some utility which is meant to combine mp4 files specifically.
As far as I know, joining two video files with works only for a certain types of files. I have used it with MPG, but i didn't work for me with MP4.
See if Mencoder can do the job:
mencoder -oac copy -ovc copy file1 file2 file3 -o final_movie.mpg