How to combine mp4 files split by the camera?

dalemccl wrote on 7/11/2015, 12:07 AM
My new Panasonic LX100 camera splits 4k mp4 files at 4GB and produces multiple files from continuous shooting. I got two mp4 files from a 12 minute continuous shoot today. Putting the two files on the Vegas Pro 13 timeline results in a very brief audio glitch as it moves from the 1st to the 2nd event/clip.

I had this problem with AVCHD m2ts files from my Sony camcorder, but could combine files with tsmuxer, or the DOS copy command, and the resulting combined file worked fine in Vegas. These utilities don't seem to work correctly with mp4.

How is anyone here handling this for mp4 files from Panasonic cameras?

Comments

relaxvideo wrote on 7/11/2015, 1:24 AM
avidemux? with file/append
malowz wrote on 7/11/2015, 2:13 AM
the files are "binary cut" or they are independent video files?

if they are "hard-cut", the "copy /b" should work. if not, just putting them in sequence should work.

maybe the gap between files is a vegas decoder thing, and not the files itself.
PeterDuke wrote on 7/11/2015, 7:17 AM
This question came up once before and apparently they were not simple cuts as with AVCHD (or VOB) files. This could be verified by dragging the chunks to the Vegas timeline and verifying that no audio or video data is lost at the join.
ECB wrote on 7/11/2015, 7:57 AM
Have you tried using Device Explorer (view\window\Device Explorer) In Vegas to import the clips?

ed
set wrote on 7/11/2015, 8:11 AM
Is there any included software came with LX100 camera? if there is any, it's best to start download or process camera source files with any included software... (like PlayMemories for Sony cameras).

Set
flyingski wrote on 7/11/2015, 11:15 AM
I had a similar problem with a Canon camcorder and AVCHD files. I tried all the various joining methods without success. Turns out the camera actually drops a frame and sometimes two at the file break. I verified this by comparing the audio track with one made by a Zoom recorder. So, you may want to verify that it's not a camera problem before driving yourself nuts with software solutions.
relaxvideo wrote on 7/11/2015, 1:00 PM
If it's record in MTS format, you can use the free mtsmerger (google).
It also can work with 3D MTS file from my Sony camera without any frame drop.
dalemccl wrote on 7/11/2015, 2:28 PM
Thanks for all the suggestions. At the suggestion of someone in a Panasonic camera forum, I tried the freeware program "My MP4box" and found that it works. It joins without rendering and the combined file doesn't have the audio glitch at the join point. (I am always reluctant to install freeware because of possible malware, browser home page hijacking, etc. But it seemed to install with none of that, and it works for the intended purpose.)

In answer to some questions/suggestions in the replies:

>To "relaxvideo": regarding avidemux: I will try it. Regarding mtsmerger. Not mts files; they are mp4 with an internal codec of AVC. I have used the program tsmuxer to join my Sony camcorder mts files, but with these mp4 files tsmuxer's output doesn't play in Vegas and can't be dragged to the timeline. I'm guessing the same thing would happen with mtsmerger, but I will try it anyway.

>To "ECB": when I try Vegas Device Explorer, it says no device is attached. It must want the camera attached? Or the camera's SD card in a card reader? I have the files on a hard drive.

>To "set": Surprisingly, the software that came with the Panasonic camera doesn't include anything to join the files. It only came with a RAW processor for the photos (SilkyPix) and some trial ware. There doesn't seem to be a PlayMemories equivalent.
wwaag wrote on 7/11/2015, 3:52 PM
@dalemcci

Surprisingly, the software that came with the Panasonic camera doesn't include anything to join the files. It only came with a RAW processor for the photos (SilkyPix) and some trial ware. There doesn't seem to be a PlayMemories equivalent.

There should be. It's called PhotoFunStudio (don't laugh). It will change your MTS files to m2ts and rename them with the datecode which is pretty convenient. However, it does not join the resulting m2ts files together into a single file, unlike the Sony software.

wwaag
JohnnyRoy wrote on 7/11/2015, 6:59 PM
>To "ECB": when I try Vegas Device Explorer, it says no device is attached. It must want the camera attached? Or the camera's SD card in a card reader? I have the files on a hard drive.
You are causing this problem yourself and you don't need any additional software to fix it. You just need to stop copying individual files off of your camera cards.

If you want to save a camera card onto your hard drive you should copy the entire contents of the card with all of it's folder structures. For example if you are shooting AVCHD you want to copy the entire /AVCHD folder rom the card. You should NEVER reach into the folders and copy out individual files any more than you should remove the tape from a VHS cassette! The camera card folder structure is the container for your video. It contains metadata about your video. You want to keep all of it. Then you can use the Device Explorer to point to the root folder of the card and it will use the metadata to stitch your files back together again.

~jr
PeterDuke wrote on 7/11/2015, 9:16 PM
As I said in the fourth post to this thread, camera MP4 files are apparently not chopped in the same way as AVCHD files. It may be possible to drag the parts of an MP4 scene to the timeline without introducing glitches at the joins. I would be nice if someone could confirm this or not.

So far as metadata is concerned, the useful stuff is likely to be in the video file itself. For AVCHD files from my camera, this is either in the video stream or the PGS stream or both. (Shooting time and date, f stop, shutter speed, GPS data, etc.).

When I transferred a scene from my Sony camera using the Sony PMB utility, it joined the parts into a single file and renamed the file to the shooting date and time. The contents of this file were identical to that of a file created by copying the bits directly to the computer and concatenating with the COPY /B command (checked with FC /B command) so no useful metadata was lost.

Sidecar files are also produced by PMB (or Panasonic's equivalent) during transfer, but who knows how to use them? Vegas certainly doesn't. I think that they are only used by the database part of PMB (or whatever).
dalemccl wrote on 7/11/2015, 11:58 PM
Some observations regarding suggestions offered above.

Device Explorer always says "No Device Connected" regardless of whether the camera's SD card is in a card reader connected to the PC via USB, or the camera is connected directly to the PC via a USB cable.

I also tried copying (with Windows Explorer since Vegas Device Explorer doesn't see the card reader) the entire folder structure from the card to a hard drive instead of just copying the individual video files like I had done before. Then in Vegas, from that structure I drug two files that were part of one continuous shoot, in the correct order, to the timeline. The audio glitch is still there, exactly like before when I had just copied the video files to the hard drive. I may have done something wrong, but it doesn't look like Vegas uses the other files in the folder structure to recognize that the two files are part of one continuous shoot.

I installed PhotoFunStudio (thanks for the tip waagg) and tried it. It imports the files from the SD card reader to the hard drive, but does not join the mp4 files that were part of a continuous shoot. The hard drive folder it copies to contains the individual mp4 files, not a joined file. It might join AVCHD mts files, but it doesn't seem to join the 4k video files that the camera creates in mp4 format (AVC codec internally). It is possible that I'm not using PhotoFunStudio correctly.

From what I can tell from some on-line research, mp4 files have a header containing metadata. That's why simple concatenation of files with Windows' Copy /B in a CMD prompt produces an invalid mp4 file. The resulting joined file has a header at the beginning and a 2nd header at the point at which the 2nd file is joined. The joined file won't play properly in software players and Vegas doesn't allow it to be added to the timeline.

As I mentioned in my 2nd post in the thread, the freeware "My MP4box" properly joins the files. Vegas is happy with that file and there is no audio glitch. My MP4box apparently knows how to handle the headers to produce a properly joined mp4 file with only one header containing metadata that reflects both files that were joined.

Thanks for everyone for their input and help. Some of your suggestions may work and perhaps I am just not implementing them correctly. But since "My MP4Box" solves my problem, I'll continue using it.
PeterDuke wrote on 7/12/2015, 12:25 AM
Thanks for your feedback dalemccl. I would say that you now know as much as anyone here about transferring camera MP4 files.

In addition to PhotoFunStudio (which comes in PE, AE and SE flavours), Panasonic also has HD Writer in AE, XE and LE flavours. HD Writer AE came with my Panasonic camera and it also does not concatenate the parts from a single AVCHD shoot. It merely renames them all to the same shooting date/time with a suffix number indicating their order.

I can't find a web page which describes the differences between the above six programs, but presumably they are all similar.

Why Panasonic can't provide a simple piece of software to concatenate scene parts, nor why a card formatted to exFAT needs to chop up a scene in the first place are both beyond me. Just laziness, I'd say.
dalemccl wrote on 7/12/2015, 1:05 AM
>>Why Panasonic can't provide a simple piece of software to concatenate scene parts, nor why a card formatted to exFAT needs to chop up a scene in the first place are both beyond me. Just laziness, I'd say.<<

PeterDuke, I wondered about that too. There seems to be no reason to split the files at 4GB with exFAT. It's limiting enough that this particular camera, the LX100, limits continuous shooting to 15 minutes, at which point it stops recording (probably because of heat considerations with the small camera body).
VidMus wrote on 7/12/2015, 6:03 AM
" It's limiting enough that this particular camera, the LX100, limits continuous shooting to 15 minutes..."

Any camera with that limitation is junk! Do yourself a huge favor, get rid of it and find another camera.

musicvid10 wrote on 7/12/2015, 7:01 AM
+1 MP4Box
Been around so long it often gets overlooked.
Personally, I find it idiotic that each file is treated as separate.

Chienworks wrote on 7/12/2015, 9:06 AM
I'm sure the 4GB split is a quite deliberate feature, purposely left there. It forestalls complaints from FAT32 users who aren't able to copy larger files to their hard drives. Of course, it would be nice if there was a camera setting to turn that feature off.
PeterDuke wrote on 7/12/2015, 6:31 PM
Come now! How hard would it be to make that an automatic feature?
Chienworks wrote on 7/12/2015, 7:02 PM
How on earth would the camera know what format hard drive the files are eventually going to be copied to?
PeterDuke wrote on 7/12/2015, 10:09 PM
All the camera needs to do is write unchopped video to a card that is exFAT formatted. It is up to the user to modify it for crippled/obsolete hard drives. What proportion of hard drives, that are used to play video, do you guess in this day and age would not support greater than 4 GB files?
Chienworks wrote on 7/12/2015, 10:54 PM
Hey, i didn't say it was a great thing to do. I'm just pointing out why.
set wrote on 7/12/2015, 11:12 PM
Just my thought...

Perhaps for 'simplicity' reason so that any recorded files can be easily copied to any FAT32-only-supported Media Players?

Set
PeterDuke wrote on 7/12/2015, 11:16 PM
I will concede that there is more than just max file length. The AVCHD standard involves a folder structure with files using the 8.3 all caps naming system. This could be updated too. Time for AVCHD 3!

MP4 files, where we came in, are another matter, but I don't see why they should be burdened by historical baggage.