## AVCHD .MTS

This forum is for questions and discussion of all the aspects of handling your footage. If you have questions about capturing/ripping footage, AviSynth, or compression/encoding/converting, look here.

### AVCHD .MTS

I saw a post a few months back explain the process of how to handle these files (im assuming thats what it was for) and didnt want to necro post (it was back in april, is that necro?)

I saw someone else asking for advice on how to handle/encode these files for easier use but alas Im retard and not completely understanding. The jist of what I got was demux, and then remux, put into MKV, and then use that? while I tried that method the footage came out crap-tastic and I resorted to everything I could think of after that but I cant find something suitable to work with.

Is there a specific guide I can read out there somewhere?

The Non-Professional

Joined: 15 Oct 2001
Location: Maybe on earth, maybe in the future

### Re: AVCHD .MTS

Two things to try (both avisynth, please try in this order):

ffmpegsource. You can try it on the original m2ts, if it is progressive then it should decode it correctly. However ffms2 likes to fuck up a lot when it comes to BD raws or other avc m2ts raws and what have you. You can also try demuxing the h264 stream and remuxing into mkv with mmg or gdsmux (some black magic at work here) which might improve your chances, but try it with the original stream first. So if that fails that really only one other (free) option.

DGAVCDec. Shit slow but almost guaranteed to work. This is all there is when it comes to 'free' ways of handling those kinds of files (you can use one of these methods to decode it to lossless or something you can work with if it pleases you).

As for shit you gotta pay for (which I really don't recommend but whatever), there's dgavcdenv and dgavcdecdi. The former uses the decoding chip on nvidia's gpu for decoding (actually rather slow when compared to threaded software decoders) and the latter uses the diavc decoder (which also costs money) which is probably the fastest software h264 decoder.

You should be able to use one of the first two options without issue.
Any further questions feel free to fire away.
TheRyuu

Joined: 19 May 2010

### Re: AVCHD .MTS

Im really sorry to sound like a newb which unfortunately I am, but how does one go about using those? I get that in DGAVDec you load the file and demux it but in FFmpegsource? also once the file in demuxed in the previous what do I do with that? Im really way to new to these formats and have no no experience in dealing with this stuff.

The Non-Professional

Joined: 15 Oct 2001
Location: Maybe on earth, maybe in the future

### Re: AVCHD .MTS

You don't have to demux anything (other than the audio if it suits you) so I'm not sure where you're getting that from.

For ffms2, just throw this in an avisynth script:
Code: Select all
LoadPlugin("X:\path\to\ffms2.dll")ffvideosource("X:\path\to\file.m2ts")

It will pause when you load the script because it has to index it first (this only has to happen once).
TheRyuu

Joined: 19 May 2010

### Re: AVCHD .MTS

Actually, for loading with ffvideosource, I think that remuxing the video stream in a .mkv is safer.

Also, another free way is to use DSS2, which is a pretty easy and fine way if you plan to transcode, although it's best kept as a last resort...

mirkosp
MODkip

Joined: 24 Apr 2006
Location: Gallarate (VA), Italy
Status: （」・ワ・）」（⊃・ワ・）⊃

### Re: AVCHD .MTS

MKV is only safer in that libavformat absolutely sucks at demuxing transport streams. Otherwise, there is a lot less to go wrong. For some reason, remuxed AVC still seems to have issues, not sure why.

Has anyone ever tested DSS2 with DivX7?
Mister Hatt

Joined: 25 Dec 2007
Status: better than you

### Re: AVCHD .MTS

Mister Hatt wrote:MKV is only safer in that libavformat absolutely sucks at demuxing transport streams. Otherwise, there is a lot less to go wrong. For some reason, remuxed AVC still seems to have issues, not sure why.

Has anyone ever tested DSS2 with DivX7?

ffms2 doesn't use lavf for transport streams.
TheRyuu

Joined: 19 May 2010

### Re: AVCHD .MTS

TheRyuu wrote:
Mister Hatt wrote:MKV is only safer in that libavformat absolutely sucks at demuxing transport streams. Otherwise, there is a lot less to go wrong. For some reason, remuxed AVC still seems to have issues, not sure why.

Has anyone ever tested DSS2 with DivX7?

ffms2 doesn't use lavf for transport streams.
Haali is only the default on Windows, and even then not always.
Mister Hatt

Joined: 25 Dec 2007
Status: better than you

### Re: AVCHD .MTS

TheRyuu wrote:You don't have to demux anything (other than the audio if it suits you) so I'm not sure where you're getting that from.

For ffms2, just throw this in an avisynth script:
Code: Select all
LoadPlugin("X:\path\to\ffms2.dll")ffvideosource("X:\path\to\file.m2ts")

It will pause when you load the script because it has to index it first (this only has to happen once).

tried it out and it just gives me an error when I try to play it in MPC, System Exception - Access violation at 0x10012380

wut do?

The Non-Professional

Joined: 15 Oct 2001
Location: Maybe on earth, maybe in the future

### Re: AVCHD .MTS

The Non-Professional wrote:
TheRyuu wrote:You don't have to demux anything (other than the audio if it suits you) so I'm not sure where you're getting that from.

For ffms2, just throw this in an avisynth script:
Code: Select all
LoadPlugin("X:\path\to\ffms2.dll")ffvideosource("X:\path\to\file.m2ts")

It will pause when you load the script because it has to index it first (this only has to happen once).

tried it out and it just gives me an error when I try to play it in MPC, System Exception - Access violation at 0x10012380

wut do?

Stop trying to use avisynth for what it was never intended (playing it in MPC? why?).
If it still crashes after you load it in vdub then try remuxing it to mkv and try again. If it fails yet again try a different method.
TheRyuu

Joined: 19 May 2010