Answers.Body: <p>I use <code>ffmpeg</code> for that.
  Just plain concat filter with stream coping works.</p>
  
  <pre><code>ffmpeg -f concat -i ./file1.MTS ./file2.MTS -c copy output.avi
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-06-25T14:04:14.740Z
Answers.LastActivityDate: 2013-06-25T15:31:49.187Z
Answers.LastEditDate: 2013-06-25T15:31:49.187Z
Answers.UserDisplayName: Dominik Gorący
Answers.Body: <p>Guess the original poster found his way to do it - I found the following that worked for me, even though I followed a different procedure. I didn't want to convert the MTS files before importing them to iMovie into anything else and was missing too the additional index / descripition files. this is the source and works for Sony SW / Cams. Potentially with other HW / SW constellation a similar way is possible.
  <a href="http://www.mac-forums.com/forums/movies-video/263323-how-import-mts-files-into-imovie-have-been-archived.html" rel="nofollow">http://www.mac-forums.com/forums/movies-video/263323-how-import-mts-files-into-imovie-have-been-archived.html</a></p>
  
  <p>So what I did:
  1. I added the folder with my MTS files on my USB drive with the Sony PMB Picture Motion Browser - in fact I used the more recent Play Memories Home edition
  2. Now I marked the MTS files from that source and exported them to an external USB drive - but you can use basically any medium (SDHC, maybe even DVD if you think that's better for archiving)</p>
  
  <p>And now the new folders created can be either imported directly from the medium, copied to the Mac or other location from where you again can import them as archive in iMovie.</p>
  
  <p>Good luck.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-04T15:06:52.297Z
Answers.LastActivityDate: 2014-07-04T15:06:52.297Z
Answers.UserDisplayName: David
Answers.Body: <p>I had the same problem - wanting to recreate the AVCHD folder structure &amp; metadata files starting with a simple folder of only *.MTS files.</p>
  <p>After a lot of hunting, I discovered <a href="https://stackoverflow.com/questions/25592432/recreate-avchd-structure-cpi-files-from-mts">this post</a> that recommends using <a href="https://eww.pass.panasonic.co.jp/pro-av/support/dload/avccam_restorer/dl_e.htm" rel="nofollow noreferrer">AVCCAM Restorer</a>  by Panasonic.</p>
  <p>This program is just what I needed as it is able to both:</p>
  <ol>
  <li>repair an existing AVCHD folder structure if the index is corrupt and so the package can't be opened</li>
  <li>recreate a new AVCHD folder structure + generate the metadata files from basic folder of *.mts files.</li>
  </ol>
  <p>I did a diff of the *.mts files before &amp; after the move into the reconstructed AVCHD folder structure and happily all the MTS files are binary identical.</p>
  <p>A couple of gotchas that I've noticed:</p>
  <ol>
  <li><p>AVCCAM Restorer will generate the metadata files with longer names &amp; mixed case, e.g. &quot;MovieObject.bdmv&quot; instead of &quot;MOVIEOBJ.BDM&quot;. This wasn't a problem for me, but apparently older programs will error if the file names don't conform to the old FILENAME.EXT 8.3 format.</p>
  </li>
  <li><p>The Mac version of the app is 32-bit only, &amp; so will only work on MacOS 10.13 (High Sierra) or lower. It won't work on later Macs as they run only 64-bit apps. I was able to run High Sierra in a virtual machine to run the program &amp; convert my files.</p>
  </li>
  </ol>
  <p>I tested the Windows version of the program in a virtual Windows 10 environment too and it works in exactly the same way as the Mac version, including the mixedCase filename handling. Anyhow, it might be easier to find a PC running Windows 10 than an older Mac running 10.13.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-28T16:56:30.800Z
Answers.LastActivityDate: 2020-11-28T16:56:30.800Z
Answers.UserDisplayName: Buxtor
Body: <p>My dad has a Sony HXR-NX5E which writes its output to SDHC cards in AVCHD format.</p>
  
  <p>Wanting to back up his video and not understanding the AVCHD structure, I originally got him to copy the contents of the <code>PRIVATE/BDMV/STREAM/</code> folder to his backup storage, seeing as they were the video files and they were playable in VideoLan Client.
  My dad filmed multiple separate events onto the same SDHC card and I thought that by separating the <code>*.MTS</code> files for a each event into a separate folder, we'd be able to separate the events and work with them later.</p>
  
  <p>I now know that we ought to have backed up the entire BDMV folder and in order for him to edit the video and transfer it to Blu-ray or DVD, it's easiest for him if we could recreate a AVCHD structure for the video files.</p>
  
  <p>It seems to me that it ought to be straight-forward to recreate the clip files (<code>*.CLI</code>) for each of the <code>*.MTS</code> files and create a single playlist (<code>*.MPL</code>) file which will play each of the clips in sequence with no menus or anything else (and an <code>INDEX.BDM</code> and <code>MOVIEOBJ.BDM</code> file) without touching the <code>MTS</code> files at all. But after searching for and trying out a bunch of different free and trial programs, I can't seem to find anything which I can get to carry out this task.</p>
  
  <p>I have problems with programs creating superfluous menus, insisting on re-encoding the <code>MTS</code> files and insisting on combing the video into one short file, presumably with all the streams overlapping.</p>
  
  <p>Can anyone give me any advice on how I might achieve this?</p>
  
  <p>To be clear, I would like an AVCHD which contains no menus, immediately begins playing the first clip and continues playing each clip in sequence until the last one, without re-encoding the video files.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2012-05-17T20:43:40.437Z
Comments.Text: When your dad got the camera did it come with software from Sony? Specifically does it have Sony's PMB (Picture Motion Browser)? If he lost it, go here: http://www.sony-mea.com/support/download/316131 Go here to learn how to use it: http://www.youtube.com/watch?v=k5tmwml4zeA
Comments.UserDisplayName: filzilla
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2012-05-18T22:56:12.943Z
Comments.Text: Thanks for that link. I didn't know of PMB.
  I've installed it now, but unfortunately, it doesn't appear to be able to directly import MTS files, so it won't work for my purpose. To be clear, I presume it can import MTS files as part of an AVCHD structure, but not without, like the files I have.
Comments.UserDisplayName: Paddy O'Loughlin
Tags: <video><file-formats>
Title: Recreate basic AVCHD from MTS files
UserDisplayName: Paddy O'Loughlin
ThreadText: # Recreate basic AVCHD from MTS files
  
  (Asked by: username_0 on 2012-05-17)
  
  My dad has a Sony HXR-NX5E which writes its output to SDHC cards in AVCHD format.
  
  Wanting to back up his video and not understanding the AVCHD structure, I originally got him to copy the contents of the `PRIVATE/BDMV/STREAM/` folder to his backup storage, seeing as they were the video files and they were playable in VideoLan Client.
  My dad filmed multiple separate events onto the same SDHC card and I thought that by separating the `*.MTS` files for a each event into a separate folder, we'd be able to separate the events and work with them later.
  
  I now know that we ought to have backed up the entire BDMV folder and in order for him to edit the video and transfer it to Blu-ray or DVD, it's easiest for him if we could recreate a AVCHD structure for the video files.
  
  It seems to me that it ought to be straight-forward to recreate the clip files (`*.CLI`) for each of the `*.MTS` files and create a single playlist (`*.MPL`) file which will play each of the clips in sequence with no menus or anything else (and an `INDEX.BDM` and `MOVIEOBJ.BDM` file) without touching the `MTS` files at all. But after searching for and trying out a bunch of different free and trial programs, I can't seem to find anything which I can get to carry out this task.
  
  I have problems with programs creating superfluous menus, insisting on re-encoding the `MTS` files and insisting on combing the video into one short file, presumably with all the streams overlapping.
  
  Can anyone give me any advice on how I might achieve this?
  
  To be clear, I would like an AVCHD which contains no menus, immediately begins playing the first clip and continues playing each clip in sequence until the last one, without re-encoding the video files.
  
  **Tags:** video, file-formats
  
  > **Comments:**
  > **username_1**: When your dad got the camera did it come with software from Sony? Specifically does it have Sony's PMB (Picture Motion Browser)? If he lost it, go here: http://www.sony-mea.com/support/download/316131 Go here to learn how to use it: http://www.youtube.com/watch?v=k5tmwml4zeA  
  > **username_0**: Thanks for that link. I didn't know of PMB. I've installed it now, but unfortunately, it doesn't appear to be able to directly import MTS files, so it won't work for my purpose. To be clear, I presume it can import MTS files as part of an AVCHD structure, but not without, like the files I have.  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_2 on 2013-06-25. Score: 3
  
  I use `ffmpeg` for that.
  Just plain concat filter with stream coping works.
  
  ```
  ffmpeg -f concat -i ./file1.MTS ./file2.MTS -c copy output.avi
  
  ```
  
  
  ---
  
  ### Answer by username_3 on 2014-07-04. Score: 3
  
  Guess the original poster found his way to do it - I found the following that worked for me, even though I followed a different procedure. I didn't want to convert the MTS files before importing them to iMovie into anything else and was missing too the additional index / descripition files. this is the source and works for Sony SW / Cams. Potentially with other HW / SW constellation a similar way is possible.
  <http://www.mac-forums.com/forums/movies-video/263323-how-import-mts-files-into-imovie-have-been-archived.html>
  
  So what I did:
  1. I added the folder with my MTS files on my USB drive with the Sony PMB Picture Motion Browser - in fact I used the more recent Play Memories Home edition
  2. Now I marked the MTS files from that source and exported them to an external USB drive - but you can use basically any medium (SDHC, maybe even DVD if you think that's better for archiving)
  
  And now the new folders created can be either imported directly from the medium, copied to the Mac or other location from where you again can import them as archive in iMovie.
  
  Good luck.
  
  
  ---
  
  ### Answer by username_4 on 2020-11-28. Score: 2
  
  I had the same problem - wanting to recreate the AVCHD folder structure & metadata files starting with a simple folder of only \*.MTS files.
  
  After a lot of hunting, I discovered [this post](https://stackoverflow.com/questions/25592432/recreate-avchd-structure-cpi-files-from-mts) that recommends using [AVCCAM Restorer](https://eww.pass.panasonic.co.jp/pro-av/support/dload/avccam_restorer/dl_e.htm) by Panasonic.
  
  This program is just what I needed as it is able to both:
  
  1. repair an existing AVCHD folder structure if the index is corrupt and so the package can't be opened
  2. recreate a new AVCHD folder structure + generate the metadata files from basic folder of \*.mts files.
  
  I did a diff of the \*.mts files before & after the move into the reconstructed AVCHD folder structure and happily all the MTS files are binary identical.
  
  A couple of gotchas that I've noticed:
  
  1. AVCCAM Restorer will generate the metadata files with longer names & mixed case, e.g. "MovieObject.bdmv" instead of "MOVIEOBJ.BDM". This wasn't a problem for me, but apparently older programs will error if the file names don't conform to the old FILENAME.EXT 8.3 format.
  2. The Mac version of the app is 32-bit only, & so will only work on MacOS 10.13 (High Sierra) or lower. It won't work on later Macs as they run only 64-bit apps. I was able to run High Sierra in a virtual machine to run the program & convert my files.
  
  I tested the Windows version of the program in a virtual Windows 10 environment too and it works in exactly the same way as the Mac version, including the mixedCase filename handling. Anyhow, it might be easier to find a PC running Windows 10 than an older Mac running 10.13.
  
  
  ---
  
  