INDEX  F.A.Q.  SEARCH  LATEST POSTS     Rules  Register  Profile  Private messages  Login


Search all forums or this forum: Advanced search
Mini Guide - AVCHD to Anything Using DGAVCdec

Forum Index -> Video -> Advanced Video Conversion Printer-friendly version
Goto page 1, 2, 3, 4, 5, 6, 7, 8  Next
Reply to topic
Author Message
Soopafresh
Dismember


Joined: 01 Jan 2004
Location: United States

Post Posted: Feb 18, 2008 15:31 Posts Comp View users profile Send private message Reply with quote

There aren't too many free methods to convert AVCHD to other formats. Recent upgrades to the libavcodec library have built in PAFF support, which allows AVCHD to be properly decoded. The latest DGAVCdec program works with AVCHD. Here's how to do it.

1- Install Avisynth 2.57 or later

2- Download and unzip the AVCHD_CONVERT package:

avchd_convert_v6.zip

3-Drag your .MTS files into the same folder as the unzipped files. Double Click the appropriate .bat to run


4- Open up the avs files as highlighted below with your favorite app (ie - VirtualDub), and you should be able to preview the video . Remember, with a 45 frame fade-in, you'll have to scrub forward to see anything.



Notes -

Q - Which batch file should I choose?

A - Depends on your camera, the settings in which you filmed, and what you're planning on doing with the output files.

The __1920x1080_Same_As_Source.bat file will output the same settings as your input file. That's a good (but slow because of the size) script for editing in NLE packages such as Vegas.

If you aren't editing and just want to make DVDs or MP4 or AVIs, choose one of the other batch files. The dimensions 848x480 for NTSC and 1024x576 for PAL were chosen specifically to feed the proper file dimensions and aspect ratio into your MPEG2 encoder.

The .BAT files are named with what the output will be. ie - 848x480 size dimensions and deinterlaced

Q - I want to edit in Premiere/Vegas/etc. Which codec/format should I save in?

A - Lagarith or Huffyuv are both lossless codecs, so converting the .MTS file to a Lagarith encoded .AVI file in VirtualDub will do the trick.

Q - It doesn't work on my MTS file, or the ouput looks corrupt.

A - That's because there are too many AVCHD proprietary modifications put in place by the camera manufacturers. The scripts can't cover them all. Some of the newer cameras output in progressive format, in which case deinterlacing can reduce the quality of the image.


The script is set with a 45 frame fade-in and fade-out.

The HQ batch file uses a better (but slower, as in half as fast) deinterlacing method. It'll look better for videos with fast moving pans, etc. Try both and see if you notice a difference. If you don't, just use the regular one.

Make sure your AVCHD file has a .MTS extension

Sample Output:

00004.avi



****** A Version Specifically for Vimeo ******

Here's a version of the script designed to automatically transcode to Vimeo.com Upload Specs:

1280x720 6000k h264 with AAC audio MP4 files - This leads to a fairly large MP4 file, about 1/3rd to 1/2 the size of the original .MTS . But it looks pretty nice - no B frames.

avchd_convert__vimeo_v6.zip

The procedures and requirements are the same as above

1) Drag your MTS files into the same folder


2) When complete, the output files will be prefaced with "Vimeo_"


Sample Output:

vimeo_x264_test.mp4


Last edited by Soopafresh on Aug 01, 2008 18:48, edited 75 times in total


racer-x
Just passing by.


Joined: 24 Mar 2003
Location: 3rd Rock from the Sun

Post Posted: Feb 19, 2008 10:44 Posts Comp View users profile Send private message Reply with quote

Nice work Soopafresh!

I originally tried DGAVCdec on some AVCHD files that I demuxed with tsremux. It didn't work out that well, it gave lot's of errors. Your method works better...............
_________________
Never argue with an idiot.......he'll only bring you down to his level and beat you with experience.


Soopafresh
Dismember


Joined: 01 Jan 2004
Location: United States

Post Posted: Feb 19, 2008 11:51 Posts Comp View users profile Send private message Reply with quote

No probs. Once DGAVCdec can be accessed via command line (like the more seasoned DGindex), it'll be a true "one click" solution.

DVWannaB
Member


Joined: 30 Dec 2001
Location: United States

Post Posted: Feb 20, 2008 11:46 Posts Comp View users profile Send private message Reply with quote

Soopafresh does it AGAIN!!! biggrin.gif

Unfortunately, I am rocking a Canon HV20 these days, which is HDV sad.gif


Soopafresh
Dismember


Joined: 01 Jan 2004
Location: United States

Post Posted: Feb 20, 2008 12:22 Posts Comp View users profile Send private message Reply with quote

Thanks for your kind words. biggrin.gif The HV20 - a terrific camera for the $. You have many more options with HDV for conversion - lot's of methods posted here (racer-x's guide for Blu Ray http://forum.videohelp.com/topic346069.html for example ) and quite a number of ways posted at http://www.hv20.com.

pkliment
Member


Joined: 21 Mar 2007
Location: Slovakia

Post Posted: Feb 21, 2008 01:40 Posts Comp View users profile Send private message Reply with quote

HDV footage (HV20) is mpeg2 transport stream. It is possible editing in Sony Vegas 8 ( onfire.gif smart render onfire.gif ), or use free DGMPGDec with Avisynth and convert it in one of encoders (XviD, HCEnc, ...)

Sorry my english is wrong biggrin.gif


DVWannaB
Member


Joined: 30 Dec 2001
Location: United States

Post Posted: Feb 21, 2008 11:17 Posts Comp View users profile Send private message Reply with quote

Yes, that is just the way I'm doing it. I had Vegas 4 and recetly upgraded to 8. Also making use of the other threads that discuss how to convert 1440x1080 HDV to 1280x720. Doing lots of experiments to see what I can and cant do with the HV20. I am about to try a 24fps project and see how that turns out.

Soopafresh
Dismember


Joined: 01 Jan 2004
Location: United States

Post Posted: Feb 23, 2008 19:25 Posts Comp View users profile Send private message Reply with quote

Figured out the command line syntax for DGAVCindex, so now the process is even easier. Download avchd_convert_v2.zip from the top post and have a look at the simplified instructions.

Soopafresh
Dismember


Joined: 01 Jan 2004
Location: United States

Post Posted: Feb 25, 2008 00:11 Posts Comp View users profile Send private message Reply with quote

Very minor upgrades to v3

*Latest DGAVCdec ( Alpha 18 )

*Changes to the Avisynth Script

- turned off deblocking for slight performance increase and sharpening
- switched to Lanczos4Resize for slightly nicer quality over BicubicResize

BTW, the image quality of this method is superior to the older CoreAVC way. Big kudos to Don Graft (aka Neuron2). Also, a big improvement with the A/V sync . See clip (source MTS file author unknown)

00009.avi


Processing Multiple .MTS Files

This is fresh out of the oven, but it looks like it works.

1- Download and unzip this very small .zip file- _multi_demux_mts.zip

Copy to same folder as the rest of the stuff. Double click to run.


2- You'll feed the following files into your encoder/editor/etc


Soopafresh
Dismember


Joined: 01 Jan 2004
Location: United States

Post Posted: Feb 27, 2008 19:05 Posts Comp View users profile Send private message Reply with quote

Here's an add-on which will automatically convert your MTS files to "lossless" Huffyuv with PCM WAV audio, or Xvid with mp3 audio. It uses FFmpeg (included) to do the transcoding.

Huffyuv Output Settings
Huffyuv v2.20 Standard
Interlaced
1920x1080
PCM_s16LE (stereo wav audio)

The Huffy batch file will prepare files suitable for many PC based editing packages, including Vegas, etc (at least I think it does). You should have LOTS of available free space, as the output file will be 30-40times the size of the original .MTS . Quad core machine is recommended if you want to see smooth playback. You can use the built-in Huffyuv decoder in ffdshow to play the file back, or download http://www.free-codecs.com/download/HuffYUV.htm

Xvid Output Settings
Progressive
720x400
MP3 160K audio

The Xvid batch file will quickly create AVI files suitable for smooth playback on virtually any PC

Directions:

Download, unzip, and copy into the same folder as the other stuff

huffyuv_xvid_addon.zip


neuron2
Member


Joined: 04 Dec 2001
Location: Chicago, USA

Post Posted: Mar 04, 2008 20:08 Posts Comp View users profile Send private message Reply with quote

Soopafresh wrote:
- turned off deblocking for slight performance increase and sharpening

That may not be a good idea. Deblocked frames are used as reference frames in AVC, so blocking artifacts can get bad with long GOPs if you turn off deblocking.

In case it's not clear, with the latest version of DGAVCDec, you shouldn't need to demux the video first, and audio demuxing is supported.

Please let me know if you have any issues with your AVCHD files.


Soopafresh
Dismember


Joined: 01 Jan 2004
Location: United States

Post Posted: Mar 04, 2008 20:36 Posts Comp View users profile Send private message Reply with quote

I didn't know that, neuron2. I'll test it out and see if I can implement it into the next version of the script. BTW, thank you for making all of this possible. biggrin.gif

neuron2
Member


Joined: 04 Dec 2001
Location: Chicago, USA

Post Posted: Mar 04, 2008 21:18 Posts Comp View users profile Send private message Reply with quote

@Soopafresh

Thank you for making the tools accessible to the masses. Your efforts are greatly appreciated!

"Dismember" -- Ha ha, I love it.

I've been planning to buy an AVCHD capable camera. Any suggestions? I really need AV input (SD at least), though, for my underwater swimming video.


Soopafresh
Dismember


Joined: 01 Jan 2004
Location: United States

Post Posted: Mar 04, 2008 23:07 Posts Comp View users profile Send private message Reply with quote

I don't own one. Just wrote the mini-guide to help folks out. I kinda prefer the convenience of the HDV Mpeg2 world, where you can IVTC the raw .M2T files to get 24p - or simpler yet straight 30p as on the new Canon HV30. Not as compression efficient as AVCHD, though.

jeremyotten
Member


Joined: 06 Mar 2008
Location: Netherlands

Post Posted: Mar 06, 2008 12:11 Posts Comp View users profile Send private message Reply with quote

Can someone help me to convert my mts files to Flash?
Also I used the convert to xvid post. Work fine but i wasn't able to play it not even when i installed the k-lite basic codec pack

Help would ne appreciated!

Thanx in Advance


Soopafresh
Dismember


Joined: 01 Jan 2004
Location: United States

Post Posted: Mar 06, 2008 12:41 Posts Comp View users profile Send private message Reply with quote

Post one of the XVID files up here. Make sure it is less than 5MB in size.

jeremyotten
Member


Joined: 06 Mar 2008
Location: Netherlands

Post Posted: Mar 06, 2008 12:44 Posts Comp View users profile Send private message Reply with quote

Here ya go ;-)

00007_xvid_.avi


Soopafresh
Dismember


Joined: 01 Jan 2004
Location: United States

Post Posted: Mar 06, 2008 13:07 Posts Comp View users profile Send private message Reply with quote

It plays on my PC. I like that black fish.

Sounds like you've got a playback codec problem on your system. Codec packs like K-Lite will get you into trouble. Try uninstalling K-Lite and install an FFdshow from 2008 instead.

Creating a flash file is easy if you have a flash encoder program. Just feed it the .AVS files and voila.

00009.flv

Here's a flash script which uses mencoder. It might need Msvcp70.dll. If it complains, google for the file and download it into the AVCHD_Convert folder

flash_addon.zip


jeremyotten
Member


Joined: 06 Mar 2008
Location: Netherlands

Post Posted: Mar 06, 2008 13:23 Posts Comp View users profile Send private message Reply with quote

Im on windows vista system.. see what happens :-(

to%20flash%20error.swf


Soopafresh
Dismember


Joined: 01 Jan 2004
Location: United States

Post Posted: Mar 06, 2008 13:37 Posts Comp View users profile Send private message Reply with quote

I'm running XP, so I can't recreate the problem you're seeing in Vista. I promise it works, there's something wrong on your system confused.gif

http://www.flixxy.com/vista-operating-system-humour.htm


jeremyotten
Member


Joined: 06 Mar 2008
Location: Netherlands

Post Posted: Mar 06, 2008 13:41 Posts Comp View users profile Send private message Reply with quote

other flash encoders then???

Soopafresh
Dismember


Joined: 01 Jan 2004
Location: United States

Post Posted: Mar 06, 2008 13:46 Posts Comp View users profile Send private message Reply with quote

yeah, try another flash encoder app. It will have to accept Avisynth AVS scripts.

jeremyotten
Member


Joined: 06 Mar 2008
Location: Netherlands

Post Posted: Mar 06, 2008 13:47 Posts Comp View users profile Send private message Reply with quote

That was my question to you do you know any good ones wink.gif

Soopafresh
Dismember


Joined: 01 Jan 2004
Location: United States

Post Posted: Mar 06, 2008 14:09 Posts Comp View users profile Send private message Reply with quote

jeremyotten
Member


Joined: 06 Mar 2008
Location: Netherlands

Post Posted: Mar 06, 2008 14:19 Posts Comp View users profile Send private message Reply with quote

hmmm cant seem to be able to find a download link anywhere...

ok found the link trough google.

Now when I try to convert my avs file to flv or swf I get and error.
Can someone tell me the right settings?

Thanx in Advance


zoobie
HDV IT Coder


Joined: 27 Feb 2005
Location: Colorado Rocky Mountains

Post Posted: Mar 07, 2008 19:14 Posts Comp View users profile Send private message