AVCHD

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

Postby blaku92 » Sun Apr 11, 2010 2:15 am

Hey everyone, I just got the Panasonic TM700 camera (AVCHD/28Mbps 1080p 60fps) and I'm excited to finally be working with this format. I've known about AVCHD for a while, but haven't worked with it until now because I was broke for years and only had a Sony MiniDV handycam :lol: . I'm looking to find a frame accurate/free method of transcoding the footage to anything else, like lagarith or huffyuv for example. I'll be doing some research -- especially with the 28Mbps option, because it's not part of the AVCHD spec. I'll be reading several guides the next few days, but any advice or links to where I can learn more about Bluray/.MTS workflows are appreciated too. Is anyone else on the org working with AVCHD? Thanks so much!
Image

"I've dated uglier girls than you for breakfast."
User avatar
blaku92
 
Joined: 07 Feb 2005
Location: Los Angeles, CA

Re: AVCHD

Postby Mister Hatt » Sun Apr 11, 2010 2:26 am

m2ts is a funky container because libavformat breaks on it. Pretty much every open tool uses libavformat. Your best bet would be remuxing to matroska with eac3to and using FFMS2, or if you don't mind it being slower to index and seek but want GPU accelerated decoding then Donald Graft's DGNVDec should be able to handle it assuming you have an nvidia card with a VP2 chip. Both methods are frame accurate. FFMS2 can open m2ts via Haali's splitter however it is not frame accurate, you MUST remux. I would not advise using LAGS or huffy on this myself, unless you are 100% sure that you know what colour coefficients it uses and are encoding to the same colourspace.
Mister Hatt
 
Joined: 25 Dec 2007
Status: better than you

Re: AVCHD

Postby blaku92 » Sun Apr 11, 2010 4:59 pm

I'm surprised that FFMS2 isn't frame accurate. I'll take what I can get though -- I'm not going to learn how to program any time soon. As far as colorspace is concerned, don't many of the avisynth filters require you to change over to YV12 no matter what? Is there an avisynth script you know of, off the top of your head, that would allow me to find out what colorspace my footage was shot in? I gotta brush up on my scripting knowledge soon.... I feel like I'm getting too rusty. I'll have to look into the DGNVDec once I get my new workstation built. eac3to seems really awesome. I'll definitely give that a try sometime. Thanks for the help!
Image

"I've dated uglier girls than you for breakfast."
User avatar
blaku92
 
Joined: 07 Feb 2005
Location: Los Angeles, CA

Re: AVCHD

Postby Mister Hatt » Mon Apr 12, 2010 3:05 am

info() is a mighty useful avisynth instruction :) FFMS2 is only as frame accurate as the splitter allows it to be. libavformat sucks at m2ts altogether while Haali's splitter can at least handle it, but not seek accurately. FFMS2 uses Haali for all transport streams in windows, otherwise libavformat. I have a half written m2ts splitter and GPU decoder but it's not for avisynth \o/

eac3to is great for demuxing stuff, and I would recommend that and FFMS2 with the muxed mkv. I'm not a big fan of anything neuron2 makes and DGNVDec is no exception.
Mister Hatt
 
Joined: 25 Dec 2007
Status: better than you

Re: AVCHD

Postby Bakadeshi » Wed Apr 21, 2010 11:43 pm

a quick google search indicates that ffmpeg seems to be able to handle it. If thats true, and you want to stay away from commandline stuff, you can try AMVbe and see if it can read it (amvbe uses mencoder which uses ffmpeg libraries). If it can(Just drop the file in the input box and click the Test playback button to test), it will convert it to huffyuv (or many other formats) for you.
User avatar
Bakadeshi
Abuses Spellcheck
 
Joined: 29 Sep 2003
Location: Atlanta, GA

Re: AVCHD

Postby Mister Hatt » Thu Apr 22, 2010 5:29 am

He doesn't want to re-encode it. Which is exactly what mencoder does, seeing as it's demuxer is terrible and fails to do -ovc copy properly. There are plenty of GUI's for eac3to anyway, and IIRC tsmuxer can dump to mkv as well. Huffy is a stupid codec, don't use it unless you have a good reason (you don't).
Mister Hatt
 
Joined: 25 Dec 2007
Status: better than you

Re: AVCHD

Postby mirkosp » Thu Apr 22, 2010 6:49 am

Mister Hatt wrote:IIRC tsmuxer can dump to mkv as well.

Nah, but it can demux, so you demux with tsmuxergui and mux with mmg, no need to use cli if one doesn't want to, even. :)
Mister Hatt wrote:Huffy is a stupid codec, don't use it unless you have a good reason (you don't).

Sometimes Lagarith and Lossless x264 are not options, for amvers... :(
Image
User avatar
mirkosp
MODkip
 
Joined: 24 Apr 2006
Location: Gallarate (VA), Italy
Status: (」・ワ・)」(⊃・ワ・)⊃

Re: AVCHD

Postby Bakadeshi » Thu Apr 22, 2010 7:46 am

Mister Hatt wrote:He doesn't want to re-encode it. Which is exactly what mencoder does, seeing as it's demuxer is terrible and fails to do -ovc copy properly.


blaku92 wrote: I'm looking to find a frame accurate/free method of transcoding the footage to anything else, like lagarith or huffyuv for example.


afaik, you have to reencode it to get it into lagarith or huffyuv ;p

mencoder demuxes fine, remuxing is whats terrible though, which is why you use mkvtools , mp4box, etc to put it back together. -ovc copy will get you a raw video file just fine in most formats i've tested, but I admittedly don't know much about AVCHD.
User avatar
Bakadeshi
Abuses Spellcheck
 
Joined: 29 Sep 2003
Location: Atlanta, GA

Re: AVCHD

Postby blaku92 » Sat Apr 24, 2010 12:23 am

Thanks for all the responses. So far, the only way I've been able to successfully transcode my mts files is through avisynth using Directshowsource after I've put all the streams into an MKV container. When I open that MKV file using ffmpegsource, it doesn't decode the stream properly for playback. The TM700 is a new camera, so I'm guessing it's variation of AVCHD is just outside of the libavformat... for now.

Code: Select all
Telecide(order=1,guide=0)
Decimate(cycle=5)


Also, the script above seems to do a good job with the IVTC on the 23.976 + pulldown footage. The only problem is, once I load the .avs file into virtualdub, and export it, the entire transcoded clip repeats twice. It basically makes my clip twice as long as the original MKV clip. Anyone have any suggestions on how to fix that? Maybe a "delete second half" command? Maybe directshow just reads it that way and there's nothing I can do about it except mark an in and and out point on the scrub bar within virtualdub before exporting.
Image

"I've dated uglier girls than you for breakfast."
User avatar
blaku92
 
Joined: 07 Feb 2005
Location: Los Angeles, CA

Re: AVCHD

Postby Mister Hatt » Sat Apr 24, 2010 5:13 am

How does ffms2 fail on your muxed mkv?

As far as a good script goes, try TFM(mode=1,pp=5,micmatching=2,slow=2,clip2=TDeint(mode=2,type=3)).TDecimate()

Your script length issue sounds like directshow breaking. Again. If it's really problematic and you have a large amount of HDD space, I would just use JMDec or something to dump the thing to interlaced yuv4mpeg and load that with rawsource or ffms2.
Mister Hatt
 
Joined: 25 Dec 2007
Status: better than you

Re: AVCHD

Postby blaku92 » Sat Apr 24, 2010 2:03 pm

ffms2 is known to create decoding artifacts on h264 from transport streams, and that's exactly what it's doing. I've never used JMDec or yuv4mpeg -- couldn't find them easily, can you point me in the right direction? I'll keep doing more tests.
Image

"I've dated uglier girls than you for breakfast."
User avatar
blaku92
 
Joined: 07 Feb 2005
Location: Los Angeles, CA

Re: AVCHD

Postby mirkosp » Sat Apr 24, 2010 2:15 pm

blaku92 wrote:ffms2 is known to create decoding artifacts on h264 from transport streams, and that's exactly what it's doing.

You have to demux the transport stream and remux the video into mkv. You can demux the video with tsmuxer and remux it into mkv with mkvtoolnix... it's just one of the possible options to go about it, but as pointed out early, it's one of the easiest ways, if not THE easiest.
Image
User avatar
mirkosp
MODkip
 
Joined: 24 Apr 2006
Location: Gallarate (VA), Italy
Status: (」・ワ・)」(⊃・ワ・)⊃

Re: AVCHD

Postby Mister Hatt » Sat Apr 24, 2010 3:21 pm

eac3to can also do the demuxing. FFMS2 is not at all known for having decoding artifacts, if you read the manual you would know that. libavcodec is known for not being able to decode properly when it cannot read IDR frames due to bad demuxing on the part of libavformat, which on windows at least FFMS2 can be instructed not to use in favour of Haali's splitter. Alternatively you can remux as has already been said, seeing as following instructions is a good idea. JM Decoder is around in all sorts of builds, I cannot tell you where to find it specifically as they're all over the place. I'll hunt around for my build if I can remember who I got it from. yuv4mpeg is a media format for raw YUV data with some resolution and framerate headers. Your lossless y4m file would be 1.5*height*width*framescount bytes. Pretty big.
Mister Hatt
 
Joined: 25 Dec 2007
Status: better than you

Re: AVCHD

Postby blaku92 » Sat Apr 24, 2010 5:56 pm

I've already demuxed/muxed into an MKV. What I'm say is, after that, ffms2 still has decoding artifacts. Any ideas? I didn't use tsmuxer to demux -- I'll try using it and get back to everyone on the results.
Image

"I've dated uglier girls than you for breakfast."
User avatar
blaku92
 
Joined: 07 Feb 2005
Location: Los Angeles, CA

Re: AVCHD

Postby Mister Hatt » Sun Apr 25, 2010 1:25 am

If FFMS2 has decoding artifacts from your MKV, your version is too old. It was fixed months ago. Grab the latest SVN build of FFMS2 you can find and you should be set. I would still suggest eac3to for demuxing, it's more reliable.
Mister Hatt
 
Joined: 25 Dec 2007
Status: better than you


Return to Footage Help

Who is online

Users browsing this forum: No registered users and 1 guest