VideoHelp.com forum archive
http://www.photodex.com/eid8898/products/proshowgold



Forum Archive Home -> Advanced Video Conversion -> Mini Guide - AVCHD to Anything Using DGAVCdec



Mini Guide - AVCHD to Anything Using DGAVCdec
Soopafresh posted 2008 Feb 18 15:31
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. v2.58 works fine on my machine:

http://sourceforge.net/project/showfiles.php?group_id=57023&p ... _id=625750

2- Download and unzip the AVCHD_CONVERT package:

avchd_convert_v7.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. You can still use the scripts, but you'll have to purchase DGavcdecNV for $15 (and you must have an Nvdia 8500 card or higher). Let me know if you want to do this, I'll help you with the steps. Read this post for more information: http://forum.videohelp.com/topic357041.html


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_v7.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



racer-x posted 2008 Feb 19 10:44
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...............



Soopafresh posted 2008 Feb 19 11:51
No probs. Once DGAVCdec can be accessed via command line (like the more seasoned DGindex), it'll be a true "one click" solution.


DVWannaB posted 2008 Feb 20 11:46
Soopafresh does it AGAIN!!! :D

Unfortunately, I am rocking a Canon HV20 these days, which is HDV :(



Soopafresh posted 2008 Feb 20 12:22
Thanks for your kind words. :D 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 posted 2008 Feb 21 01:40
HDV footage (HV20) is mpeg2 transport stream. It is possible editing in Sony Vegas 8 ( :onfire: smart render :onfire: ), or use free DGMPGDec with Avisynth and convert it in one of encoders (XviD, HCEnc, ...)

Sorry my english is wrong :D



DVWannaB posted 2008 Feb 21 11:17
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 posted 2008 Feb 23 19:25
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 posted 2008 Feb 25 00:11
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 posted 2008 Feb 27 19:05
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

_multi_demux_mts_xvid_1280x720.zip



neuron2 posted 2008 Mar 04 20:08
Soopafresh :
- 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 posted 2008 Mar 04 20:36
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. :D


neuron2 posted 2008 Mar 04 21:18
@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 posted 2008 Mar 04 23:07
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 posted 2008 Mar 06 12:11
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 posted 2008 Mar 06 12:41
Post one of the XVID files up here. Make sure it is less than 5MB in size.


jeremyotten posted 2008 Mar 06 12:44
Here ya go ;-)

00007_xvid_.avi



Soopafresh posted 2008 Mar 06 13:07
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 posted 2008 Mar 06 13:23
Im on windows vista system.. see what happens :-(

to%20flash%20error.swf



Soopafresh posted 2008 Mar 06 13:37
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 :?

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



jeremyotten posted 2008 Mar 06 13:41
other flash encoders then???


Soopafresh posted 2008 Mar 06 13:46
yeah, try another flash encoder app. It will have to accept Avisynth AVS scripts.


jeremyotten posted 2008 Mar 06 13:47
That was my question to you do you know any good ones ;-)


Soopafresh posted 2008 Mar 06 14:09
It looks like Super can do it http://en.wikipedia.org/wiki/SUPER_(software)


jeremyotten posted 2008 Mar 06 14:19
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 posted 2008 Mar 07 19:14
http://board.flashkit.com/board/ for all things flash


MikeGuy posted 2008 Mar 12 16:51
cool. Super works great, and it is a single shot m2ts ==>> avi converter. Just ran it on a sample clip, and it does what one would expect it to do. Link is here:

http://www.erightsoft.com/SUPER.html

BTW, it is FREE too. It works as expected, conversion is roughly the duration of the clip, and once done clip can be edited with VDub.



Soopafresh posted 2008 Mar 16 05:00
New V4 has a lot of updates

-It supports multiple MTS files by deafult

-DGAVCdec upgrade to latest v19

-Turned deblocking back on, per recommendation of neuron2

-45 frame fade-in and fade-out

-Audio enhanced with dynamic range compression (sounds more professional)

-HQ batch file for high quality deinterlacing using Yadif for Avisynth. It's a few fps slower during the encode as a result, but the output looks a lot smoother during pans or fast movement.



TorontoXtreame posted 2008 Mar 28 16:40
I have a couple of questions:

1) If I were NOT to deinterlace in any way, keeping it interlaced, would filesize be smaller? (I believe my camera captures interlaced video because i have to deinterlace it on my PC with Nero ShowTime)

2) Is it better to leave a video interlaced for display on my 1080i HDTV? Is it better to deinterlace and burn that file as a Blu-ray or something, or to leave it interlaced and then burn that file as a Blu-ray or something?

3) If yes to either 1 or 2, is there a way to NOT deinterlace using the method explained and available for download in this thread.



Soopafresh posted 2008 Mar 28 16:52
Sure. It's pretty easy to turn deinterlacing off. Give me a sec and I'll diagram it.

Actually, here are 2 batch files which will process the file in an interlaced manner. One will resize to 720x400, the other will "resize" to 1920x1080

interlaced.zip



TorontoXtreame posted 2008 Mar 28 17:28
Soopafresh :
Sure. It's pretty easy to turn deinterlacing off. Give me a sec and I'll diagram it.

Actually, here are 2 batch files which will process the file in an interlaced manner. One will resize to 720x400, the other will "resize" to 1920x1080

interlaced.zip
Okay, thanks a lot Soopafresh, but what is better for an 1080i HDTV, interlaced, or deinterlaced?


Soopafresh posted 2008 Mar 28 17:43
Well, if the screen is 1080i , then interlaced. Your display might not even be able to show 1080p. But if you're going to do that, then it makes more sense to take your MTS files and prepare them directly for Blu Ray playback. This avoids having to re-encode them at all. You'd need a Blu Ray player, of course.


TorontoXtreame posted 2008 Mar 28 18:01
Soopafresh :
Well, if the screen is 1080i , then interlaced. Your display might not even be able to show 1080p. But if you're going to do that, then it makes more sense to take your MTS files and prepare them directly for Blu Ray playback. This avoids having to re-encode them at all. You'd need a Blu Ray player, of course.
I'm sure my TV display cannot show 1080p, the max is 1080i. I know that just taking my mts and putting that on a disc would be my best option, but say I wanted to edit it using Adobe Premiere or another video-editing program, I could encode it and then have Nero burn a Blu-ray disc. I don't have a Blu-ray player yet, but I plan on buying one soon, since the format war is finally over.


45tripp posted 2008 Mar 28 19:22
nice one soopa.

i guess i would have dropped xport and used dgavc
like you demonstrated in an alternate version



Soopafresh posted 2008 Mar 28 19:27
Thanks 45tripp, I'll do that eventually. The A/V sync is really good right now via the Xport demux. I'm sure it is with DGavcIndex, I just haven't extensively tested it.


vhelp posted 2008 Mar 28 22:21
But dgavc doesn't work for all h264 videos. I know that it doesn't open my downloaded apple
(mov) trailers ... and the only way I as able to open those was with Yamb because it basically
just demux the A/V contents and re-wraps them in another (cleaner) container. I posted this
(vague) hint in another thread about a week ago or so.

--> Trailers MOV format -- How to decode/demux/trancode to .MP4 ? [Solved]

-vhelp 4592



Soopafresh posted 2008 Mar 30 00:12
V5 released. Minor enhancements

- Newer DGAVCindex V22

- Resizes to more DVD friendly dimensions - 848x480 for NTSC and 1024x576 for PAL

- PAL version of the batch files included



vhelp posted 2008 Mar 30 09:58
I am hoping (dreaming) of the day when DGAVCindex will open all container packages,
including the apple mov trailers and other containers that house H264 or AVC content.
Well, we can dream, can't we ?

Until then, I'll continue on the hunt for the tool that opens all of them.. will make me happy :)
Thanks for your friendly heads-up.

-vhelp 4603



DWBH posted 2008 Mar 30 11:19
Hi.
I bought the Sony HDR-SR12, great camera. However, I can't read the mts files with the software that comes with the camera, so I use the Sony Vegas 8.0.
I like the program, and I think I can do some cool editing with it.
I've rendered some files, I've been experimenting with some output templates. Bottom line, I want to convert files to DVD, so I can watch them in my living room.
My question is: should I try the programs you guys have suggested, or can I use the Sony Vegas with good results? If so, which output format would you recommend me?
Another thing: what's interlacing?

Finally. What do you reckon: should a certain program to convert files and Vegas to edit them?

Noob here.



Soopafresh posted 2008 Mar 30 12:27
vhelp - you might know about QTsource http://avisynth.org/QuickTime

DWBH - Vegas will work well with your HDR-SR12 MTS files. There's so much to cover that it is out of the scope of this thread to get into the specifics. Download the manual

http://www.sonycreativesoftware.com/download/manuals/vegasfamily

Many Vegas tutorials on Youtube

http://www.youtube.com/watch?v=fZA0GC_Vob4&feature=related

AVCHD Editing programs:

http://www.youtube.com/watch?v=_NNFnacJSdw&feature=related



bescene posted 2008 Apr 02 18:58
I posted earlier about a problem I was having using multi_demux_mts.bat on large *.MTS files created with a Canon HG10.

[url]http://forum.videohelp.com/topic348383.html

Thanks to Soopafresh I was able to get make the *.AVI files for further editing. Along the way, however, I discovered a problem with the "overflow" files that the camera creates automatically when recording long clips (greater than 17 minutes). For example when recording a long performance the camera starts recording into new file after about 1.9GB or 17 minutes of continuous shooting. This would be fine except that multi_demux_mts.bat doesn's seem to recognize the files that the camera creates automatically, but will easily process long clips when I've push the start and stop record button on the camera to record them.

I am going crazzzzzzyyyyy trying to salvage a project that could have been done weeks ago if only I'd done some research on AVCHD before starting a project in this format. Thank god I had a gs150 rolling to get the wide shots so its not a total train wreck just yet! Oh how I miss WinDV, firewire and the MiniDV! Low def is better than no def - please help!

Here is what I've got so far off the tape footage:

[/url]http://www.youtube.com/watch?v=0FR4OmJIoI8



Soopafresh posted 2008 Apr 02 19:02
Explain what you mean by "overflow" files. Do you mean a structure like:


00001.mts
00002.mts

etc?



bescene posted 2008 Apr 02 19:08
Yeah exactly. I start recording (0001.mts) after twenty minutes I have two files (0001.mts and 0002.mts). The second files dies every time and I can process the first one everytime. I thought it was a file size issues (memmory) but that doesn't explan why it wont work on the smaller files (0002.mts)


Soopafresh posted 2008 Apr 02 19:26
It's possible that customized version I made for you only accepts one .MTS file at a time. Try the 00002.mts file alone in the folder and try processing it. Make sure it's the only .MTS in there.


bescene posted 2008 Apr 02 19:57
Tried that. Also tried using TSremux.


Soopafresh posted 2008 Apr 02 20:46
How big is the 00002.mts file? Is it small enough that you can upload it to http://www.mediafire.com/ ? Anything over 100MB might take too long to upload.


bescene posted 2008 Apr 02 20:53
The *.MTS file is 1.9Gb straight out of the camera. I don't have FTP or I'd drop it there.


birdbrainz posted 2008 Apr 07 11:39
bescene :
Oh how I miss WinDV, firewire and the MiniDV! Low def is better than no def - please help!


I agree! Having just spent 3 weeks with a Canon HG10, I've given up and am going Mini-DV. The HG10 is a super camera, and watching the footage on you HD flatscreen is super. But HD video editing and authoring is the world of pain. You'd better have a gamer-level PC, money for new software, and lots of time. My 3.5GB RAM, 1.8Ghz Core2Duo just can't cut it. (Yes, I tried the Elecard AVCHD to DV converter with poor results. The output had something that looked like very coarse interlacing.)

Let's face it. Mini-DV (with its high bit rate and lossless compression) is a great format for capturing video.



adamhamel posted 2008 Apr 10 09:44
Soopafresh. Your contributions have been awesome. I'm sure you have spent quite some time, thanks. I have a couple of questions for you.

I've read many posts on many forums, and I'm trying to get my head wrapped around HD.

I own a sony hdr-sr5 so I get AVC-HD .m2ts file. Your bat file does work on my files.

You seem to have a good handle on things so I'm asking for your thoughts / suggestions.

Here is what I think I know? Please correct me if I'm wrong.

My goal is to be able to edit with Final Cut Pro.

Editing:

1) Editing compressed video seems to be a bad idea. I can do this in Sony Vegas, but you need a very beefy machine, which I do have a Pentium D, w/ 3gb of ram, and It still seems a bit slugish when editing .m2ts files.

2) Besides Vegas most editing solutions don't even handle Editing compressed video. I was able to use Nero to convert my .m2ts to a .mp4 container which I was able to edit in imovie and final cut. I played with mb/s and other quality controls, but I know it's just no going to be as good.

3) If I decompress the mpeg 4 using voltaic, AIC, or some other decompression the files get enormous.

I'm really not sure exactly what to do at this point. I don't want to convert the whole library to downgraded versions, and I'm sure in 6 months there will be a better codec anyway, but I want to be able to have the best of both worlds. Compressed file size (save storage) with preserved quality (raw .m2ts), but still be able to edit

Others have talked about extracting the video and audio from the .m2ts file and wrapping it in a QuickTime container so FinalCut and iMovie would be able to read them. Not sure if this is possible. It seems that you already are able to extract. How difficult would it be to wrap it in a QT container?

I guess when it comes down to it. I'm less concerned with file size. I can always buy another harddrive :-) since they are cheap these days, but I don't want to lose any quality, and I want to be able to edit them with FinalCut.

What do you suggest would be the best way to approach this? The QuickTime approach seems ineresting as maybe one would not have to re-encode (lose quality), maybe we could just re-wrap in a QT container.

Thanks
Adam



adamhamel posted 2008 Apr 10 10:21
Couple of other points:

the ffmpeg call in your bat files works good for standard DVD quality.

1) I want to edit in at least 1440 x 1080 which is my native resolution for the .m2ts files. I realize that if I render to standard dvd it seems pointless, but I would like to be able to re-open those projects later and output to blue-ray / hd discs when they become the standard, and I don't want to have to re-create the project.

What are your thoughts on editing in certain resolutions. Should you always try to edit in a higher resolution for future flexibility?



Soopafresh posted 2008 Apr 10 11:33
adam - thanks for your kind words :D I'm not going to have very good answers for you, as I haven't explored the workflow of AVCHD processing on OS X and Final Cut. The most popular program in this regard does seem to be Voltaic for the Mac. I believe iMovie has built in support for AVCHD (at least I think I read that somewhere).

And as you mentioned, disk drive space is cheap these days. 1TB drives are $200.

Regarding the file dimensions, it all depends on the speed of your editing program and what your target is going to be. Blu Ray output would mean no resizing of the original for editing. But again, a native resolution file for editing is going to be a lot bigger than a resized for DVD file.


Bottom line, hold on to your .M2TS files until better solutions are created.



adamhamel posted 2008 Apr 10 12:17
wow. That was fast man. Yeah IMovie uses apple's AIC codec to transcode to a .mov file. Of course in my case when I turn the camera on it crashes imovie, I've heard others having success with this. Once again. And when I use Voltaic the quality just doesn't look as good as the original.

Both nero and TMPGEnc produce a pretty good mpeg 4 movie in the .mp4 container, I was just looking for possibly a way to change to a mp4 container without transcoding, but maybe that is impossible, or to just extract the raw video from the .m2ts and put it into a different container.

Adam



Soopafresh posted 2008 Apr 10 13:23
You can put it into a MKV container without transcoding (although why would one do that), but MP4 is out because it doesn't allow AC3 audio, which is in the M2TS file. See that? If it isn't one thing it's another! :lol:

BTW, check out this article for some more options on OSX

http://37prime.wordpress.com/2008/01/22/avchd-and-mac-os-x/



baby posted 2008 May 02 23:13
Hello there i'd follow these steps regarding feeding the .avs into tmpegenc plus using virtual dubmod but virtual dub crashes.. I just want to encode my .mts file ecorded from sony hdr sr 12 into .mpg file. normally TPEGxpexx 4.0 took 3 hrs. to finish it and I wonder if there is way to at least half the the time consumed from tmpegxpress 4.0...

thanks



Soopafresh posted 2008 May 03 01:09
Try upgrading Avisynth to 2.58 http://www.free-codecs.com/AviSynth_download.htm

Try regular VirtualDub instead of VirtualDubMod

Your PC is SLOWWWWWW. 2.0Ghz is far too slow for working with HD source material.

TmpegencXpress v4 will take advantage of multicore processors.



baby posted 2008 May 03 21:34
Thanks soopafresh anyway My Pc is power by an Intel core 2 duo 6400 (2.13 GHZ) and I have the latest avisynth .. and I also try VirtualDub but after several minutes it crashed...


Soopafresh posted 2008 May 03 21:53
Hmmm... I don't know. It works without a problem on my system. :(

Which codec are you converting to in VirtualDub ?



Rand HOPPE posted 2008 May 08 18:06
Soopa,

This is a very helpful guide. Having just bought the lovely Sony HDR-SR12, I'm trying to find a way to bring the Sony's .mt2s file into Adobe Premiere Pro CS3 with as little loss as possible. The Huffy script sounds great where you mention that it's lossless as far as video is concerned, however the audio channels are reduced. Any chance of another script, or guidance as to make a change to an existing one, that would be as lossless as possible?

Thanks for any help or pointers,

- Rand



Soopafresh posted 2008 May 08 18:49
Rand, do you mean they're reduced in channels or in volume ?


Rand HOPPE posted 2008 May 08 18:51
In channels from 5.1 to Stereo. No?


Soopafresh posted 2008 May 08 19:02
Yes, indeed. The reason I did that is because if you're using the onboard mic, there's virtually no channel separation on the 5.1 track. However, all is not lost if you wish to keep the 5.1 AC3. You'll notice the batch file leaves the AC3 file intact after it executes.



So, you could always pull that into your Premiere Timeline and mute the WAV file that the script creates.

I can also write you a script which will demux the AC3 5.1 into separate mono tracks which you can import into Premiere as well. This would give you volume control over each individual channel. To be honest, each channel will probably look and sound identical.



Rand HOPPE posted 2008 May 08 19:09
Ah! Thx again!


Rand HOPPE posted 2008 May 08 19:56
Great. :P Razzin frazzin Adobe doesn't import ac3. And the .dll copy from Encore isn't working for me. The demux script would be wondeful.


Soopafresh posted 2008 May 08 20:17
Okay. Give me a few minutes.

Edit: Here you go. Place the files in the same folder as the AC3s and click on the batch file to execute



ac3_to_6_wavs.zip



machina_sp posted 2008 May 09 01:12
Hi Soopafresh,
Thanks for doing what you do best.

I'm not a pro on video stuffs, but I do own a Canon HG10.
For the past 2 months, I've been using iMovie08 to get all my video but it looks horrible with moving objects. And it's also horrible with the AIC codec cus no softwares can open it (not even Final Cut Studio 2). I managed to convert the AIC to MPEG2 (Program Stream) with Compressor that comes with Final Cut Studio 2. The size comes down to 1/3 smaller and with little loss of quality (but the colour is a bit washed out)
And i stumbled to this forum and been reading it since, and did exactly what you said..and i LOVE it.

Now my question is, what compression do you use for that video 00004.avi (12 seconds with a guy walking to a shop)?
Are you using VirtualDub too? if you do? which compression?

And also my question is, I just would like to transfer all these HG10 videos and archive it with a format that is more universal for Video Editor Softwares (Premier or Final Cut).
Would you be able to advise me what compression in VirtualDub would be the best for archiving? (Similar Quality to AVCHD and more universal Codec for Video Editor Softwares)
Please advise.
I just used DivX and Xvid compression but eventhough using the "Hi-Def" the color is a bit washed out. It's not as sharp as the "Uncompressed" from Virtual Dub. Did I do something wrong? or do you have better way of compressing the "Uncompressed" without losing too much quality? (oh and when I imported this Divx and Xvid, Adobe told me that "Unsupported audio rate in file" - wot? the uncompressed is importable, but divx and xvid can't be imported to adobe?)

Thanks in advance.


-=machina=-
the machine of God



Soopafresh posted 2008 May 09 03:44
Hi Machina, that 0004.avi was created by opening the .AVS file (which the batch file creates) in VirtualDub, then choosing the XVID codec under the compression options. The only reason I chose Xvid is because just about everyone has the codec installed on their system to play the file. But for editing in a professional package such as Premiere or After Effects, Xvid is a bad choice because of the way it compresses video (lossy). You almost always want to use a lossless codec for editing. Huffyuv and Lagarith are two codecs in the PC world which are lossless. So instead of saving with XVID compression, you'd save with Huffyuv or Lagarith.

If you're working primarily in the OS X world, you might want to look at VoltaicHD to convert the AVCHD file to a format which will be easily edited in any Mac app. Unfortunately it's shareware, but it'll save you a ton of grief. http://shedworx.com/?q=volmac-home



machina_sp posted 2008 May 09 04:21
You're a legend!
It's very fast you replied to this thread and we live in opposite part of the world.

I followed your instruction.
I decided to use Lagarith (instead of HuffYUV) because it's smaller in size and I can't really notice the difference (or maybe I'm just too tired from testing since this morning)
But personally, would you use Lagarith or HuffYUV? It seems that HuffYUV is twice bigger than Lagarith but not much different...(i don't know)
What do you think? which one would you choose? Lagarith or HuffYUV
Just for info: Lagarith have about the same size conversion like Apple Intermediate Codec (AIC).

Thanks so much Soopafresh!

ps: Just out of curiosity, why the Divx and XVid can't be imported to Adobe Premier CS3? (it says "Unsupported audio rate in file")



Soopafresh posted 2008 May 09 13:06
ps: Just out of curiosity, why the Divx and XVid can't be imported to Adobe Premier CS3? (it says "Unsupported audio rate in file")

http://forum.videohelp.com/topic287105.html

Huffy and Lagarith output should be identical, as they're both lossless codecs. Lagarith is great for a free codec. The only codec that's better is Cineform, which will run you several hundred dollars.



Rand HOPPE posted 2008 May 09 18:26
Some background, I suppose, might be helpful to future readers:

A pal and I recently shot the same event with our brand new Sony SDR-HDxxs, and I have files from both.

My pal has a mac and provided me with a .mov with Apple Intermediate Codec encoding. I've been asking here about the .m2ts file from my camera. Thanks to Soopafresh, I can happily bring a lossless (huffy) .avi and some .wavs into Win Premiere CS3.

Now I need help with the darn .mov to bring that into Premiere CS3 in as close to the same format as possible. It appears the first step must be on my g4 ibook, because of the AIC. I have been trying things with ffmpegx and Quicktime Pro, but haven't been completely satisfied with the results - thus this post.

Any ideas or suggestions?

Thanks,

- Rand



Soopafresh posted 2008 May 09 18:37
Rand, I'd post that question in the Mac forum. They'll be able to give you a more specific workflow to follow. That's a tough one to transcode into something your PC will accept. DVCPRO25 might work in Quicktime. But you'll get a better answer in the Mac forum.


Rand HOPPE posted 2008 May 09 18:50
Done. Thanks.

EDIT:

http://forum.videohelp.com/topic350637.html



direct posted 2008 May 16 14:05
MikeGuy :
cool. Super works great, and it is a single shot m2ts ==>> avi converter.

Can you please explain what exactly you do? I'm looking for a mts (or m2ts) to flv converter with possibility to reduce the quality and size. When I tried Super I got a message "BluRay video HDTV files are not supported"... Please help! Thanks!

Anyway for now I use Vegas Pro 8 to convert the mts to avi. The result is a HUGE avi file which I reduce with DivX. What I have at the end is a video clip with crappy quality. :)



machina_sp posted 2008 May 20 01:11
Soopafresh!!!
Everything was rainbow and butterfly until I just realized when you gave us that 'demuxing' script in the beginning... is the Frame Size change?
I have the original with a 1080 from HG10, but now when i have demux and transfer with Lagarith codec the resolution only become 1024x576...
Can you help?
What went wrong? I don't think it's Virtual Dub because when I opened the file and go to "file information" inside VirtualDub it says only 1024x576 instead of 1920x1080..
So my only guess is, when I ran your script it change the resolution.

Please help Soopaman!

Thanks!



Soopafresh posted 2008 May 20 08:48
Use the beta version that's 3 posts below. It includes 1920x1080 res output.


snoche posted 2008 May 20 11:21
Hi Soopafresh,

Firstly I would like to thanks you for the effort you are making to help our us.This thread has been very useful to me.

I learn a lot but I am still having a few questions:

I am trying like almost of the users to be able to edit and store the video recorded from my camera in a more compatible format but I don’t want to use huffyuv because the result files are too big. (I made a test with a 50mbytes file and the result was 2.5gb)

The original file is from a Sony SR12 camcorder
Video: MPEG4 Video (H264) 1920x1080 25.00fps [Video]
Audio: Dolby AC3 48000Hz 6ch [Audio]
Text [Subtitle]


I have upload a sample from my camera in rapidshare:
Original Footage:
http://rapidshare.com/files/116296945/20080430114007.m2ts
XVid:
http://rapidshare.com/files/116306254/20080430114007_xvid_a_1920x1080_.avi
h264:
http://rapidshare.com/files/116305350/20080430114007_a_h264_1920x1080_.avi

I would like to convert this video to no interlaced video in the same format or another video format without losing quality from the original. There is a way to do that without encoding again? Only removing the interlaced?

I have used your script and easly I can deinterlace and convert it to .avs, then I use ffmpeg to convert it to xvid or h264 but the quality is inferior to the original is a little more blured.
I tried this settings:

XVID:
:
for %%a in ("*.avs") do ffmpeg.exe -i "%%a" -threads auto -aspect 16x9 -vcodec xvid -s %videoRes% -maxrate 3500k -b 3500k -qmin 3 -qmax 5 -bufsize 4096 -acodec mp3 -ar 48000 -ab 160k -ac 2 -y "_CONVERTED\\%%~na_xvid_a_%videoRes%.avi"


H264
:
for %%a in ("*.avs") do ffmpeg.exe -i "%%a" -aspect 16x9 -threads auto -vcodec h264 -s %videoRes% -acodec pcm_s16le -ac 2 -y "_CONVERTED\%%~na_a_h264_%videoRes%.avi"


The best quality from my test is with xVid, but I observed than the resulting files are smaller than the original file, there is a way to improve the quality of the enconding even if I need to use more KB for file?

What format has better quality xVid or h264?
How I can change the settings of the ffmpg command line to improve the quality for the final video? (I don't mine time or size)
It is possible to use ffmpg to encode in lagarith?


Thank you in advance,
David



Soopafresh posted 2008 May 20 11:44
Hi David:

I'm downloading your source file to take a look.

Also downloaded the Xvid 1920x1080 you posted. Looks pretty good to my eyes.

The ffmpeg h264 command you posted above has no bitrate settings. Try this (all on 1 line)

for %%a in ("*.avs") do ffmpeg.exe -i "%%a" -threads auto -vcodec h264 -s 1920x1080 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -b 7500k -bufsize 4M -bt 256k -refs 1 -bf 3 -coder 1 -me umh -me_range 16 -subq 7 -partitions +parti4x4+parti8x8+partp8x8+partb8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -qcomp 0.6 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec aac -ab 112k -ar 48000 -ac 2 -y "%%~na.mp4"


Use this build of ffmpeg to be sure the above works:
ffmpeg.zip

I think the output is better from x264 than ffmpeg. Feed your AVS file to Ripbot264 and have a look.

Here's an x264 encode, keeping the final size below 6MB so I can post it on Videohelp.com

1920x1080_20080430114007.mp4

It is possible to use ffmpg to encode in lagarith? - No, only VirtualDub or similar

Remember, an AVCHD file is really a flavor of h264, encoded at 12,000kbps . It's pretty efficient to begin with. The most important thing is to save and store your original .M2TS files onto a hard drive and/or DVD. Enhancement technologies will improve over time and if you have your original source files you'll be able to take advantage of that.



Soopafresh posted 2008 May 20 15:20
You can try a new version of the AVCHD_Convert scripts. It includes output resolutions of 1920x1080 - both interlaced and deinterlaced. There are also "Ultra High Quality" scripts, which use Mvdegrain2 noise reduction. Unfortunately, the UHQ profiles are painfully slow. Unless you have a specific need for this (or have a Cray), just use the official version on the first page.

avchd_convert_v6_beta.zip

New Scripts Marked in Blue



snoche posted 2008 May 21 11:34
Thanks Soopafresh,

very usefull information indeed.

I download x264.exe http://mirror01.x264.nl/x264/revision859/x264.exe and I added the following command line:

for %%a in ("*.avs") do x264.exe --qp 64 --bitrate 17000 --ref 3 --bframes 3 --b-pyramid --b-rdo --bime --weightb --subme 6 --trellis 1 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --threads auto --thread-input --progress --no-psnr --no-ssim --output "_CONVERTED\%%~na_a_x264_%videoRes%.avi" "%%a"

The quality is getting better but I have two problems, first is that the resulting x264 file doesn't have audio. I don't know how to embbed the audio in the mp4 and the second is that when I move backwards and fordwards doesn't work properly, there are some settings for improve the navigation throught the file ?

what is the difference between MVDegrain2 and yadif? what nnedi do?

Thank you



Soopafresh posted 2008 May 21 11:55
Yadif and Nnedi are both deinterlacers - Yadif is faster, Nnedi is higher quality but considerably slower. Mvdegrain2 is a motion compensated noise reduction function that gets rid of some of the artifacts inherent in AVCHD video. It's incredibly slow, because it searches back 2 frames and searches forward 2 frames to determine which part of the picture is actually noise. That's a lot of work on a 1920x1080 frame.

You're going to need a few more command line utilities to create MP4 output files (all free, fortunately)

AAC Audio encoder - http://www.nero.com/eng/nero-aac-codec.html

MP4box multiplexer - http://kurtnoise.free.fr/index.php?dir=mp4tools/&file=MP4Box-0.4.5-dev.zip

You want x264 to output raw h264, which will be combined with the audio via Mp4box. Notice the .h264 extension at the end of the x264.exe line.

for %%a in ("*.avs") do x264.exe --qp 64 --bitrate 17000 --ref 10 --bframes 0 --b-pyramid --b-rdo --bime --weightb --subme 6 --trellis 1 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --threads auto --thread-input --progress --no-psnr --no-ssim --output "%%~na.h264" "%%a"

for %%a in ("*.wav") do neroaacenc_sse.exe -q 1.0 -if "%%a" -of "%%~na.m4a"

for %%a in ("*.h264") do mp4box -add "%%a" -add "%%~na.m4a" -fps 25 "%%~na.mp4"



snoche posted 2008 May 21 12:31
Wow, this will be very helpfull!

And to allow faster navigation? something about more keyframes ? With xvid and the huffyuv versions I can go backwards and forwards very well but with the H64 I can't.

I can upload more source files if you need them to have a look, but I am very happy with the quality of x264 and a bitrate of 18000.

For the audio if it is possible put a the command for AC3 and mp3, I think I can't use AC3 in my premier, even copying the dll from encore.


Top quality thread, Thanks again!!!

David



Soopafresh posted 2008 May 21 13:22
Lemme understand, are you transcoding these videos in order to edit in Premiere? In that case, h264 and the MP4 container really isn't the way to go. They're considered "final output format". That's why you're having trouble scrubbing through most likely. You'll suffer a lot of quality reduction if you use Xvid or h264 as your editing codec. Considering all the work you're doing to make this footage look top notch, you need to look at using a lossless alternative. I'd encourage you to use a codec like Lagarith. I know it takes up a lot of space initially - only until you render your footage to your final format, which can then be h264/Xvid/Mpeg2/whatever. You'll need a large hard drive to store the temporary files, but hard drives are cheap. The workflow would be like this:


AVCHD--->LAGARITH--->PREMIERE--->WHATEVER FINAL OUTPUT YOU WANT--->DELETE LAGARITH FILE(s)


You can batch convert to Lagarith via AVS2AVI http://www.moitah.net/download/latest/AVS2AVI.zip

1) Install Lagarith codec

2) for %%a in ("*.avs") do avs2avi "%%a" "%%~na.avi" -c LAGS -e


Finally, Vegas 8.0 and later can directly edit .M2TS AVCHD files



snoche posted 2008 May 21 13:45
I want to be able to watch my videos backwards and forwards repeatedly as fast as possible, not for edit but for watch it in media player classic as a reference for create my animations etc... Also I want they have very good quality in case I need to grab one of the frames as a texture to map a 3d model, I can't grab the image from m2ts because is interlaced. So I thought that x64 with audio is good format to use, but needs to be able to move frame a frame if possible.

This Lagarith command line will be perfect in case I need to edit something with more detail. Thanks.



Soopafresh posted 2008 May 21 13:54
Gotcha. See if VLC might work as a better player for what you want to do.


Do you have CoreAVC installed? That's a very efficient codec to playback h264. It's also multi-core aware. It'll also play your .M2TS files quite nicely. Also has a deinterlacer built in.

Also regarding your X264 encoding syntax - "The I frame stores the entire image and so are the least compressible. Video seeking (when you skip to a part of a video) requires I-frames, as otherwise a symptom called seeking lag will occur when the video is blank until the next I-frame is encountered."

http://www.digital-digest.com/articles/x264_options_page2.html

Try changing your x264 syntax to --ref 10 --bframes 0

EDIT - I posted the MP4box syntax a few posts above.



bstandards posted 2008 May 21 22:10
Soopafresh :
You'll need a large hard drive to store the temporary files, but hard drives are cheap. The workflow would be like this:


AVCHD--->LAGARITH--->PREMIERE--->WHATEVER FINAL OUTPUT YOU WANT--->DELETE LAGARITH FILE(s)


You can batch convert to Lagarith via AVS2AVI http://www.moitah.net/download/latest/AVS2AVI.zip

1) Install Lagarith codec

2) for %%a in ("*.avs") do avs2avi "%%a" "%%~na.avi" -c LAGS -e


This is exactly, what I want to do, but I don't really understand your directions? I installed lagarith, but what's step 2? You say AVCHD-->Lagarith--->Premiere, but shouldn't it be AVCHD-->avs-->Lagarith? Thanks for everything else, your replies are very helpful.



Soopafresh posted 2008 May 22 03:19
The easiest thing to do is to open the AVS file with virtualdub, then choose








snoche posted 2008 May 22 10:32
I am almost there, ;)

My last problem still with the video seeking. I can go forwards but I can not go backwards, I don't know if is a limitation with x264.

I am using MPC with coreAVC works very well, but it change my color. If I open the file with media player is the same color than the original file but if I open with MPC uses the coreAVC and change the color profile, is possible to avoid changing the color profile with coreAVC?



Soopafresh posted 2008 May 22 10:39
Did you see my suggestion about changing the x264 settings to --ref 10 --bframes 0

You can't run both Media Player and Media Player Classic simultaneously to check color differences. You can't run two instances of MPC either, as they use different overlays (if I recall) and therefore won't give you an indication of color difference.



snoche posted 2008 May 22 11:54
Yes I saw it, It works much better witht --ref 10 --bframes 0 but not like in xvid, is much faster and I can press left key to go one frame back.

The color differences are obvious, is like the image is more contrasted than the original, only happen with x264 not with xvid or huff.



David.



Soopafresh posted 2008 May 22 12:08
Hmmm. Well, then use Xvid with a high bitrate

ffmpeg.exe "input.avs" -r 25 -vcodec xvid -s 1920x1080 -aspect 16:9 -maxrate 9800k -b 9000k -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -bf 2 -flags +4mv+trell -aic 2 -cmp 2 -subcmp 2 -g 300 -acodec mp3 -ar 48000 -ab 224k -ac 2 -threads auto -y "output.avi"



direct posted 2008 May 28 11:39
Hi Soopafresh, I'm using your software (v5) to convert to avi, because it seams faster than Vegas Pro 8. But what codec do you use to reduce the avi size at the end? I'm using DivX and it does the job but reduces much the video quality too... Can you recommend some other codec? Thanks!


Soopafresh posted 2008 May 28 13:58
Hi direct -

It depends on so many factors, it's hard to give you a direct answer. h264 is the current darling of the codec world. It's great, but it's slow to process. If you're going to edit the AVI in Vegas, then use a lossless codec like Lagarith.

You should be able to get some outstanding results with Xvid. What are your settings? What program are you using to convert your AVS file to Xvid? Are you converting to 1920x1080 or 848x480? The bigger the size, the more bitrate you have to give it.

Low Bitrate Artifacts look like this in Xvid:


When you give it a higher bitrate, it looks better:



direct posted 2008 May 29 17:38
To tell you the truth I'm not sure what I'm doing myself. :) First I convert the mts to avi with your software. The result is huge avi (2 GB mts or 30 minutes video is converted to 62 GB avi). After that I drag and put the avi to the DivX converter and the avi gets smaller to 300 MB. There is some loss of the quality which is normal but it takes a lot of time and also place on the hard disk. That's why I decided from now on to use only the "Render As" option of the Vegas. But I can not get the settings! Can you help please!

Here are the parameters of the original video:

Streams
Video: 00:00:14.515, 29.970 fps interlaced, 1440x1080x32, AVC
Audio 1: 00:00:14.515, 48,000 Hz, Stereo (stereo downmix), Dolby AC-3
Audio 2: 00:00:14.515, 48,000 Hz, Stereo, Dolby AC-3

What settings should I use for best result?





Soopafresh posted 2008 May 29 18:57
1)Download and install the Lagarith codec . This will allow you to create a much smaller file than the 62GB one you mentioned.

2) Open up your AVS file in VirtualDub and save the AVI with the Lagarith codec







Once you've created the Lagarith encoded AVI, you can open it and edit it in Vegas. Once you're ready to render to XVID, I'd suggest the following settings

Choose either 848x480 or 720x400 dimensions. This will maintain the proper aspect ratio.


Save with a high bitrate in XVID - 3500 should be plenty





CarstenKA posted 2008 Jun 02 02:06
Hi all,

i'm using the script for creating the *.avs from the *.mts and i use VirtualDub for creating the *.avi. The result looks pretty good for the first minutes of the video, but then the image contains a lot of big blocks flickering (i'm sorry, my english isn't that good to describe it perfectly). I'm using DivxPro with 1080HD as profile, Insane Quality as encoding mode and leave all other settings as default. Any suggestions what I'm doing wrong?

And another question: The "Select Video Compression" dialog shows Divx Codec (1 Logical CPU). Since i have a QuadCore, is there some other version of Divx or another codec that takes more profit from 4 Cores (with Divx the usage of each core is about 50% in average)?

Regards
Carsten



Soopafresh posted 2008 Jun 02 02:33
Hi Carsten,

You have to buy the Pro version of DivX to get MultiCore Capability. http://www.divx.com/divx/whybuydivx.php

DivX Pro Codec
DivX Pro Codec includes the most advanced version of the DivX video codec so you can create the highest-quality DivX files using DivX Converter or another third-party encoding tool. With DivX Pro Codec you get:

* Higher performance, especially on HyperThreaded, dual core and dual CPU (SMP) systems
* HD conversion at up to 1080p resolutions
* Six preset encoding modes to optimize visual quality and performance


I don't know DivX settings very well, but I'm familiar with Xvid and there is a version with Multicore Support

Read this thread http://www.videohelp.com/forum/archive/xvid-1-2-multicore-t337030.html

The problem isn't so much the speed of the encoder, it's the processing that happens in the .AVS file, especially if you choose the HQ batch file. High quality deinterlacing of 1080i source will take time.




CarstenKA posted 2008 Jun 02 04:56
Hi Soopafresh,

thanks for your comments so far. I already own DivxPro, but it seems to support really only 2 cores, not 4 (tested in a E8400). But i'll try XVid when i'm back home.

Do you have any suggestions for my first problem with the artefacts in the video? Some changes to your script?

Regards
Carsten



Soopafresh posted 2008 Jun 02 05:23
I don't think it's my script, otherwise there would have been complaints a long time ago :lol: Then again, anything is possible.

Try this for an experiment:

1) Install Lagarith codec http://download.videohelp.com/download/Lagarith_1315.zip (right click on .INF file to install)

2) Open AVS in VirtualDub and save with Lagarith codec (make sure you have a lot of disk space, as this is a lossless codec)

3) Play the Lagarith AVI file back and look for problems.

If there are still artifacts, post a screen capture of the error.

Edit: Does it look like this?

2_xvid.avi

Do you have a Panasonic SD9/HS9 ?



CarstenKA posted 2008 Jun 02 07:20
Yes, somewhat like that, but much worse.
No, i own a Canon HF100.



Soopafresh posted 2008 Jun 02 08:14
I found an mts file made with the HF100. I'll test it out.

You try it out, too- http://www.savefile.com/files/1512625



CarstenKA posted 2008 Jun 02 11:43
I tried it with Lagarith, but the result is the same, i attached a screenshot. Of course the *.mts is fine. The effect only occurs in videos longer then 10 minutes, so the sample isn't useful.

Regards
Carsten




Soopafresh posted 2008 Jun 02 12:39
10 minutes... I think I know what the problem is. Thanks very much for testing this out. Vilen Danke

I'm going to have contact the author of DGavcIndex to report a problem.

Would you test this batch file out? Unzip and put it in the same folder as the rest.

test_multi_demux_mts_hq__pal_1024x576.zip

If that doesn't work, then I'd recommend VoltaicHD . It's commercial software, but only $30



CarstenKA posted 2008 Jun 02 16:38
The *.avs created with the new script produces "Avisynth open failure. Video must be YUV." when opened in VirtualDub.


Soopafresh posted 2008 Jun 02 17:52
Would you try this one?

test_multi_demux_mts_hq__pal_1024x576-v2.zip



CarstenKA posted 2008 Jun 03 00:15
After i corrected a typo in the script (you forgot a "t" in converttoyv12), the same error as above occurs.


Soopafresh posted 2008 Jun 03 01:42
Which codec are you using to play your MTS files - CoreAVC , FFdshow ?


CarstenKA posted 2008 Jun 03 02:52
Hm, i'm using Pixela ImageMixer Player, don't know which codec. When i'm playing the mts with Nero ShowTime the image is also disturbed.

I also copied a small piece of the video (where the problems occured in the long version) and with that small clip everything was fine.



chronic64 posted 2008 Jun 05 13:49
i tried to convert a *.mts file from my canon hf100, it seems to run through your script just fine, i was using:
_multi_demux_mts_HQ__1920x1080.bat
from the v6 beta, but the *.avs file wont open in virtualDub i get this error,
AVI Filter import error: (Unknown) (80040154)

i want my files to end up as Lagarith - i also tried the command using avs2avi, but that didnt do anything, again probably because there is something wrong with th .avs

i also tried the huffy scripts, and that one executes properly, making the .avi, but the file is just black with audio, i do have the huffy codec installed, so im not sure what the problem is there



Soopafresh posted 2008 Jun 05 14:34
Reinstall Avisynth . Try 2.58RC1

http://downloads.sourceforge.net/avisynth2/AviSynth_080527.exe?mo ... g_mirror=0


Check that you have msvcr71.dll and msvcp71.dll in your \Windows\system32 directory

You can get them at
http://www.dll-files.com/dllindex/dll-files.shtml?msvcr71
http://www.dll-files.com/dllindex/dll-files.shtml?msvcp71



What's more likely is some codec you installed is creating grief for VirtualDub. If you google your error message, you'll see quite a bit of info regarding this.



chronic64 posted 2008 Jun 05 15:31
got it working, VirtualDub wouldn't open the .avs because i was trying to use the x64 version of virtualdub


CarstenKA posted 2008 Jun 06 01:27
I tried the new version of AviSynth (2.58) and it's much better. About 40 minutes of the video are fine and the problems start after that time (instead of 6-8 minutes). So to me it seems to be the problem that AviSynth gets "tired" after some work... (perhaps a memory leak)

Carsten



Soopafresh posted 2008 Jun 06 10:33
That's interesting. The default memory usage settings in the new AVisynth are 50% of total RAM. Try adding a SetMemoryMax line to the top of the AVS script - Make the value 3/4 of your total RAM -

SetMemoryMax(768) #if you have 1GB RAM



CarstenKA posted 2008 Jun 07 16:09
I tried this, but the behaviour was exactly the same, after about 40 min the video gets corrupt.


Soopafresh posted 2008 Jun 07 20:36
The only other idea I can think of would be to split your files into 30 minute segments with TSremux and transcode in pieces.


Regis2 posted 2008 Jun 09 09:05
Hi, first time post.

I'm hoping I can get some assistance converting AVCHD from a Panasonic camcorder recording on SD. The files coming from this camcorder have .MTS extensions.

We purchased 2 camcorders at our university for faculty to borrow so they can capture and edit video. As you're no doubt aware, this is not as easily done as said. Ultimately we would like for any faculty member to be able to edit in Movie Maker since it's free and on every computer on campus.

Using the tools described by Soopafresh at http://forum.videohelp.com/topic346331.html (Thank you, thank you, thank you!)I'm able to convert to uncompressed avi. With an additional tweak I end up with a 4:3 uncompressed avi. Being uncompressed, however, these files are huge and won't play back smoothly on many computers on campus.

I've tried using the Panasonic DV codec to convert directly to the DV avi format, but my skills with avisynth scripting and Virtualdub are lacking.

Here's the .avs generated by the .bat provided by Soopafresh used with Virtualdub to get the uncompressed avi...

loadplugin("dgavcdecode.dll")
load_stdcall_plugin("yadif.dll")
loadplugin("audiolimiter.dll")
video=AVCSource("00000.dga")
audio=wavsource("00000.wav").convertaudiotofloat().normalize(0.95).linearlimiter(1.5)
audiodub(video,audio).fadein(0).fadeout(0)
separatefields().selecteven()
Lanczos4Resize(960,540)
Crop(120, 0, -120, -0)

Can anyone tell me what to add to get a DV avi output? Is the Panasonic DV codec the best option? If not, which one?

At some point, someone will ask to edit using Vista in widescreen. Is there an HDV codec that can be substituted for the DV codec?

Thanks in advance for any help.



Soopafresh posted 2008 Jun 09 12:36
Hi Regis2, welcome to the forums

If you can post 5-10 seconds of an original MTS file from your camera, I can help you out. I've never seen AVCHD in SD format, so I have to test a few things. I'll write you a script to make it easy for you, just post a short bit of MTS file somewhere.

The choice of codec to save your file in depends on many things. You have to consider who is going to be looking at the video, and on what type of computer.

- What do you want to do with the converted files? Do you plan on distributing them to others to play on their computers?

- Do you want to play your files on a DVD player?

- Do you want to play the files on a Macintosh?

In addition to DV, there are several different codecs which will provide you with high quality results - Xvid and h264 are the popular ones, BUT you have to install the codec on the computers you wish to play the files on. This is easy to do, but I don't know what your IT policy is for installing codecs.

Mpeg1 is a format which can be played on any computer, BUT the file will be bigger than Xvid or h264. For the sake of compatibility, it will do the job.

There aren't too many apps which allow you to save in HDV format. TmpgencXpress will do it, but it is a $100 piece of software.

* Why are you shooting in SD format? If you shoot in HD, the quality will be much, much better when you resize down to SD dimensions with the script. Plus, you'll have 16x9 aspect ratio.


Good times :lol:



Regis2 posted 2008 Jun 09 13:47
Thanks Soopafresh.

Here's about 10 seconds straight from the SD card. It's from a Panasonic AG-HMC70 camcorder.

The plan is to let faculty check out the camcorders to record to their own SD cards. Afterwards, they're responsible for editing and distribution according to their own needs.

I'm looking for a solution that converts the .MTS files to a format editable in Movie Maker, since everyone on campus has that on their computer. At that point it will be up to the individual user to save the video to a format most suitable for the purpose they have in mind.

00002.m2ts



Regis2 posted 2008 Jun 09 13:49
A little more clarification. Not SD format, this camcorder won't even shoot in SD. I meant AVCHD to an SD card.

Straight off the card the files are .MTS. Copied using the Panasonic software they're .m2ts.

Posted file is about 3 sec. The 10 sec file was about 17Mb.



Soopafresh posted 2008 Jun 09 14:30
OK. Looks pretty standard. If you want your final format to be Windows Movie Maker Compatible, then VirtualDub will still work. You just have to choose the proper codec





Which ends up giving you this:

test.wmv

There's also a more sophisticated WMV transcoder which accepts AVS files. Depends on your requirements.

http://nic.dnsalias.com/wm9enc.html

Finally, I don't think you need to do any cropping of your video. My scripts output proper pixel aspect ratio which is correct with the WMV format. Depending on your output size requirements, other valid dimensions are:

1920x1080
1440x810
1280x720
1024x576
960x540
848x480
720x400
640x352
480x272
320x180

The output dimensions are in the batch file(s) on this line. You can modify that to whatever you want the size to be, as long as you adhere to the numbers above.




Regis2 posted 2008 Jun 09 14:56
Thanks. Fantastic. You make it all seem so simple.

However, I don't get the Windows Media codec in either Virtualdub or VirtualdubMod. How did you get that option?

Can the Windows Media encoder be accessed via the .avs script?



Soopafresh posted 2008 Jun 09 15:17
However, I don't get the Windows Media codec in either Virtualdub or VirtualdubMod. How did you get that option?

They should show up after installing this (might require a reboot):

http://download.microsoft.com/download/9/8/a/98a6cb2d-6659-485e-b ... Msetup.exe

Can the Windows Media encoder be accessed via the .avs script?

An AVS script is just a file that you can feed to many different kinds of encoders - as long as the encoder knows how to deal with AVS files. I don't know if the official Windows Media Encoder accepts AVS files, but you have many options in the event it doesn't (see the WMnicEnc app above). I don't use the WMV format very much, so I can't help you with specific settings, other than "let your eyes and ears be the judge".

There's also a command line method to feed an AVS script into a scripted WMV encoder. Instructions are here:

http://kevo777.wordpress.com/tag/avisynth/

Here's a comprehensive FAQ on WMV and program options. Really good and useful information:

http://forum.doom9.org/showthread.php?t=112634



Regis2 posted 2008 Jun 09 15:34
Again, thanks. You're obviously a master.

Actually, what I meant was, can the Windows Media option in Virtualdub be accessed via the .avs script.

In other words, can the script also select the Windows Media compression option in Virtualdub?

What would be added to the script in order to access the Windows Media option?

I tried saving using the Windows Media compression option and it worked very well. If that option can be accessed via the script, that's one less step we would have to put people through in order to get to editable video.



Soopafresh posted 2008 Jun 09 15:43
Ah, gotcha. Nope. That would be nice, but your end users are going to have to pick it from within VirtualDub, or you'll have to fiddle with one of the alternative methods I mentioned in my previous post.

There's also a commercial product which will convert AVCHD to WMV format - VoltaicHD . If you guys have the $30 per machine budget, it's incredibly simple to use.



Regis2 posted 2008 Jun 09 16:00
Thanks anyhow, you've been a great help.

I'll pass along VoltaicHD as an option to the powers that be.



Carste