Forum archive - Mini Guide - AVCHD to Anything Using DGAVCdec

http://www.supermediastore.com/



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



Mini Guide - AVCHD to Anything Using DGAVCdec

Soopafresh posted 2008 Feb 18 15:31
Edit: See another automated method to do this http://forum.videohelp.com/topic377680.html


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_v9.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). There's also a Directshow method to get around this problem. 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 (and Now Youtube HD) ******

*Note: If you want a GUI interface, the latest version of Xvid4PSP will do this for you. You still have to feed the app .MTS extension files. .M2TS isn't working yet.

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



CarstenKA posted 2008 Jun 09 16:22
Hi Soopafresh,

i used tsremux to split the file, but the resulting mts looks as bad as the avisynth video after 40 min...

Carsten



Soopafresh posted 2008 Jun 09 16:28
Carsten - Hmmmmmm. It might be the file. Well, you can try another app - TSmuxer to split and cut . You MUST give your MTS file an .M2TS extension for TSmuxer to recognize the file.

I wonder if anyone can verify the same problem on that model of Camcorder. Here's a dedicated thread on the HF-100. Perhaps someone is experiencing the same thing or they can try the same experiment on a large file.

http://www.avsforum.com/avs-vb/showthread.php?t=1014305



CarstenKA posted 2008 Jun 11 01:47
Slowly i get discouraged... TSmuxer has the same problem. I also tried another clip with a length of 26 minutes and the Avisynth/VirtualDub combination produces corrupted video after 6 min...

I made some test with Ulead VideoStudio 11.0 trial, but even after importing the video without any conversion there is a "shadow" in it. See the attached picture, left side is in VS, right side the converted output of AS/VD.

Carsten




Soopafresh posted 2008 Jun 11 02:05
I made some test with Ulead VideoStudio 11.0 trial, but even after importing the video without any conversion there is a "shadow" in it.

It looks like the Ulead isn't deinterlacing the footage. Or it is, but it's doing a bad job.

I use CoreAVC Pro ($15) to play AVCHD files on my PC. It's a DirectShow plugin. Look at the difference on this bad MTS file between DirectShowSource (using CoreAVC) and the DGavcsource footage.


core_avc.avi

dgavcsource.avi

CoreAVC is doing a much better job of decoding the problematic .MTS file. It might be worth a try for you. They have a 14 day evaluation copy: http://www.coreavc.com/index.php?option=com_content&task=view ... ;Itemid=59



lczarne posted 2008 Jun 11 17:26
I tried your way to convert my clip from sony hdr-sr11 in MTS but the files I get are very unsatisfactory (or maybe my computer is to slow to play it). I'd be very grateful if You could help me. Could you convert those two small clips (they are in different quality) and send it back to me(so i could see if it's problem of my hardware, or if i'm doing something wrong)?



cl.zip



Soopafresh posted 2008 Jun 11 17:43
Okay, I'll test it out now.

You shot your footage in low light, so there is a lot of noise.

I saved them as Xvid and I ran noise reduction on the files.

1.avi

4.avi


Record something when you are outside and try it.



lczarne posted 2008 Jun 12 09:16
Noise is not my problem. the files you send are good, but when i'm converting those mts files with sripts, you showed on the beginng of this topic, i get this (and some other small files):

clips.zip



Soopafresh posted 2008 Jun 12 11:02
The clips.zip file you posted won't download - 404 Error

Videohelp.com lets you post files only up to 6MB in size. If that file is bigger, just post it to megaupload.com and post the url.



lczarne posted 2008 Jun 12 17:50
Sorry for that. this one is smaller.

clips.zip



Soopafresh posted 2008 Jun 12 19:28
The .AVC file isn't needed after you're done converting to Xvid. The .WAV, .AC3, and .AVC files stay in the folder until you run the batch file the next time. The script just keeps them in there in case you want to use them in your editing program.

Are you using the latest version of the scripts? Try this one

http://forum.videohelp.com/images/guides/p1814962/avchd_convert_v5.zip

Since you live in Poland, your camera is probably PAL standard, so you want to use

_multi_demux_mts__PAL.bat

_multi_demux_mts_HQ__PAL.bat

Your output dimensions will be 1024x576 25 fps with PAL footage

The Xvid codec inside VirtualDub looks better than the one that's in FFmpeg or Mencoder

Here is an example of the _multi_demux_mts_HQ__PAL.bat batch file results. I loaded the .AVS into VirtualDub and did a 2 pass XVID conversion at 2000kbs 1024x576 25fps:

00004.avi

Here's the original .MTS file: http://momupload.com/files/98219/00004.mts.html



lczarne posted 2008 Jun 13 11:16
Ok. Great, everything works now. (I have NTSC cam by the way). Last question: how to remove this, automatically added, fade to black effect on the beginning and at the end of the clip? This clip you converted (01.MTS -my clip) doesn't have this effect but the one with blue car has it.


Soopafresh posted 2008 Jun 13 11:23
Open the .BAT files with Notepad and remove this section:






lczarne posted 2008 Jun 13 11:49
Thanks! Everything works fine.


Regis2 posted 2008 Jun 16 11:34
Hey Soopafresh. I got my boss, Dana, to help me out a bit and we came up with this batch file to come closer to automating the whole process. The "1PassVBR100-80.vcf" can be any saved settings .vcf file. Feel free to use and modify. Dana says he will work on a GUI. He's very busy so time will tell.

test03.bat



Soopafresh posted 2008 Jun 16 12:18
Thanks, man. I'll give it a lookover. :)


dererik posted 2008 Jun 19 07:00
Great work!
I use your latest sources to convert mts files from a Canon HG10. Your script runs with no error messages, unfortunalty I cannot open the *.avs file. VirtualDub (version 1.81) says: ACVSource: No GOPs found (no IDRs or recovery points). *.avs, line 4.
I tried your version 4, 5 and 6 alpha.
Any ideas?

thanks in advance, erik



Soopafresh posted 2008 Jun 19 07:44
Hi dererik:


1) Test it with this MTS file. It's from an HG10: http://file.meyersproduction.com/hg10/00011.MTS.zip

2) Try this version below. If it doesn't work, then I need you to upload a few seconds of your MTS file

avchd_convert_va.zip



dererik posted 2008 Jun 19 10:50
Hi Soopafresh

thank you very much!

- your MTS does well
- my MTS files with a size less then say 200 MB do well, the bigger ones not.

so the MTS files in general will do, but not the bigger ones?



dererik posted 2008 Jun 19 11:27
Hi Soopafresh

Looks like DGAVCIndex.exe does something wrong. I looked at the *.dga files and found these differences:

The working one:

#########################
DGAVCIndexFile6

00011.avc
C:\tools\video\avchd_new\libavcodec.dll

STREAM 0
FO 2

LPOC 0
SPS 7
PPS 58 0
IDR 154
FRM 7 0
PIC 2
PIC 1
FRM 6 -2
PIC 2
PIC 1
FRM 6 -1
PIC 2
PIC 1
FRM 5
#############################

This one does not do:

#############################
DGAVCIndexFile6

00006.avc
C:\tools\video\avchd_new\libavcodec.dll

STREAM 0
FO 2

LPOC 0
SPS 7
PPS 60 0
SPS 502907
PPS 502960 0
SPS 1004116
PPS 1004169 0
SPS 1505328
PPS 1505381 0
SPS 2008139
PPS 2008192 0
SPS 2509582

######################

something is missing..



Soopafresh posted 2008 Jun 19 12:03
Would you try this one?

avchd_convert_vb.zip



dererik posted 2008 Jun 19 12:46
thank you!

Still the same, No GOPsn no IDRs found by Avisynth.

When I start the conversion process with DGAVCIndex.exe and use the *.avc files xport.exe creates it says:

libavodec errors:
1. B picture before any references, skipping

2. deocde_slice_header error

but this happens only with files > 100 MB

regards
erik



Soopafresh posted 2008 Jun 19 14:30
One last try: This version does not use Xport.exe and does the indexing directly on the .MTS file

avchd_convert_vc.zip



dererik posted 2008 Jun 19 15:24
sorry, all the same, does not work with files larger then 100 MB.
Seems to be an error with libavcodec.dll or dgavcdecode.dll.

Thank you very much for all your work!

erik



Soopafresh posted 2008 Jun 19 15:38
:( I'm working on a very fast method of AVCHD to AVI via FFmpeg . Current builds of ffmpeg.exe create output files that play at half speed, however. Once they fix this, we'll be able to convert at 40-60 fps.

I'll ask on the Doom9 boards for help on the large file issue. However, neuron2 (author of DGavcdec) is going to request a test file to replicate the problem.



bayme posted 2008 Jun 19 16:11
Soopafresh :
:( I'm working on a very fast method of AVCHD to AVI via FFmpeg . Current builds of ffmpeg.exe create output files that play at half speed, however. Once they fix this, we'll be able to convert at 40-60 fps.

I'll ask on the Doom9 boards for help on the large file issue. However, neuron2 (author of DGavcdec) is going to request a test file to replicate the problem.

What I'm mostly missing is a nice sharpening filter post resize (like the simple one in virtualdub, when used with a slider it's quite good). Also, output in mkv container with x264 CRF encoded video and nero aac vbr audio would be nice.



Soopafresh posted 2008 Jun 19 16:15
bayme - look up Limitedsharpenfaster

You can also try transcoding with AutoMKV . Feed the AVS file that my batch file creates into the program.



dererik posted 2008 Jun 20 01:03
Soopafresh, neuron2

I will upload two files here (should be done in an hour):

big one, not working: http://www.erik.m13s10.vlinux.de/temp/00006.MTS

30 MB, same camera, does fine: http://www.erik.m13s10.vlinux.de/temp/00014.MTS

thanks for all your work
erik



Soopafresh posted 2008 Jun 20 02:15
Thanks, erik.


Soopafresh posted 2008 Jun 20 10:16
erik, I downloaded the 00006.mts file. Definitely something wrong . It isn't the size of the file, as I also have a 200MB .MTS file which works properly.

I've been reading a little bit about HG10 file transfer from the camera to your computer hard drive. There are supposed to be two ways to do this - via the Canon backup utility or copying from the \AVCHD\BDMV\STREAM MTS files straight to your hard drive. Can you test both ways and see if there is a difference?

thanks. :)



dererik posted 2008 Jun 20 12:24
Soopafresh,

bad luck, we used the camera at a scientist meeting and copied everything via USB. So, the error with the bigger files should also occur in the smaller ones - all the same method.

At the moment I do not have the possibility to test with the camera, only a harddisk full of mts -;

thanks for all your work!
erik



Soopafresh posted 2008 Jun 20 14:14
No problem. I'm just wondering how 2 files coming from the same camera with the same settings could be so different. :? This is what we need to determine. The problematic MTS file is missing IDR keyframes, so DGavcIndex and Libavcodec can't index it properly.

And even trying to convert it via DirectShowSource and CoreAVC leads to this result:


00006.avi



dererik posted 2008 Jun 20 15:16
When I open the *.mts in Vegas it is quite ok, in your avi the video is much faster then the audio. I will post the vegas result.

The clip is about 3 min in time, your avi shows all the video in fast motion and the audio unchanged, strange.

erik



dererik posted 2008 Jun 21 02:37
Soopafresh, here is the converted mts (30mb):

http://www.erik.m13s10.vlinux.de/temp/test2.mpg

sorry, the content is really boring -; the video is nearly always the same, maybe that is the reason there are only few IDR keyframes?

Vegas says:

General
Name: 00006.MTS
Folder: C:\tools\video\avchd_convert_neu3
Type: MPEG-2 Transport Stream
Size: 183,69 MB (188.098.560 bytes)
Created: Donnerstag, 19. Juni 2008, 21:52:38
Modified: Sonntag, 15. Juni 2008, 12:12:40
Accessed: Samstag, 21. Juni 2008, 08:50:16
Attributes: Archive

Streams
Video: 00:02:45,120, 25,000 fps interlaced, 1440x1080x32, AVC
Audio 1: 00:02:45,120, 48.000 Hz; Stereo (stereo downmix), Dolby AC-3
Audio 2: 00:02:45,120, 48.000 Hz; Stereo, Dolby AC-3

ACID information
ACID chunk: no
Stretch chunk: no
Stretch list: no
Stretch info2: no
Beat markers: no
Detected beats: no

Other metadata
Regions/markers: no
Command markers: no

Media manager
Media tags: no

erik



Soopafresh posted 2008 Jun 21 04:52
That's OK about the content :lol: I want to help you with the big files, but I think you might have the solution by importing them into Vegas and rendering to your output format of choice.


bill5 posted 2008 Jun 21 12:54
Hi,
I have a Canon HG10 that records in m2ts. format. (I can adequately edit and burn these to DVD with Ulead Movie Factory that was included with the camera.) I am really a novice and I would like to convert these m2ts files to a "You Tube" friendly format, such as wmv or avi. Is there a really simple tool to make this conversion? (I know that there are some pretty sophisticated tools discussed in this thread, however, implementation thereof is way over my head.) Really looking for a simple solution/tool, if there is such a thing.
Thank you very much!
Bill



Soopafresh posted 2008 Jun 21 13:16
Hi bill, try the Vimeo edition at the bottom of the first post in this thread. Make sure your file has a .MTS extension.

If you want to make conversion to WMV absolutely simple, get a copy of VoltaicHD for $30



bill5 posted 2008 Jun 21 15:02
I'll give the Vimeo edition a try.
I've been the Voltaic HD route. When I attempt to convert to .avi, the converted file consists of just a few seconds of the original m2ts file. When I try to convert to .wmv, the resulting file is the full length is stretched vertically. I've followed their instructions for this, as stated on their FAQ with no success. They've been unable to resolve either issue, though they've tried.
Since I can burn my m2ts files to DVD, we're currently attempting a conversion of tje resulting VOD files to avi.
Thank you for your quick response and willingness to help :)



bayme posted 2008 Jun 22 08:59
Soopafresh :
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.
Most new camcorders record in progressive formats, there is no interlacing on the MTS files from my Canon HF 10, if I record in 25 fps FXP (1080p).

Maybe put another version of your scripts online without deinterlacing, with a slight unsharp mask filter?

Soopafresh :
_multi_demux_mts__PAL.bat

_multi_demux_mts_HQ__PAL.bat

Your output dimensions will be 1024x576 25 fps with PAL footage
It's more logical to use the exact half of the source (better divides with Lanczos4Resize), so to go with 960x540 pixels at 25 fps (from 1920x1080 PAL sources).

I think I'll release my own version of this script soon. I see too many settings I don't agree with :-)
Thanks for the idea.



Soopafresh posted 2008 Jun 22 09:52
It's more logical to use the exact half of the source (better divides with Lanczos4Resize), so to go with 960x540 pixels at 25 fps (from 1920x1080 PAL sources).

Not if you're planning to encode into PAL DVD format. Then you'd end up doing 2 vertical resizes.

I think I'll release my own version of this script soon. I see too many settings I don't agree with
Thanks for the idea.


Go ahead. I'll happily get this thread closed and then it can be all yours. :D



bayme posted 2008 Jun 22 10:30
Soopafresh :
It's more logical to use the exact half of the source (better divides with Lanczos4Resize), so to go with 960x540 pixels at 25 fps (from 1920x1080 PAL sources).

Not if you're planning to encode into PAL DVD format. Then you'd end up doing 2 vertical resizes.
Yes, I see your point. You mean 576p. To be honest, I think the playback media restrictions are slowly dying. (For me they are anyway.) It's all going to be data playable hardware, from HDD, in the future. (Is my prediction.) So it doesn't really matter what the resolution is anymore, the bigger the better of course..

Did you put an old ffmpeg version in your packages? Because you use -acodec aac, while for the new ffmpeg releases it needs to be -acodec libfaac. Also, you might want to raise the audio-rate a little for the vimeo script. I mean, vimeo re-encodes it again, which would mean a third lossy compression of the source. I'd say at least -ab 112k



Soopafresh posted 2008 Jun 22 10:39
Thanks bayme. I just upped it to 160k so the audio doesn't suffer after the transcode to flash by Vimeo.


Soopafresh posted 2008 Jun 26 23:53
Updated to V6:

-Latest DGindex and Xport executables
-More output choices in the batch files


Updated Vimeo version to use X264 instead of ffmpeg



ronpub posted 2008 Jul 01 04:20
Soopafresh, thank you for your work.

What i wanted to do:
- Automate conversion of mts file to compressed deinterlace HQ ones to store. The videos are small. Some with movements then I choose mcbob (nnedi). Very slow (up to 0.35fps) but don't care so much, the quality is great.
- There won't be edition and each computer on the network should read it easily, then I prefer to store with x264.
Moreover the videos could be distributed to person whom computers could be quite old. Then I wanted the creation of mpeg1 files too but in lower resolution.

x264 mod:
I wanted high quality then I set --qp 16 instead of --qp 64. But i'm not really sure of it.
I added --sar 4:3 to get the video displayed 16:9. That is strange for me. The original frames are 1440x1080 (SAR 4:3) and should be displayed 1920x1080 (DAR 16:9). Why put a setting at 4:3 to get the good dar and not 16:9 ?

What I didn't manage to do:
- First, convert to lagarith (no sound with avstoavi)
- Convert from lagarith or huffyvu avi to x264 (using x264.exe). Codec issue.


That is my script:
:

del *.aac
del *.h264
del *.avc
del *.dga
del *.ac3
del *.wav
del *.avs
del *.log

cls

or %%a in ("*.mts") do xport -h "%%a" 1 1 1 && ren bits0001.mpa "%%~na.ac3" &&  ren bits0001.mpv "%%~na.avc"
for %%a in ("*.m2ts") do xport -h "%%a" 1 1 1 && ren bits0001.mpa "%%~na.ac3" &&  ren bits0001.mpv "%%~na.avc"
for %%b in ("*.avc") do DGAVCIndex -i "%%b" -o "%%~nb.dga" -e
for %%c in ("*.ac3") do azid "%%c" "%%~nc.wav"
for %%a in ("*.wav") do normalize -l 0 --peak -v "%%a"
for %%a in ("*.wav") do faac -b 192 "%%a" -o "%%~na.aac"

REM plugins
for %%a in ("*.dga") do @echo SetWorkingDir ("%CD%") >> "%%~na.avs"
for %%a in ("*.dga") do @echo loadplugin("dgavcdecode.dll") >> "%%~na.avs"
REM - MVTools, preferably v1.4.13 (or newer)
REM - MaskTools v2.0
REM - nnEDI 1.3 +
REM - RemoveGrain/Repair package
REM - ReduceFlicker (if temp-NR for ME is used)
REM - MedianBlur by tsp
for %%a in ("*.dga") do @echo loadplugin("%CD%\deinterlace\RemoveGrain-10\RepairSSE3.dll") >> "%%~na.avs"
for %%a in ("*.dga") do @echo loadplugin("%CD%\deinterlace\RemoveGrain-10\RemoveGrainSSE3.dll") >> "%%~na.avs"
for %%a in ("*.dga") do @echo loadplugin("%CD%\deinterlace\mvtools.dll") >> "%%~na.avs"
for %%a in ("*.dga") do @echo loadplugin("%CD%\deinterlace\NNEDI\nnedi.dll") >> "%%~na.avs"
for %%a in ("*.dga") do @echo loadplugin("%CD%\deinterlace\mt_masktools-26.dll") >> "%%~na.avs"
for %%a in ("*.dga") do @echo import("%CD%\deinterlace\MCBob_v03u.avsi") >> "%%~na.avs"

REM source
for %%a in ("*.dga") do @echo AVCSource("%%a") >> "%%~na.avs"

REM deinterlace
for %%a in ("*.dga") do @echo MCBob() >> "%%~na.avs"
for %%a in ("*.dga") do @echo SelectEven() >> "%%~na.avs"

cls


for %%a in ("*.avs") do x264.exe --qp 16 --bitrate 12000 --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 --sar 4:3 --output "%%~na.h264" "%%a"

for %%a in ("*.h264") do mp4box -add "%%a" -add "%%~na.aac"  -new "%%~na_x264_1920_highdeint.mp4"

for %%a in ("*highdeint.mp4") do ffmpeg -i "%%a" -vcodec mpeg1video -s 1024x576 -b 12000k -y "%%~na_mpeg1.mpg"


del *.aac
del *.h264
del *.avc
del *.dga
del *.ac3
del *.wav
del *.avs
del *.log



Soopafresh posted 2008 Jul 01 06:09
Thanks ron, I'm waiting for nnedi v2.0 to be released. Another function that works really nicely with this type of footage is TemporalDegrain(). Of course the best deinterlacers (mcbob) and noise reduction apps are slowwww, but if you have the hardware, then by all means :)


ronpub posted 2008 Jul 01 16:31
Soopafresh :
Of course the best deinterlacers (mcbob) and noise reduction apps are slowwww, but if you have the hardware, then by all means :)


I just launch my big batch of files for the night. I fear that tomorrow my computer will still work. Finally, I think mcbob with nnedi is quite too slow for real production for me. But I would like to use that as I really enjoyed this deinterlacing method. Something 2 to 4 times quicker (near 1 fps) would be good for me despite the loss of quality.
I'got some artifacts on fast moving parts with Yadif then I prefer to avoid it.



ronpub posted 2008 Jul 02 19:26
It just took me about 23h to do the job with my script for 1663Mo of videos on a Core2Duo 8400 @ 3.55Ghz

But it done good results for me even with moving parts at 25.4 items/second (As the camera is 25fps, that done a stromboscopic effect). I'm very satisfied.

On some videos, I got some errors. I will investigate.

EDIT: error: "CAVIStreamSynth: System exception - Access Violation at 0x0, reading from 0x0"



Soopafresh posted 2008 Jul 02 21:46
Cool. Sometimes when I've used Mcbob, I've run out of memory and fixed it by adding this to the AVS script

SetMemoryMax(768)#or 75% of your total RAM



s0tt0 posted 2008 Jul 10 04:55
First of all i want to thank soopafresh for making these *.bat scripts.

What is the best way to "convert" those avs and ac3 files I get into mkv container without quality loss?

And another question. AVCHD camcorders usually make several .mts files, is these a way to bind them or append them so I only get 1 mts file?



Soopafresh posted 2008 Jul 10 07:52
Hi s0tt0


You can join your MTS files via the command line like this:

Copy /b 00001.mts+00002.mts+00003.mts output.mts

The only lossless method I can think of to convert .MTS to .MKV is to use an app called Gdsmux.exe , found in the Haali media splitter folder. No need to use the batch files, you only have to add the .MTS file and save as a .MKV



You can also use RipBot 264 to convert to MKV, but it will re-encode the video



s0tt0 posted 2008 Jul 11 05:26
Haha (@me :lol: )

Thank You for the info. It made my life little easier :D



bayme posted 2008 Jul 11 06:36
Soopafresh :
Thanks bayme. I just upped it to 160k so the audio doesn't suffer after the transcode to flash by Vimeo.

Great work.

If you're curious, here's an example source MTS from a Canon HF 10. Pretty popular sell these days, and I've had some issues demuxing audio from that. Apparently Canon yet again uses a different 'standard' AVCHD formatting.



Soopafresh posted 2008 Jul 11 10:32
Thanks bayme, I downloaded the file. That's a nice camera. Really impressive quality. Progressive source, yes?

00003.mp4



avnishb posted 2008 Jul 11 16:24
Soopafresh,
I had been using your batch files to convert my Sony HD camcorder files to avi. Recently I bought Panasonic SD9 HD camcorder but the converted files are very pixlated especially where there is movement I see square boxes. Can you tell me what the reason is ? I am attaching the source file and if you see the man moving at the bottom after the conversion you will see squares popping up around the edges.

Thanks for all your help ...
Avnish

9.mts



Soopafresh posted 2008 Jul 11 17:33
Hello Avnish, the file you posted is only 27kb in size. Would you post it to http://www.mediafire.com/ instead ?


bayme posted 2008 Jul 12 06:57
Soopafresh :
Progressive source, yes?
Yes, 25 fps PAL 1920x1080. You can also record at 50 fps for this EU model, in which case it is interlaced (I think, I never used it).


avnishb posted 2008 Jul 12 19:01
Soopafresh,
Sorry for not uploading the file properly. I didn't know there was limit of 6 MB on videohelp. Anyway, here is a link to that file as requested.
http://www.mediafire.com/?ytzmmglyogg



s0tt0 posted 2008 Jul 13 05:40
I have question about the *.mts and *.m2ts file formats. I know that the first one is container used by camcorders and the other is when I import (or capture) the video into my computer.

But is the binary structure the SAME in both containers or the capturing to *.m2ts changes something in the code? In other words can I just rename *.mts to *.m2ts and everything is still like it should be?

I just want to confirm this becuse Sony just wont support 64bit OP systems (don't know why...) and I cannot use Sony's programs to import AVCHD files from my camcorder. I have to "hardcopy" them into my HDD. This means files are named with *.mts format.



Soopafresh posted 2008 Jul 13 06:35
s0tt0 - I think they're the same, but Google "MTS vs M2TS" to be sure


avnishb - I've seen that problem. There's something different with the file and DGavcdec doesn't decode it properly. It works using CoreAVC with DirectshowSource, but you need to buy coreavc



dgavcdec_00009.mp4

directshowsource_00009.mp4



avnishb posted 2008 Jul 14 08:49
Soopafresh,
Thanks for looking into it. I have one question though all your bat files use DGavcdec. Which file should I run to use CoreAVC ? I have CoreAVC on my computer now.

Thanks
Avnish



Soopafresh posted 2008 Jul 14 09:18
I'll write you a batch file to automate it for you. This one outputs to 1024x576. Just edit it to the dimensions that you want.

directshowsource.zip



avnishb posted 2008 Jul 14 10:12
Soopafresh,
Thanks a lot for your help buddy. You are a great help to everyone on this forum especially for people like me who have zero experience with video editing.

Thanks a lot
Avnish



Soopafresh posted 2008 Jul 15 14:35
No problem. Looks like others have reported the same issue to neuron2, author of DGavcdec. Seems to be related to libavcodec.


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



aghusker posted 2008 Jul 15 21:27
The *.bat isn't working for me.
I don't get 5 files, just 2: bits0001.mpa and bits0001.mpv

Any idea what's wrong?



Soopafresh posted 2008 Jul 16 02:34
Post a .MTS file somewhere.


rajkhand posted 2008 Jul 16 03:47
@Soopafresh

I have Sony Sr12E (PAL) It produces different MTS file for each clip I record. Your DOS copy command for joining the files gives error when xport is run on the joined file.

When converting the files to DVD should I deinterlace or keep it interlaced only? Which a good method for both using avisynth?

In a recent experiment I individulally processed the MTS file using xport to demux and then used CCE to encode to M2v but I had serious issue in A/V sync muxing the files and joining it. Non of the free tools gave me a good join, atlast videoredo was able to solve the problem. I used Tmegenc's MPEG tools to mux individual mpg and then joined it with videoredo which gave me a finished mpg which dvdauthorgui accepted. If only I could join the MTS files properly it would have solved most of the problems of A/V sync.

Any suggestion on the workflow? tools?

Great Help, thanks

Raj



Soopafresh posted 2008 Jul 16 10:03
rajkhand - I would try ConvertXtoDVD . It'll really simplify things for you, hopefully. I don't even own an AVCHD camcorder, and there are so many variations to the way these devices save files, I just can't be of much help.


joviparagon posted 2008 Jul 16 17:48
OK I have been lurking here reading for about 2 months and registered to day as I really am still in the dark on how to well.......

My cam: Canon HF100 my audio recorder: M-Audio Microtrack 24/96
My system - Athlon 64 X2 Dual Core 4400+ with 2GB Ram and XP pro SP2, 1.75TB HD space.

I want to do a few things I have never tried before.
a 2DVD set and a Blu Ray disc of a live music event
I have most of the Video I need as 8 MTS files, I need to edit in a little footage from youtube to cover memory card changes, and a flub where i stopped recording accidentally.
I also have the complete show on audio in very nice quality 16 bit 48khz wav.
I have saved archive copies of all the raw audio and video to an external 1TB firewire drive.
I want to assemble the audio and video in full HD quality and author a BluRay and then a 2DVD set from them. I do not want to use the cam audio as it is pretty shabby.
I also want to snip out a song or two and post them on youtube to help drag some more footage out of folks who might have filmed my breaks. I want to use the good audio there as well.

Software I am used to using for DVD creation - TMPGEnc DVD Author 2.0, Boilsoft Video Splitter and Joiner.

Software on my machine that I have seldom or never used, some gotten at the recommendation of the videohelp guides - avchd_convert_v6, avisynth 2.5, ffdshow, flash_addon (mencoder), haali media splitter, Nero 8, Sony Vegas 8, TMPGEnc Xpress 4.0 trial, Virtualdub 1.8.1

I am stumped as to a workflow, I am pretty sure I need to edit in HD and then after getting a blu Ray image change some settings to transcode a DVD and then further edit and downgrade for the FLV for Youtube.

I tried the Xpress 4.0 trial but can't figure how to sync up audio so it matches exactly, I put the first vid and the nice audio up but can't match them.

If there is a tool for all this that costs some bucks I am ok with that, just need something that works or some guidance.

All helps greatly appreciated
Dave

Oh and yes I intend to share when it's done



Soopafresh posted 2008 Jul 16 18:11
Hi joviparagon - it would help you out if you posted your question as a new thread so more people will read it and contribute their expertise.

What I would do is this:

MTS files ---> AVCHD_CONVERT_V6 ---> Save as Lagarith AVI in VirtualDub

Vegas ---->Load Lagarith AVIs --->Load Separate Audio Track ----> Line up/sync Audio and Video --->Edit

Vegas ----> Render out to Final Lagarith AVI

TmpgencXpress---->Load Final Lagarith AVI----> Convert to HDV for Blu Ray / Convert to h264 MP4 for Youtube



joviparagon posted 2008 Jul 16 18:18
A million thanks for the suggestions Soopafresh, this was the thread that seemed closest to my own problems and was the one I refered to the most in trying to work it all out.
I am gonna give your workflow a tryout and it isn't all wine and roses I will start a new thread.
Again my thanks
Dave



rajkhand posted 2008 Jul 17 00:28
Ok thanks now only one question

How to join MTS files so A/V sync is maintained?



Soopafresh posted 2008 Jul 17 00:36
rajkhand - Maybe TSMuxer . You must change the file extensions to .M2TS for TSmuxer to accept the files. And choose the "Append" button as you add files.I hope it works for you.


Darkflame posted 2008 Jul 18 02:26
To start with, Id like to thank Soopafresh for all the help he has given.
I'm probably one of many lerkers looking at this thread after being shocked their new comera exports to a format nearly no-one supports.

The scripts work for me, only I am also suffering from the problem avnishb had, that is, unacceptable image artifacts when converting with DGAVCI.
I have also installed CoreAVC as recomended, but I dont know how to adapt the
"__1920x1080_Same_As_Source.bat"
to use it instead.
Any pointers?

I tried the;
DirectShowSource.bat
Above, but tht didnt seem to do anything but delete the old files. It flashed up and went too quickly for me to read any errors or messages.

(I'll make a sample mts file, and link it in a mo)
www.darkflame.co.uk/00001.mts



Soopafresh posted 2008 Jul 18 03:24
Hi Darkflame:

The DirectShow batch file should only leave you with the original .MTS file and an AVS file. It's very different from the other batch files. There's no demuxing or WAV files being created. It runs VERY fast. So, in your case, you should see your 00001.mts and 00001.avs files in the folder. Load the AVS into VirtualDub and voila. Let me know if it doesn't. We'll make it work for you :)

00001.avi



Darkflame posted 2008 Jul 18 03:34
Thanks. :)
I did actualy try that after making the post, it seemed to load, but I got this error;
http://www.darkflame.co.uk/Image1.jpg
When I tried to play or step forward a few frames.



Soopafresh posted 2008 Jul 18 03:37
You have a really old VirtualDub version. Try a later one >v1.7 http://tongari.at/modplus/VirtualDub-1.7.8-modplus-20080304.zip


Darkflame posted 2008 Jul 18 04:29
hmz..I was rather out of date.
But I just tried with v1.8.1 and got the same problem :-/



Soopafresh posted 2008 Jul 18 09:23
1)The .AVS file should look like this

load_stdcall_plugin("yadif.dll")
DirectShowSource("00001.mts").normalize()
fadein(15).fadeout(15)
Lanczos4Resize(1024,576)


2)Do you have FFdshow installed? Turn off support for h264. You want it to use CoreAVC

3) Reinstall Haali Media Splitter

4)Double click on a .MTS and make sure your PC can play it



Darkflame posted 2008 Jul 18 10:09
1)
load_stdcall_plugin("yadif.dll")
DirectShowSource("00001.mts").normalize()
fadein(15).fadeout(15)
Lanczos4Resize(1024,576)

Seems identical.
So the problem must lie elsewhere.

2) I'm pretty sure FFdshow is now removed, I cant see it in the
ControlPanel>>Sound & Audio>>VideoCodecs>>Propertys list.
CoreAVC is installed. (demo version, I'll happly buy that if it works)

3) Reinstalled. done.

4) I cant play it by double clicking..no. Should I be able too? Nothings associated with them.
They load and "play" in DGAVCIndex.exe if I use file>>open.


I'm still getting a crash.
I'm going to try the resulting files on another machine, just to make sure its not a ram/cpu issue.



Darkflame posted 2008 Jul 18 10:28
Ok, just done some tests and it works!
It seems it the PC simply wasnt good enough to open it in vdub, probably not enough Ram.

Thanks for all your help, I really should have thought of this earlier.

Theres still one slight issue remains;
My output is clearly interlaced, but the mts file was progressive.
Is the bat file expecting the input interlaced?



Soopafresh posted 2008 Jul 18 11:44
It's not interlacing, but perhaps the source is interlaced?

Try this one:

directshowsource_deint.zip



Darkflame posted 2008 Jul 18 17:48
The camera is a brand new Panasonic HDC-SD9, it should be outputting to 1080p at 25p.
I'll check in case the default is 1080i or something though.

I'll give that one a go.
I can always deinterlace in Vdub anyway, but Id rather keep a progressive source if it starts that way :)



Soopafresh posted 2008 Jul 18 18:11
Do a test in an evenly lit area and look for interlace artifacts. If you're panning a shot, count to 7 when you go from point A to point B. That will keep your scenes from "strobing". CoreAVC has built in deinterlacing, so it might be masked when you go to play back the .MTS file.


jiaowangxin posted 2008 Jul 19 05:44
Thanks for this excellent guide, I used your xvid script to create avi files, they play fine on my computer using videolan, but when I tried to open them in virtualdub, it complaints that "cannot locate decompressor for format 'xvid' (unknown)". Are you using a special xvid codec? How do I get virtualdub to open the files so I can join them?

I have installed xvid codec and xvid encoded files using other software like TMPGenc opens fine in virtualdub.

I tried to play output xvid file in media player classic, it also complaints about the missing xvid codec.

Any ideas?

Thanks!



Onceler2 posted 2008 Jul 19 15:11
I am trying!how do I get an avs file from demuxing the video and audio,I assume that is what I am supposed to be doing.
Just how do I get an avs file,I seem to be missing something here,I have tried demuxing with the gui and also runing the batch files from command prompt.
Please help me to understand.



Soopafresh posted 2008 Jul 19 20:23
Hi jiaowangxin - Install Ffdshow and have it decode XVID.


Onceler2 - post one of your .MTS files and I'll take a look.



jiaowangxin posted 2008 Jul 20 06:52
Thanks so much for your help! It works now.

Another question, is there any mpeg2 encoder available for virtualdub?



Soopafresh posted 2008 Jul 20 15:26
No, but you can feed the AVS files into any Mpeg2 encoder, such as FAVC, TmpgencXpress, ConvertXtoDVD, etc.


jiaowangxin posted 2008 Jul 20 17:59
Thanks again!

I was able to use your xvid script to ouput avi files, but when I tried to open them in virtualdub, it now has a warning that AVI: Variable bitrate (VBR) audio detected, VBR audio in AVI is non-standard, and that can lead to audio out of sync

I ignored the error and joined the avi files, the audio is indeed out of sync.

Is it possible to modify your script to have a CBR audio?

Thanks again for your help!



Soopafresh posted 2008 Jul 20 19:40
It's not my script creating that. It's an audio setting in VirtualDub.

In the mean time, you can convert your XVID audio files to CBR with this:

Use Avi_Gain_Regular.bat

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

Then you should be able to join the normalized files with VirtualDub



Onceler2 posted 2008 Jul 21 07:00
I got it to work,thanks


alcatrav posted 2008 Jul 23 20:23
Hi, I am new to all this and the advice on this forum is amazing. I've got a Panasonic SD9 which records AVCHD direct to SD card and produces MTS files. All I want is to be able to edit them easily and then produce a standard quality DVD. Who would have thought it would be so hard!!

I tried converting them through ULEAD 11 which worked, but the quality of the output was really poor. That software has a batch conversion utility - takes MTS file and can produce a PAL-DVD compliant MPG2.

So to get a better quality results - I followed the instructions at the beginning of the forum, and everything seems to work. I have installed the Lararith lossless encoder and script files. Using the __1024x576_Deinterlaced__PAL.bat file, various files are produced. I then open the AVS file in VirtualDub, and choose Video->Compression->Laragith. Then File->Save As and the program saves an AVI file.

The problem is that the AVI is "chunky". It pixelates, stops/starts, and audio is choppy. I have attached the MTS file from the camera. Can anyone else check whether they get the same results?

Thanks!!

00005.mts



sma3har posted 2008 Jul 23 22:25
I have followed the instructions as mentioned in the beginning of the forum.
Now, i see several 200+ .AVS files. How can i put all in one and convert as DVD?
From VDUB, i was able to convert one at a time. Is there any eazy way of doing it? Please suggest me.
Thanks for your help. Appreciated your time!!!



sma3har posted 2008 Jul 25 19:43
Any suggestions?


Soopafresh posted 2008 Jul 25 21:07
alcatrav - your camera is producing files aren't compatible (yet) with the scripts :( You're not the only one. The developer has been alerted.


sma3har - I have no idea :(



Soopafresh posted 2008 Aug 01 18:46
New Version of the Vimeo Conversion scripts:

Added 24P and 25P batch files for cameras that shoot in progressive format. No deinterlacing performed on the source. Once again, not all AVCHD files are compatible with the version of Libavcodec (the file which decodes the AVCHD file for re-encoding by x264.exe), so if you see artifacts in your footage, you'll just have to wait until the fix is in.

Here's an example of 24p output:

vimeo_24p.mp4



entrejim posted 2008 Aug 02 10:39
Regarding the issue of "avcsource: no GOPs found (no IDRs or recovery points)", the last post i found is:
dererik :
sorry, all the same, does not work with files larger then 100 MB.
Seems to be an error with libavcodec.dll or dgavcdecode.dll.
erik


I have been reviewing the posts from Neutron2 and Soopafresh and tried updating the avchd_convert_v5 with the latest versions of the DGAVCDec. Then I downloaded the avchd_convert_v6 and tried that. So far no luck.

Using a Canon HF100, I recorded non-sto for about 40 minutes at full quality. After saving the files to my computer, I discovered that the camera actually split the recording into 3 files. The first file converted normally, but the additional 2 files, give the 'no GOPS found' errors.

Additional information - 1. the action was minimal in the recording as I was primarily interested in the audio. 2. The first and second file were 1.9gigs and the third file was 690 megs (apparently, there is a limit to the recording at 1.9gigs). 3. I was capturing to a 16gig memory card. 4. I successfully converted the files using TMPGEnc.

Hope this helps.



Soopafresh posted 2008 Aug 02 15:53
I have been reviewing the posts from Neutron2 and Soopafresh and tried updating the avchd_convert_v5 with the latest versions of the DGAVCDec. Then I downloaded the avchd_convert_v6 and tried that. So far no luck.

Yeah, I've been doing the same. That's why I haven't updated the files in a while. He's still working on a number of bug fixes and the version I included seems to work pretty well for most .MTS files.



ch1apet posted 2008 Aug 12 20:56
Hey there,

First, I gotta drop some props on this thread for being one of the most informative, well-written, and easiest to use I've seen while cruising the internet hopelessly for solutions. I've read through the whole thread and learned a heck of a lot from it. So thanks!

Here's my situation:

I have a Canon HF10. I will probably end up recording in all of the different video modes it has, which means I'll get 24p, 30p, and 60i video. The problem is that it all ends up in a 60i container, no matter what. If I'm recording in 60i, that's not a problem for me, I'll just run the batch files from the first one, and I see that there's one that will convert 1920x1080 60i to 24p. But what about 30p? W

For now all I'm looking to do is transcode the AVCHD files into x264 with decent quality, so I can distribute them. I'm trying to figure out a way to do this without having multiple intermediate files (although later when I intend to edit them, I'll go with the lossless codecs mentioned earlier). Currently what I do is convert the files to AVI with VoltaicHD, and then use AVIdemux to encode them to x264.

I'm new to writing batches, but I've found that one way to IVTC the stuff I get off of the HF10 is to use this in the AVIsynth script

loadplugin("dgavcdecode.dll")
video=AVCSource("00001.dga")
audio=wavsource("00001.wav")
audiodub(video,audio)
AssumeTFF()
Telecide()
Decimate(cycle=5)
DelayAudio(-0.222)

I was wondering if I should try my hand at adding this to one of the scripts Soopafresh has provided, or if the 24p one will work just fine. Also, I'm wondering if I'm just looking to get it in x264, if there's a problem just sorta taking the line from the 24p script and putting that in the Vimeo script somewhere? Obviously I don't know very well what I'm doing, but I kinda liked the one-click-ey ness of the Vimeo scripts, especially since for the moment all I'm doing is recording short clips (hip-hop routines, if you must know) that require no editing. I'm just hoping to be able to use the 24p or 30p and get the best quality out of it.



Soopafresh posted 2008 Aug 12 21:07
Hi ch1apet, thanks for your kind words :)

What you're doing to get 24p out of 60i is fine - you're performing an inverse telecine using Don Graft's excellent Telecide and Decimate functions. The one I wrote uses Tritical's TFM and Tdecimate functions. They're functionally identical.

If you're shooting at 30p, then there's no need to deinterlace, so you can do the following with the batch files if you choose:

Open the .BAT with notepad and remove this line:




The lines which do the automatic transcoding to h264 are located at the bottom of the Vimeo Script, ala






Let me know if you'd like a 60i-24p batch file which automatically creates a Vimeo compatible .MP4



ch1apet posted 2008 Aug 12 23:37
Yeah, that'd be great! Thanks a ton.

This is probably an ignorant question, but shouldn't I deinterlace anyways, even if it was recorded in 30p? Because the video still comes out of the camera at 60i? Because I'd deinterlace if I recorded in the 60i mode, correct?



Soopafresh posted 2008 Aug 13 02:30
I have a Canon HV30 HDV camera which has a setting to record at 30p and it's progressive, so no deinterlacing required. People have posted AVCHD progressive footage in this thread. Are you sure everything comes out of the HF10 at 60i ? I'll bet the 30p setting doesn't need to be deinterlaced. Reading the comments in the link below says it makes the footage progressive automatically for you internally in the camera.

http://vimeo.com/912349



Here's an updated zip file - This includes 2 additional batch files for Vimeo compatible conversion:

_multi_demux_mts_HQ_Vimeo_60i_to_24p.bat - which will do Inverse Telecine and Pulldown to 23.976fps video

_multi_demux_mts_HQ_Vimeo_30p_Source.bat - which will work for cameras that can shoot progressive 29.97fps video



avchd_convert__vimeo_test.zip



fugazi posted 2008 Aug 13 12:20
Hey soopafresh, I stumbled upon this thread after several hours googling for an AVCHD solution. I'm kind of in awe of how much time you've spent helping out those of us that struggle with this format.. especially being that you don't even record in avchd. Pretty generous of you.

I've read through everything up until this point but could still use a little help developing a decent workflow. I'm pretty newb when it comes to video editing, codecs, etc. so bear with me if you can stand it :)
Here is what I'm looking to do (nothing really fancy):

Camera: Canon HF100 (NTSC) btw - the HF100 and HF10 are identical aside from the built-in 16gb flash memory on the HF10. You probably already know this but jic it may be helpful in troubleshooting future posts.

Currently I'm editing .m2ts clips in Vegas Pro 8.0, and when I have a completed project, I output to .mp4 (h.264 I think?) to get a manageable file size. This works great for vimeo, and I'm generally very satisfied with the quality even at 1920x1080. But like others I'd like to also work with video into After Effects etc. My aim is to keep working with clips at 1920 with as little degradation as possible to video quality (nothing new). I have a quadcore @ 2.4, 2gb ram, 8800 GTS 512 and a raptor.. and up until this point everything has been pretty smooth. The first hitch came after trying to playback the 1920x1080 lossless Lagarith .AVI in media player classic. The image quality seems to look ok but playback is nowhere near smooth. I guess my first question is:

1. Is this normal or should my machine be capable of playing it back smoothly? It has no trouble at all with uncompressed .mts/.m2ts files so I wonder if I'm doing something wrong in creating the AVI or if perhaps I'm lacking some essential codec.

Maybe you can spot an error in my processing:

I start with the .m2ts file from my camera (Canon HF100 - NTSC)
Video: MPEG4 Video (H264) 1920x1080 29.97fps 60i = .m2ts (renamed .mts)
Audio: Dolby AC3 48000Hz stereo [Audio]

I place that file in your avchd_convert_v6 directory. I have the latest VirtualDub installed as well as the latest Avisynth.

I want to retain as much quality as possible to take and edit with - so I choose the batch file:

" 1920x1080_Same_As_Source.bat " (I also tried huffy and had the same issues but with an even more enormous file size)

---> creates .AVS ---> Open VirtualDub ---> Open that .AVS file ---> Select Lagarith under "Compression"

and finally ---> Save as .AVI.

This takes me from the original 46MB .mts to a lossless Lagarith .AVI that is 1.2GB.

Does that seem right? It plays back awful in mpc and is a bitch to work with in After Effects. I've played HD content with similar file sizes fine in the past.. (perhaps b/c they were compressed to some extent?) I have no idea :)

I uninstalled K++ codec pack... uninstalled coreAVC... downloaded latest MPC... re-installed CoreAVC ... installed FFDShow MPEG-4 Video Decoder 2008-08-11... rebooted many times.. same thing. I played around with various switches in all three to no avail.


2. And finally as far as work flow goes, what would you suggest? (assuming I can get beyond the problems above)

Like I said I'm pretty new to the process of piecing together video in general. Say I have 30 different short .mt2s clips... I'll probably do the majority of editing in Vegas as it seems to support AVCHD fairly well. So say I'm pruning the clips for what I'd like to use in the project (using vegas). Am I already making a mistake here? Should I first be transcoding the .mts clip(s) that I want to apply an effects plugin to using your method so that I can manipulate it in After Effects? And if so, is Lagarith .AVI the way to go? .. and then say in Adobe when I've applied the effect and done, would I again render to the lossless Lagarith AVI (which next would be pulled back into Vegas for integration)? Sorry this is a lot.. lol I've looked and looked for hints on how to do things properly and work efficiently and just end up with even more variables to get lost in... If you have the time to shed some light on what approach to take and my issues with the scripts I would be most grateful.

Thanks in advance.



Soopafresh posted 2008 Aug 13 12:41
Hi fugazi

1) Yes, whenever you convert any file to lossless lagarith or Huffyuv there's stuttering on playback - especially when you're looking at 1920x1080 dimensions. I have a 8 Core 3 GHz machine at work, and HD lagarith stutters on that as well.

The lossless conversion is meant to be used as a high quality file that you feed to Vegas or Premiere. It's not meant for playback.

2) Because so few apps can use the original .M2TS AVCHD file (although Vegas can), you should convert all your files to lagarith AVIs, then as you're saving your cuts and moving between applications, save again using lagarith in After Effects or Vegas. That way there's no quality degradation from re-encoding (lossless to lossless).

When you're finally ready, render your stuff to whatever final codec you want - h264, xvid, whatevah

I'd try the 848x480 batch file just because you'll be able to test this all out without having to deal with the massive 1920x1080 size.



ch1apet posted 2008 Aug 13 15:35
Soopafresh :
I have a Canon HV30 HDV camera which has a setting to record at 30p and it's progressive, so no deinterlacing required. People have posted AVCHD progressive footage in this thread. Are you sure everything comes out of the HF10 at 60i ? I'll bet the 30p setting doesn't need to be deinterlaced. Reading the comments in the link below says it makes the footage progressive automatically for you internally in the camera.

http://vimeo.com/912349



Here's an updated zip file - This includes 2 additional batch files for Vimeo compatible conversion:

_multi_demux_mts_HQ_Vimeo_60i_to_24p.bat - which will do Inverse Telecine and Pulldown to 23.976fps video

_multi_demux_mts_HQ_Vimeo_30p_Source.bat - which will work for cameras that can shoot progressive 29.97fps video



avchd_convert__vimeo_test.zip


I think you might have forgotten to put yadif into the new folder, but I just copied it from v6 over. It wouldn't encode without it, cuz I still need that for the 60i files I sometimes end up recording. Anywho, I'm gonna record some stuff this weekend in 24p and 30p, and I'll let you know how it goes.

I'm trying to understand what you're putting in the batch file, but I was wondering, is there a difference between "normalize" that you have in the Vimeo and "Audiolimiter" that you have in the v6? Does one give better quality than the other?

Another question, in your v6 batch files, is it really necessary for the "same as source" ones to do the Lanczos4Resize? Can you just take that line out?



Soopafresh posted 2008 Aug 13 16:42
The normalize vs audiolimiter difference is really a workaround I had to come up with when I was creating the Vimeo specific batch files. It's because x264 is a video-only tool, where VirtualDub will do both audio and video in one shot. Quality isn't different, but the audiolimiter one is a bit more nifty because it reduces the dynamic range, making the loud parts less loud and the quiet parts louder.

Another question, in your v6 batch files, is it really necessary for the "same as source" ones to do the Lanczos4Resize? Can you just take that line out?

If you camera is shooting at true 1920x1080 dimensions, then you can remove it. A lot of so called "HD" cameras actually record at 1440x1080 and your video player stretches it out to 1920x1080.

Try removing it and see if it comes out right. If it doesn't, then your camera is shooting at 1440x1080



fugazi posted 2008 Aug 13 19:23
Many thanks for taking the time to respond and school me. It's nice to know I'm not alone re: playing back lossless .AVI's - although maybe a little discouraging to read that even a 8 Core (damn..) machine struggles. :lol:

Soopafresh :
The lossless conversion is meant to be used as a high quality file that you feed to Vegas or Premiere. It's not meant for playback.

2) Because so few apps can use the original .M2TS AVCHD file (although Vegas can), you should convert all your files to lagarith AVIs, then as you're saving your cuts and moving between applications,



I'm curious then - when an expert like yourself wants to manipulate/arrange video to sync precisely with the rhythm of an audio track or needs to perform some other task where pinpointing video details in playback seems important, how do you go about working with the stuttering lossless files in the editor? Would you maybe have a duplicate video track(timeline) that mirrors the same footage (but in a form that is playable in-editor)? .. and then mirror the changes or effects to the lossless track for later render?

Thanks again for this guide and all your help



Soopafresh posted 2008 Aug 13 19:56
I'm far from an expert on this stuff. I know a bit about the "how", but very little about the "why".

If you're going to be feeding an uncompressed 1920x1080 clip to an editor, you're not going to be able to do audio sync tweaks, at least not with any of the free lossless codecs (lagarith, huffyuv). You can use the amazing Cineform codec, which is multi-processor optimized to play back at realtime at 1920x1080, but it's an expensive bit of software - $500. However, at 848x480 resolution you can use lagarith with no problem.

In certain programs, like After Effects CS3 (maybe earlier ones too), you can use a lower res "Proxy" to do your editing, then replace it with your high res files when you're ready to render. I have no idea about how to go about doing this, but the option appears to be there:

"Proxy
Any file used to temporarily replace a footage item, but most often a lower-resolution or still version of an existing footage item used to replace the original. Often, storyboard images are used as proxies. You can use a proxy either before you have the final footage or when you have the actual footage item but you want to speed up previewing or rendering of test movies. You must have a file available to use as a proxy.

Any masks, attributes, expressions, effects, and keyframes that you apply to the layer are retained when you replace its placeholder or proxy with the final footage item."

http://livedocs.adobe.com/en_US/AfterEffects/8.0/help.html?conten ... B5ACC.html



Oh yeah, you can also beef up your hardware: http://www.cray.com/products/xt5/index.html :lol:



ch1apet posted 2008 Aug 13 23:01
Soopafresh :
The normalize vs audiolimiter difference is really a workaround I had to come up with when I was creating the Vimeo specific batch files. It's because x264 is a video-only tool, where VirtualDub will do both audio and video in one shot. Quality isn't different, but the audiolimiter one is a bit more nifty because it reduces the dynamic range, making the loud parts less loud and the quiet parts louder.

Another question, in your v6 batch files, is it really necessary for the "same as source" ones to do the Lanczos4Resize? Can you just take that line out?

If you camera is shooting at true 1920x1080 dimensions, then you can remove it. A lot of so called "HD" cameras actually record at 1440x1080 and your video player stretches it out to 1920x1080.

Try removing it and see if it comes out right. If it doesn't, then your camera is shooting at 1440x1080


Yeah, the HF10 will record at 1920x1080 if you're recording in FXP mode. Thanks!



bayme posted 2008 Aug 22 15:08
Hi guys and gals, in particular Soopafresh;

I have a couple of advancements to your scripts for PAL 25 fps sources (from Canon HF 10 and HF 100 for example);

Download entire set including all needed files here (3 MB). Only requires latest Avisynth installed..
If you want to use it, just dump your .MTS files in the folder where the bat files are, then run one of the bat-files.

- I prefer neroAacEnc over faac, so it is using that instead for higher audio quality.
- I also added something to azid making the normalizing script you use obsolete (the built-in option in azid does a better and faster job, even).
- Also added is MSharpen, one of the best sharpening plugins for avisynth in my opinion. So the post-Resize sharpening line is added:
for %%a in ("*.dga") do @echo MSharpen(threshold=12,strength=81,highq=true) >> "%%~na.avs"

And last but not least I tried to create Quicktime compatible mp4 results with x264.

The download contains 3 great batch scripts:

_HD25p_MTS_to_MP4__16-9_640x360.bat -> around 1 Megabits/sec mp4 result

_HD25p_to_Vimeo__MTS_to_MP4__16-9.bat

and one using letterboxing (from 16:9 to 4:3) :

_HD25p_MTS_to_MP4__16-9_to_4-3_640x480.bat

Hope you find a use for it. I might add more batch files and options to it in the future.



Soopafresh posted 2008 Aug 22 15:29
Thanks bayme, I'll take a look and incorporate most of it into the next version. I'm waiting for the bugfix for libavcodec which should be coming soon and I'll throw it all together then. The only thing I can't do is swap out Faac with Nero's AAC encoder because although it's free, Nero refuses to allow anyone to include neroAacEnc with their own software :( . That's why I had to use FAAC to begin with.

Great idea on using Azid to do the normalizing!



bayme posted 2008 Aug 22 15:50
Soopafresh :
only thing I can't do is swap out Faac with Nero's AAC encoder because although it's free, Nero refuses to allow anyone to include neroAacEnc with their own software :( . That's why I had to use FAAC to begin with.

Whoops. I did not know that.
Hmm.. I think I'll leave my file online until they complain. My experience is they won't be complaining soon with specialized scripts like this.

Next version I will put in its place will have a link where to download the file at nero ahead.de so they can't complain.

By the way, do you know a decent encoder command to use (at the end of these scripts) for MPEG-2 video with MP3 audio output, so .mpg output with a bitrate around 5000 kbit/s average, using 1024x576 at 25 fps ?



Soopafresh posted 2008 Aug 29 19:48
From the official Dgavcdec thread on Doom9 http://forum.doom9.org/showthread.php?t=122598&page=68


Q-"neuron2, can You please update libavcodec.dll to new version from ffmpeg? Maybe some of us will be lucky, and at least some decoding problems is fixed in latest ffmpeg"


A- "The changes I need to do are extensive. I'm waiting for a final version that is really fixed, because I have no way to be sure things won't change again before that happens. Michael tells me he's still fixing PAFF bugs, so we'll all just have to wait until he's finished."


This means it will be a while longer to resolve some of those artifacts present on output from several of the newer cameras. If you're having problems with your output file looking blocky, you'll have to look for another solution in the meantime - CoreAVC and DirectShow (read this thread) or other apps such as VoltaicHD

vimeo_00144.mp4



jodal posted 2008 Sep 03 12:37
Hi, another Newbie here.
I have been reading this thread and gotten so far as to achieve one of my goals, namely converting the mts files (I just rename the m2ts files) from my Canon HF100 (25p) to avi files with Lagarith compression using Soopafresh (Thank you very much!!) bat files at the start of this thread (I use the "__1920x1080_Same_As_Source.bat") and then open them in VirtualDub and saving with Lagarith compression.
I wonder if there is a way to kind of skip the virtualdub part and add something to the bat file so it produces the Lagarith compressed avi files directly (and it would also be neat if all the wav-, ac3-, avs-, dga- and mts-files were deleted, leaving only the avi files).

After reading a post about this I tried with putting avs2avi in the directory and just add the line "for %%a in ("*.avs") do avs2avi "%%a" "%%~na.avi" -c LAGS -e" towards the end of the bat file and something happened in the DOS prompt window but no avi-files were created and since "I do not know what I´m doing" I gave up there.

Shortly: can one modify the bat file so that when you run it, the mts-files are replaced with Lagarith compressed avi-fles?


Can this be taken a step further and generate HDV and DV compressed avi files (are there any free HDV and DV codecs?)?

My dream and ultimate goal is to have a directory with 1920x1080 25p mts-files and then be able to convert them to either 1920x1080 25p Lossless or 1440x1080 25p HDV with a "double-click" or having a directory with 1920x1080 50i mts-files and then be able to convert them to 720x576 50i DV.
Is something of this possible?



Soopafresh posted 2008 Sep 03 15:20
Hi jodal:

Thank you for your kind words. Yes, all of those things are possible, to a certain extent. That's why I created batch files - to keep it open for anyone to modify to their liking.

The AVS2AVI command should work. I think the syntax is this:

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

Put a pause command after that line and see if you can catch the error. It might also be your version of AVS2AVI.

The problem you'll have is that AVS2AVI only converts video, so you'll have to mux the WAV or AC3 file with the video output by using VirtualDub


You probably noticed the Huffyuv converter batch file I created, which uses FFMPEG to create the AVI file. This would be easier to do, although the output file will be a bit bigger than lagarith.

http://forum.videohelp.com/images/guides/p1819223/huffyuv_xvid_addon.zip

That might be one way to create DV format files as well, as FFmpeg has that conversion ability. HDV as an MPEG2 transport stream is a little tricky to do from the command line. It's the muxing that makes it difficult. There are command line HD Mpeg2 encoders like HCenc which can convert the video portion pretty easily. FFmpeg might be able to create a very high bitrate MPEG2 with WAV audio, but you'll have to study the ffmpeg commands to figure out the syntax.


If you want to get rid of all of the temporary files, add this to the bottom of your batch file:

del *.avc
del *.dga
del *.ac3
del *.wav
del *.avs
del *.log


Look at this page for more conversion ideas: http://blog.somestuff.org/comments.php?y=06&m=03&entry=en ... 303-052230



jodal posted 2008 Sep 05 05:32
Thanks for quick reply Soopafresh!
For some reasons (size and compatibility with my x64 system9) I would like to continue using Lagarith instead of Huffyuv, but your Huffyuv-batchfile works nice (infact, I think I'll use that instead of the "SameAsSource" since the audio dynamic range is not limited and just remove the line creating the avi-file).
Now forgive me if I am talking stupid things here but I am really not familliar with the world of scripting (and maybe I should not enter a forum named Advanced tthen). When using Virtualdub I can create a job-file which as I understand it is some kind of a script telling virtual dub what to do. Is there some easy way to incorporate such a job-file in the batchfiles you and others create?
While I´m waiting for the either Adobe to support AVCHD or someone to create the for me "ultimate" conversion batchfile I will "survive" with the workflow of using your batchfiles to create fullhd avs-files, use virtualdub to compress one fullres clip with Lagarith and one 720x576 clip with panasonic DV-codec, edit with the DV-clip in PremierePro and when I am ready for the final render, replace the DV-clip with the fullres-clip.
If someone happens to write or spot a free conversion tool/script/batch-file that do convert mts/m2ts-files to Lagarith compressed avi-files (and or DV avi-files) with fewer steps I will be most interested.
Presently I do not have the time to learn enough "scripting" to be able to pull that task off.
But again Soopafresh, theese batch-files have made it possible for me to edit my fullhd-files without resolution loss (as in using elecard converter studio) and the need to learn and purchase new editing software (like Sony Vegas). Thanks again!



c@mera posted 2008 Sep 12 01:28
Apologize if this is the wrong place to ask about this, but I am trying to repair an .MST file that was recovered from the drive in a Sony HDR-SR5 after someone unplugged the camcorder without disconnecting it via the software first. The video no longer shows up on the camera, but with a data recovery program I was able to track down the file. Whenever I try to open it with any kind of conversion utility I get an error of some sort or the other, the most frequent is "missing sync byte."

Does anyone know of a utility or a way to mend files that may have been corrupted in this way?

Much appreciated.



Soopafresh posted 2008 Sep 12 03:52
Try the Vimeo Conversion batch file on the first page of the post


lisakissins posted 2008 Sep 12 20:39
Thanks Soopafresh. The Vimeo package works great.

Do you have a Vimeo package that can convert a MPEG-2 (1920 x 1080/60i, Main@High profile) video?

Thanks.



Soopafresh posted 2008 Sep 13 01:52
Experimental and Only for HDV MPEG2 sources from Camcorders like the HV30 or similar. It won't work on other sources.

vimeo_hdv.zip


If it doesn't work, use RipBot instead http://www.videohelp.com/tools/RipBot264



lisakissins posted 2008 Sep 13 07:50
Soopafresh :
Experimental and Only for HDV MPEG2 sources from Camcorders like the HV30 or similar. It won't work on other sources.



Thank you so much Soopafresh!



Magicspell posted 2008 Sep 13 17:54
Hi Soopafresh,

Wonderful tool. I'm amazed at how you've put this together especially considering you don't even have an AVCHD camera! I truly am impressed. I'm also impressed with your support of this package - first rate!

I've tried a few experiments with the conversion and have come up with a couple of questions. Let me try to explain what I'm trying and how I've done it and hopefully you'll understand.

1) My camera is a Sony SR11. I've captured the 'raw' footage through Sony's bundled s/w (Picture Motion Browser) to my hard drive. These files are .m2ts files. The Sony software has a very basic editing/trimming function which allows you to specify a cut at a specific frame. I needed to split a clip since it was too big to fit completely on a dual layer DVD for archive. Before doing that I wanted to test the process on some less useful footage so ...

2) I modified your deinterlaced_NTSC.bat file to remove the fade-in and fade-out as I wanted each split of the clip to be able to be put back together to form the original clip exactly as it was. I've uploaded the resulting bat file with this post (but essentially just removed the fadein and fadeout from the audiodub line in the bat file.

3) After running the bat file I converted to AVI using VirtualDub (ver 1.8.5) and the Logarith compression. I then imported the AVI files into Premiere to attempt to 'edit' them back together into a single AVI to compare to the original clip (also converted to AVI via the same process).

4) Here's what I found. When I compared the split/re-combined AVI with the original it was shorter. I even confirmed this by bringing in the AVI of the original un-split clip into Premiere and put it on it's own video track in the timeline. I was a bit stumped. Then I looked at the properties of each AVI file. The Sony PMB software had indicated the original source clip was exactly 20 seconds long (0:00:19:29) was the ending frame. I split the clip into two with lengths of 9 seconds (00:00:08:29) and 11 seconds (00:00:10:29). In premiere the AVI properties showed these lengths - 00;00;19;28 (original clip), 00;00;08;26 (1st clip), 00;00;10;26 (2nd clip).

5) I then went back to VirtualDub and looked at the properties for each .avs file that was used to create the AVI files. The original clip showed 598 frames (19.953), the 1st clip showed 266 frames (8.876), and the 2nd clip showed 326 frames (10.878).

It would appear that there are frames getting lost somewhere in the conversion. Is this due to the 29.97 drop frame nature of the original video? Since the Sony PMB software can only split files (it can't re-join them) I'm really looking for a way to insure that my split files are going to be frame accurately editable in a real editing program (ala Premiere). Am I missing something obvious here?

I'll try to upload the revised bat file, the original clip and the two split clips for your analysis...

Bruce



__848x480_deinterlaced_ntsc.bat



Soopafresh posted 2008 Sep 13 18:18
Hi MagicSpell, I could see several places where the frames could be cut off. Xport.exe which does the de-muxing in the batch file looks for the first I-Frame and cuts from there. This is designed to keep the A/V synced, but frames can be cut off of the front as a result.

I guess you can get around this by using the DirectShow batch file that's somewhere in this thread. It doesn't demux the file at all, so I'm guessing you wouldn't see disappearing frames. You need to have CoreAVC installed, however.

Another possible option would be to join the MTS files before converting, which seems impractical.

Good luck, man. Thanks for your kind words.



Magicspell posted 2008 Sep 13 20:51
Thanks for such a speedy reply, Soopafresh!

I may have to look into the CoreAVC option at some point but for now I guess what I'll do is to leave some overlap when I split the original file into two pieces (since PMB writes a new file I have that option). I will then have to manually line up the two clips to get a seamless output but it does seem to work (I just tried a 15 frame overlap with success).

No complaints - the package does exactly what it claims to do so I'm a happy camper...

Bruce



vhelp posted 2008 Sep 15 19:57
soopafresh, I'm guessing that maybe you might now.. maybe.

Lets face it, (at least on my two machines .. win98 and win xp sp2) directshowsource() just doesn't work with any of my x264 cli encodes to mp4. I have no way of opening these videos in any aps I've tried so far. And, I'm afraid that i'm getting too impatiant to wait for an update.

After encoding to an MP4 video (using x264 cli) is there any way of *tricking* DGAVCdec to open/read/write a .dga file so that I can start analyizing my h264 encodings for fine-tuning work. I mean, I'd really appreciate it if there's a work-around method for the time being, really.

thx
-vhelp 4897



Soopafresh posted 2008 Sep 16 01:38
What kind of fine tuning work?


vhelp posted 2008 Sep 17 19:29
:
What kind of fine tuning work?


The kind that you do when you are trying to reduce "pixelation" and you fine tune the encoding params that will give you the least amount.. in that situation, for instance.

Another, is where I might be attempting at CBR type encode and need to adjust some of the params that effect it or indirectly effects it.

With all the various encoding parameters/settings in x264 (and they keep getting better) there's so much room for fine tuning work in many areas.

Well, all these and more. But you get the idea. But running the mp4's through VLC is not appropriate for such a task, specially when you need to step through frames for comparision, etc., and you can't really do that with VLC even if you could take a snap shot of a frame it would not be an easy one. I mean, pressing play on both my machines (win98 and xp home) always takes a few a 1/2 sec or more to pause. Not a very good way for obtaining a image or two when you are on the move, etc.

Sorry, that's the best I could in explaining as briefly as possible. I"m still looking, via google-ing around. Usually, you find these things (tools) in the form of command line apps and you sometimes find them as Alpha's.

Anyway, thanks for taking taking the time to hear my point of all this. See you around.

-vhelp 4898



roylefamily posted 2008 Sep 20 23:20
Has any one had this work with Panasonic .m2ts files. I have tried and failed with the __1920x1080_Same_As_Source bat file. I then renamed to .mts but had no success.

Any ideas apreciated. Thank you in advance.



Soopafresh posted 2008 Sep 21 01:06
No output? Did you install Avisynth ?


SteveAVC posted 2008 Sep 24 18:17
Hi, Soopafresh.
Very very good job... but now i'm little confused about the various codecs. :shock:
I have made some tests with various codecs:
------- file.MTS --> BlackMagic/Canopus/Cineform/Lagarith...
--------------- 12".MTS is 26 MB @ 1920x1080 50i (Canon HF100 EU);
--------------- BlackMagic - 8 bit mjpeg is 167 MB - 8 bit 422 is 1,3 GB - 10 bit 444 is 2,6 GB !!!;
--------------- Canopus - vary from 234 MB to 514 MB (various setting from HQ to LOSSLESS);
--------------- Cineform - maximum value that i obtained is 451 MB;
--------------- Lagarith - via Avisynth and .bat file ...Same_as_source was 617 MB.
Now the question is: for a best editing in an NLE, and usability, there is a limit,
or is auspicable, in the size of the converted .MTS file?
Consider as NLE, software from: Abobe, Canopus, Sony, etc.
BlackMagic dont'have a middle value as performed by Lagarith (26 MB to 2,6 GB vs. 617 MB).
I think you prefer the Cineform codec; can you explain why? And about the other codecs, what is your opinion?
Many thanks and sorry for my poor english. I hope you understand me and my english. :oops:
Sorry for wasting your time.



Soopafresh posted 2008 Sep 25 00:00
Hi SteveAVC,

I like Cineform because it is very fast at converting video. It can take advantage of multiple cores, and the output size is fairly small for lossless codecs. But it isn't free. A crippled version comes with Sony Vegas, but the full codec costs several hundred dollars.

Free - Huffyuv, Lagarith (several others free ones out there, but none faster than these two)

Commercial - Morgan Mjpeg-2000 $30, Cineform $200-$500+ (both have free eval periods)

All have advantages and disadvantages, and one can debate the pluses and minuses of each.

Huffy is fast, but doesn't compress that well

Lagarith compresses pretty well, but isn't that fast

Morgan has 4-4-4 colorspace and multicore support, but is commercial, and as you said, the 4-4-4 file is BIG. And it is pretty slow at conversion.

So I guess the answer is - whichever one you like :lol:



SteveAVC posted 2008 Sep 25 03:03
Wow Soopafresh, how fast are you.

Many thanks for your answer, but another little question...
I don't want to debate about the plus and minus; I need a good codec for editing in an NLE environment,
but if I work with several MB or (more possible) with GB of video files for only one project, there is the possibility,
that on a recent computer (good equipped but not a Cry :D ), all the work proceed very slowly,
at least poor usable? I have made my last editing work in the DV scenario (for hobby not professional) at a very
high and good velocity.

In the case of AVCHD files, I think that you understand that, at the end of the file conversion, I don't wont to find
the hardisk full of GB of video file that no one of the NLE can handle in a decent manner :-x .
I have also tryed the all so called AVCHD ready NLE (last EDIUS 5 - Corel X2) but all hangs on the timeline...
the workflow is jerky :cry: . I'm very frustrated and so I stop my work.

Now, If I well understood you:
the Cineform codec is a good compromise for quality and file size, so is very usable on an NLE, and, there is not the problem of a jerky workflow :) . But it cost :( .

---- OR, I had to get a try with GB of file (as with the BlackMagic Intensity codecs - costs little :| )
---- You think that the workflow will be not jerky (maybe also useful) :?:

The QUESTION IS: TO BE (MB) OR [NOT] TO BE (GB)? :D .

Sorry for my english. Regards. SteveAVC.



Soopafresh posted 2008 Sep 25 11:35
Steve, I think you should experiment with the workflow. Sony Vegas can import AVCHD directly, and you can download a 30 day eval copy. No need to convert to an intermediate format such as Cineform or Lagarith, etc.


If you do decide to convert to an intermediate format, then consider the huge files that you will be working with as temporary - delete them after you are completed with your project. Save your original .MTS or .M2TS file.

---- OR, I had to get a try with GB of file (as with the BlackMagic Intensity codecs - costs little
---- You think that the workflow will be not jerky (maybe also useful)


You've got a fast computer. I don't think your workflow should be jerky or slow.

Very good post about Morgan Mjpeg 2000 vs Cineform ( even though it is about converting HDV, it applies to AVCHD) http://www.hv20.com/showthread.php?t=3246&highlight=Morgan



SteveAVC posted 2008 Sep 25 17:48
Good morning (I think) Soopafresh.

Thank's for your answer.
Meanwhile I started with the experiments.... :)
I get a try with BlackMagic and Cineform codecs in various intermediate formats. Let's dance...

Sorry, but Vegas doesn't import the HF100 EU-[s:f3956fba5c]PAL[/s:f3956fba5c] .MTS (only Sony cameras...).

Very, very interesting the post about Morgan. I have printed it and now I'm reading it.
Much, much appreciated help.

Now is time to experiment 8).
I will post the result... but the work will be a little long... be patient... (I'm not a videomaker).
Sorry for my english.
Regards. SteveAVC



Soopafresh posted 2008 Sep 25 17:55
Sorry, but Vegas doesn't import the HF100 EU-PAL .MTS (only Sony cameras...).

I thought 8.0c was supposed to support all AVCHD cameras. Maybe I'm wrong.



SteveAVC posted 2008 Sep 25 18:21
Hello.

I have made a little tour at Sony web site.
I think you're right about 8.0c... maybe my was an older version :oops:

They also announced new version 8.1 for 64 bit support... well, another try.
... Vegas Pro 8.1 software has been designed to maximize the capabilities of the 64-bit system, providing:
... Access to large amounts of memory not possible with 32-bit systems
... Scalability for multicore processors
... Faster overall performance and rendering


Now I download the trial version, and I go to bed (it's 1:20) am.
Regards.



SteveAVC posted 2008 Sep 29 14:49
Hello.

My first work on codecs. Conversions from AVCHD to Canopus and BlackMagic codecs.

BlackMagic 8-bit MJPG about x 4,4 (starting file)
Canopus HQ standard...........x 5,4
Canopus HQ fine...................x 9,0
Canopus Lossless..................x 19
BlackMagic 8-bit 4:2:2..........x 53,5

All well editable with various NLE in my Core2quad 6600 4GB ram Vista64.

Regards.



Umbiwag posted 2008 Sep 30 21:45
I have tried a lot of options but am getting nowhere. I hope someone can help. I have a Canon HF100 and am recording in FXP model which is 1920x1080, 29.97fps . I am downloading the files to my PC and ending up with a *.m2ts file. I am renaming the file to *.mts, dropping it in the DGAVCDec folder and using the "848x480_Deinterlaced_NTSC.bat" file to generate the *.avc file. When I go to preview the file in VirtualDub I am getting corruption that looks like a chunchk of pixels turning white. Any compression I use in VirtualDub gives me the same corrupted result. Attached is a picture showing the *.m2ts frame (which has no corruption) and the same frame in virtualDub preview. What on earth can I do to fix the corruption? I am using DGAVCIndex 1.0.2. Thanks!




Soopafresh posted 2008 Sep 30 21:51
Yup. Certain cameras aren't working with DGavcdec. No free solution at the moment until libavcodec.dll gets updated.


poisondeathray posted 2008 Sep 30 22:04
DGAVCdec is using an older libavcodec library (even the newest DGAVCdec, 1.02)

Until it is updated, you can use DirectShowSource() with a newer version of ffdshow (free) (it works with v2080 or later - I think it is up to v2150 or so now), or with CoreAVC (not free) as the decoder

This is from HF100 as well (corruption in the windows)

dgavcdec100a35


DirectShowSource() + ffdshow 2080



Soopafresh posted 2008 Sep 30 22:20
Good idea. You can use this batch file instead. Unzip and put in same folder as the other stuff.

directshowsource_848x480.zip



Umbiwag posted 2008 Sep 30 22:33
Thanks - where can I find/download DirectShowSource()?


Soopafresh posted 2008 Sep 30 22:46
It's built into Avisynth.


Umbiwag posted 2008 Sep 30 23:16
Thanks so much for your assistance - I am not a savvy video editor so I hope you can walk me through the steps one by one. I have AVISynth 2.5 installed. I have also installed ffdshow 2156 and have a few options (Audio decorder config, makeAVIS, VFW config, Video decoder config). I also downloaded the .bat file. So now that I think I have all the bits and pieces, what do I do to get my m2ts into an AVI? I tried putting the directshowshource.bat file in the same directory as the .mts file which is in the DGAVCDec folder. It generated an avs file. I then launched makeAVIS, used the avs script just created, click on create and I get an error "Unable to load C Plugin: yadif.dll.


Soopafresh posted 2008 Sep 30 23:42
Put in same folder as your batch file and .MTS to convert.


yadif.dll


BTW, Did you recently install Avisynth or has it been on your system for some time? Actually, just download and install the latest:

http://sourceforge.net/project/downloading.php?group_id=57023& ... p;19898557



Umbiwag posted 2008 Oct 01 08:51
Thanks Soopafresh but it still does not work.

I run the batch file and the result is:
load_stdcall_plugin("yadif.dll")
DirectShowSource("20080927183854.mts").normalize()
yadif()
fadein(15).fadeout(15)
Lanczos4Resize(848,480)


I get a message "AviSyth AVI creation succeeded" but only a 27kb AVI file and the followign error:

My guess is that I have to put some file in a different location but I have no clue where?








poisondeathray posted 2008 Oct 01 08:57
I don't use Soopa's .bat files, but I think you might have to specify the path (this is how you would have to do it manually)

eg. DirectShowSource("C:\PATH\file.mts",fps=29.97)

Also make sure h264 is enabled in the ffdshow configuration (set to "libavcodec" instead of "disabled")



Umbiwag posted 2008 Oct 01 09:37
Thanks fellow Canadian.
I am still at a complete loss. Can you spell out (for boneheads like me) the step by step instructions please. I don't get the file not found error anymore but there is obviously something wrong as I have a 26kb avi file. I have the most recent versions of all the software installed so if you can let em know where the file.mts should be placed, what is the first step, etc. I may actually be able to do this!



Umbiwag posted 2008 Oct 01 09:40
Forgot - I think the problem bay be in the avisynth script which ffdshow is asking for. What method do you use to create the file.avs?


poisondeathray posted 2008 Oct 01 09:48
Umbiwag - Sorry I'm not to familiar with batch files. I do everything manually. I'm guessing everything should be in the same folder, and that the batch file automates the script generation +/- encoding

I use AVSEdit, or AvsP to edit/create .avs files then feed the scripts into an encoder or editor

<...Paging Soopa...>



Umbiwag posted 2008 Oct 01 10:09
Thanks poisondeathray. No more error just a useless AVI file. Is it possible to post one of your AVS scripts? Also, I have all the default settings for ffdshow - is there anything I need to do / check off / change to make this work? I have the H.264/AVC decoder set to libavcodec.


poisondeathray posted 2008 Oct 01 10:24
I tested Soopa's recent directshowsource .bat file from page 9 - it works fine

You need the avchd convert package from page 1. Unzip the directshowsouce .bat file into the same folder. Place the .mts clip in the same folder

This will only generate an .avs file (it's just a script that frameserves into an encoder - it won't generate a final file. It's like a "dummy" file so that other applications can "read" the original .mts file)

You need avisynth, ffdshow (h264 enabled which sounds like you already have) and haali media splitter installed

You can use this script to feed into an encoder/editor (e.g. vdub if you wanted to edit, if you wanted to make a DVD put it into an MPEG2 encoder, if you wanted and XviD .avi you could do it in vdub...etc...)

If you wanted to preview it, open it up in AVSEdit and slide the preview bar. You can change the size, add filters, trim etc...

If you tell me what your final format goal is, I might be able to provide suggestions



Umbiwag posted 2008 Oct 01 11:54
Thanks again! Absolutely everything is installed on my XP system.

My format goal is an AVI that I can import into Premier CS3. I am not certain what output to expect from ffdshow / makeAVIS. Should I expect an AVI file which is similar in size to the mts file? Does the ffdshow VFW configuration make a difference? What I am struggling with is why there is a 26k avi file created out of a 23MB mts file using makeAVIS?



poisondeathray posted 2008 Oct 01 12:04
I'm not familiar with makeAVIS - i think it too makes a dummy file.

I think you can just use the Premiere AVS import plugin
http://sourceforge.net/project/showfiles.php?group_id=105017

This will frameserve using the .avs into Premiere

You may want to change the .avs script for full resolution that was auto generated by the .bat file, because it is resized to (848,480). Just edit out that LanczosResize line in avsedit or avsp



Umbiwag posted 2008 Oct 06 21:46
Just a quick thanks to poisondeathray and Soopafresh - very helpful and I now have a solution that works well. I finally got everything figured out. Now all I need a new quad core and a 1.5TB drive to handle the huge amounts of data.


syrou posted 2008 Nov 08 14:47
Hello all,

I find these batch files particularly interesting. Are there any updates?

Thanks for the work!



dererik posted 2008 Nov 09 15:43
Hi all

I found a solution for the Canon HG 10 with following problems:

Some mts files are fine to process, some give me messages like:

- Found NALU type 0, len 0 undefined, ignore NALU

- reserved picture_structure used (can´t determine NumClockTs)

This was disussed earlier here and it seems, that IDR keyframes are missing, so DGavcIndex and Libavcodec can't index it properly.

My solution:
the camera starts recording and writes any information into the .mts file. After a while, the video is split, that there is no part bigger then 2 GB. The last part is something less then 2 GB.

Trying to convert any other then the first part fails, so you need to combine the files to a big one, always starting like you did with the camera.

Copy /b 00001.mts+00002.mts+00003.mts output.mts

I try neuron2´s DGAVCIndexNV with a Nvidia 8400 GS and that is really really fast, worthwile the 15.

works for me
regards
erik



Soopafresh posted 2008 Nov 09 19:47
syrou :
Hello all,

I find these batch files particularly interesting. Are there any updates?

Thanks for the work!


What I'd recommend (as does erik above me) is the DGavcindexNV decoder. It's functionally equivalent to the free DGavcIndex, but does a better (and faster) job with AVCHD files (as long as you have an Nvidia 8 or 9 series video card). It also works with many AVCHD files that the free version has trouble with. The deinterlacer in particular is very good and quite fast. http://neuron2.net/dgavcdecnv/dgavcdecnv.html

My batch files would need minor modification to work, just a search and replace in notepad would do it.



bayme posted 2008 Nov 10 03:50
Soopafresh :
What I'd recommend (as does erik above me) is the DGavcindexNV decoder. It's functionally equivalent to the free DGavcIndex, but does a better (and faster) job with AVCHD files (as long as you have an Nvidia 8 or 9 series video card).
That's a really good tip. I have a Gigabyte GeForce 9600 GT (i.e. Nvidia chips), so it should work on my system. Thanks!


fishywishy posted 2008 Nov 10 12:28
Soopafresh :
avchd_convert_v7.zip

The __1920x1080_Same_As_Source.bat file will output the same settings as your input file.


ok im dumb. is there a .bat for 1440x1080 60i? all i want in uncompressed 1440x1080 that i can edit in virtualdub

i like voltaicHD but only the wmv works for me. but its hard to edit plus the quality drops a lot. the avi decoder squishes the file so its out of proportion so thats useless. plus id rather have free software

the cam is a sony hdr-cx7 and i have a quad core so i know my comp can handle it. ive tried multiple programs that can handle avchd and none can output raw 1440x1080 :(



Soopafresh posted 2008 Nov 10 12:49
Yes, the 1920x0180 Same as Source batch file will work for you :)

There's a lot of confusion about 1440x1080 output. 1440x1080 at 16:9 aspect ratio becomes 1920x1080 at 1:1 aspect ratio. During playback of your AVCHD file with your favorite media player, the image gets horizontally stretched to display 1920x1080 on your screen.

If you want more information, search on PAR vs DAR. This is a pretty good explanation: http://www.3ivx.com/support/par.html



fishywishy posted 2008 Nov 10 12:54
Soopafresh :
Yes, the 1920x0180 Same as Source batch file will work for you :)

There's a lot of confusion about 1440x1080 output. 1440x1080 at 16:9 aspect ratio becomes 1920x1080 at 1:1 aspect ratio.


but it stretches it to 1980x1080. i want it at 1440x1080



Soopafresh posted 2008 Nov 10 12:56
Okay, gimme a sec and I'll upload a file for you to do this.


Edit: download and unzip into the same folder as the other batch files.

__1440x1080_.zip



syrou posted 2008 Nov 10 13:57
Thanks for the tips, I'll give DGavcindexNV decoder a try.

BTW, what I was talking about is there may be a v8 update with newer version of quality critical binaries such as x264 and yadif. Also, a combination of all these batch files are a valuable tool. It would be great if someone with scripting abilities could make some wizard, as I've realized there are some steps with A, B or C possible answers (like final resolution, deinterleazing, fps and so on). I totally beleive in x.264 project it's a perfect core for a transcoding tool.

It's a pity there are so many tools available for novices like me. It's kind of confusing ;) Right now, have tested a lot of tools: AutoMKV, VirtualdubMod+CoreAVC, TMPGenc... None of those has given me optimal quality, and it's probably my fault. H.264 is soooo complex to understand and has so many parameters to touch, given a particular video (slow/fast motion, etc etc).

Next time I shot with my HF100, I'll have to choose between 50i and 25p. Have read somewhere that 25p in the Canon camcorder is some kind of trick (discarding frames) and that it is not true progressive scan. Should I trust yadif more?

Last but not least, as I suppose lots of people do, I make a postproduction phase with my videos with Pinnacle Studio. For speed and quality sake, should I better decompress and lagarith recompress source videos before editing them?

Thanks for reading!



fishywishy posted 2008 Nov 10 14:12
Soopafresh :
Okay, gimme a sec and I'll upload a file for you to do this.


Edit: download and unzip into the same folder as the other batch files.

__1440x1080_.zip


perfect, exactly what i wanted. thanks a lot! i was about to give up and return the cam :|



Soopafresh posted 2008 Nov 10 15:34
BTW, what I was talking about is there may be a v8 update with newer version of quality critical binaries such as x264 and yadif.

All of the batch files written are meant to be tweaked by the end user. The cake's been baked, you decide on the frosting :)

X264.exe comes out with a new revision every week. You're more than welcome to download the latest and greatest version. It should work, as long as they don't change the syntax between revisions.

Yadif.dll hasn't been updated by the author since Jul 2007. Doesn't really need to be. There are tons of different deinterlacers out there which you can experiment with. I like Yadif because it's a good compromise between speed and quality. I think the deinterlacer which is available through Nvidia's 8 and 9 series video cards is really good and fast. It can be accessed through DGavcIndexNV.


It would be great if someone with scripting abilities could make some wizard, as I've realized there are some steps with A, B or C possible answers (like final resolution, deinterleazing, fps and so on). I totally beleive in x.264 project it's a perfect core for a transcoding tool.


Check out RipBot264. If I recall, it will work with AVCHD source files.

Next time I shot with my HF100, I'll have to choose between 50i and 25p. Have read somewhere that 25p in the Canon camcorder is some kind of trick (discarding frames) and that it is not true progressive scan. Should I trust yadif more?

I find the fluidity of movement better when shooting in progressive mode rather than yadif in post. Deinterlacing HD res material is very time consuming.



fishywishy posted 2008 Nov 10 15:43
unbelievable. every single source i read says the cx7 shoots 1440x1080, every player says thats its size, voltaicHD converts it to that size in wmv, yet when i extract it with that .bat you made me and save it once thru virtualdub it gets stretched vertically. when i extarct it with 1920x1080 with virtual dub it looks fine and converts fine


Soopafresh posted 2008 Nov 10 15:48
fishywishy :
unbelievable. every single source i read says the cx7 shoots 1440x1080, every player says thats its size, voltaicHD converts it to that size in wmv, yet when i extract it with that .bat you made me and save it once thru virtualdub it gets stretched vertically. when i extarct it with 1920x1080 with virtual dub it looks fine and converts fine


That's why I wrote the 1920x1080 batch file :)

Read up on PAR vs DAR . 16x9 aspect ratio vs 1:1 aspect ratio vs PAR vs DAR



fishywishy posted 2008 Nov 10 18:07
Soopafresh :
That's why I wrote the 1920x1080 batch file :)


what happened when i 1st used the 1920x1080 bat was i was using a clip with a 2x tele extender in full wide to tell if the image was at the right size. what i didnt take into account is that the cam would capture the sides of the "tunnel vision" but not the top and bottom like you would normally see with standard def. thats why i insisted on having a 1440x1080 bat :oops:



brunori posted 2008 Nov 11 12:26
Hi Everybody,

First, thx Soopafresh for the free "solution".
I using the directshow script with laczos 720x480 to generate DivX 6.8 HT profile files to play in my OPPO 971 DVD/DivX player on a Philips 42PF7321 plasma. My MTS files comes from my Canon HF-100 camcorder and are 1080/60i.
The results are just ok, but not as good as I expected. The DivX file (and I tried Xvid too, but with no beter results and a much biger file!) has somes "artifacts" (not sure this is the right word). See the video anexed. Look at the white and blue blocks of the building. They seam to be shaking!
Does It make any sense to talk about the quality of the ffdshow decoder (or any other decoder)? I think no, as decode seams to me a operations that always give the same result, regardless of wich decoder are in use. I´m I wrong?
Any sugestions?
Thx in advance.

-- Brunori


teste%20divx%20720x480%20ana%20directshow.00.avi



Soopafresh posted 2008 Nov 11 13:03
I could be wrong, but I think you haven't deinterlaced before resizing to 720x480. If you did, then you're seeing shimmering due to your deinterlacer. All common problems with interlaced footage. Set your camera to 30p or 24p and see if you like the results better.


brunori posted 2008 Nov 11 14:09
Soopafresh :
I could be wrong, but I think you haven't deinterlaced before resizing to 720x480. If you did, then you're seeing shimmering due to your deinterlacer. All common problems with interlaced footage. Set your camera to 30p or 24p and see if you like the results better.


Here is my script:

load_stdcall_plugin("yadif.dll")
DirectShowSource("teste.mts").normalize()
yadif()
fadein(15).fadeout(15)
Lanczos4Resize(720,480)

I think yadif() does the deinterlace, does not? Is it the problem?
I will test with 30p, but as I pretend to shoot action sports (surf), I´ll be actualy using 60i, so a need a good deintelacer.

-- Brunori



poisondeathray posted 2008 Nov 11 14:24
This may (or may not) apply but :

1) Maybe that your field order is reversed. If you just use yadif() default, I think avisynth assumes BFF usually, but most AVC is TFF, so try yadif(order=1)

2) Since you are using DirectShowSource() , ensure that your DirectShow subsystem is clear of other contaminating filters (e.g. ffdshow postprocessing might already have a deinterlacer enabled so you would be double deinterlacing), and that your AVC decoder for the source is up to date. As an example, you can see on page 9 an example of corruption also shot with HF100, when using an older ffdshow tryouts version. Another example - If you are using CoreAVC to decode the .mts, deinterlacing might be enabled and yadif() would double deinterlace this as well.



Soopafresh posted 2008 Nov 11 15:14
I liked the results of this deinterlacing method by vampiredom at Doom9. Look towards the bottom of the script for output options. You might want to try the blended deinterlacing if you're going to be shooting a lot of action.

Here's the output from the blended deinterlacing vs the "regular" deinterlacing options. The blended one isn't as crisp, but the movement in the scene is smoother and more natural.

reg_deint.avi

blended_deint.avi


Requires the following plugins:

YadifMOD http://web.missouri.edu/~kes25c/yadifmod_v1.zip
TomsMoComp http://www6.impacthosting.com/trbarry/TomsMoComp.zip
ColorMatrix http://avisynth.org/warpenterprises/files/colormatrix_20070828.zip


DirectShowSource("yourfile.mts")

AssumeTFF()
(isRGB()) ? ConvertToYUY2() : ColorMatrix(mode="Rec.709->Rec.601")

#########################
# DEINTERLACING (Bobbing)
#########################

# padding for mod16 width and height
w16 = ceil(float(width()) / 16.0) * 16
h16 = ceil(float(height()) / 16.0) * 16
bL = (w16 - width()) / 2
bR = (bL % 2 != 0) ? bL - 1 : bL
bL = (bL % 2 != 0) ? bL + 1 : bL
bT = (h16 - height()) / 2
bB = (bT % 2 != 0) ? bT - 1 : bT
bT = (bT % 2 != 0) ? bT + 1 : bT

(bL > 0 || bR > 0 || bT > 0 || bB > 0) ? AddBorders(bL, bT, bR, bB) : last

yadifmod(mode=1, edeint=Interleave(TomsMoComp(-1, 0, 0), DoubleWeave().SelectOdd().TomsMoComp(-1, 0, 0)))

(bL > 0 || bR > 0 || bT > 0 || bB > 0) ? Crop(bL, bT, bR * -1, bB * -1) : last

#########################
# CROP / RESIZE
#########################

# crop a little from the top and bottom to allow fullscreen with accurate PAR (assuming 1080i source)
Crop(0,14,0,-14)

Spline36Resize(720, 480).sharpen(0.2)

######################
# OUTPUT OPTIONS
######################

# Uncomment only one of the lines below

# This produces interlaced YV12 output
#AssumeTFF().SeparateFields().SelectEvery(4,0,3).Weave().AssumeTFF().ConvertToYV12(interlaced=true)

# This produces progressive YV12 output, with blending
# Merge(SelectEven(), SelectOdd(), weight=0.5).ConvertToYV12(interlaced=false)

# This produces progressive YV12 output, without blending
SelectEven().ConvertToYV12(interlaced=false)

Limiter(16, 235, 16, 240)



dererik posted 2008 Nov 12 07:43
Hello Soopafresh et al

I know you answered these question, but I really do not understand:

I use DGAVIndexNV and it tells me:

Frame Size 1440x1080
SAR 4:3
Display Size 1920x1080
Frame Rate 25 fps



later I switch to VirtualDub, here is the *.avs:

LoadPlugin("C:\tools\video\_dgavdecnv\DGAVCDecodeNV.dll")
AVCSource("00002.dga").BilinearResize(720,520)

with or without ".BilinearResize(720,520)" the resulting avi looks strange, bulked or compressed in the horizontal view.

Any ideas?

regards
erik



poisondeathray posted 2008 Nov 12 08:56
@dererik

Your original source has a DAR of 16:9 or 1.7778, even though the frame size is 1440x1080 (4:3).

Avisynth assumes square pixels (1:1), as does vdub, so a resize to (720,520) will end up with an aspect ratio of 1.385 (because 720/520 = 1.385)

You can either :

1) Resize to something close that gives a DAR of 1.7778 (e.g. 720x400) when using square pixels

2) When encoding, enter the stream information by changing the pixel aspect ratio (PAR) (or this is sample aspect ratio --sar if you are using x264). i.e. Non-square pixels

3) Adjust the container flags to display the original 16/9 aspect ratio. e.g. use mkvmerge to set the flags.

The solution that works for all players, formats and containers is #1. Most will, but not all players will honor or display properly if #2 or #3 is done.



Soopafresh posted 2008 Nov 12 11:45
@dererik

What poisondeathray said.

BilinearResize also isn't a very sharp resizer. Use Spline36Resize(720,400)



dererik posted 2008 Nov 14 09:16
thanks poisondeathray and Soopafresh,

1 works for me at the moment

regards
erik



brunori posted 2008 Nov 16 09:07
Soopafresh :
I liked the results of this deinterlacing method by vampiredom at Doom9. Look towards the bottom of the script for output options. You might want to try the blended deinterlacing if you're going to be shooting a lot of action.

...

[/size]



Hi There,

I´m still having problems converting canon HF100 MTS 1080/60i files to Xvid/DivX 720x480 (and others SD resolutions).

After several tries (all from a footage with tripod, image stabilization off, and no panning, just zoom in and out. For minimizing chances of footage problems), the best I could get was this (anexed):

Note the artifacts when I zoom in and out.

The script I use:

----
loadplugin("tomsmocomp.dll")
# I think directshow still gives me 60i (since there is no active deinterlace filter), so no need for separatefields()
DirectShowSource("teste 60i.MTS")
# As I know, these MTS files from canon are TFF, so the "1" on the first parameter
TomsMoComp(1,5,1)
Lanczos4Resize(720,400)
-----

I have checked and the is no ffdshow or virtualdub filters active (I use fast recompress anyway).
I still have some doubts about these canon MTS files, please give me some places I can find some info about:
Are they YU12?
Are they realy 60 fields per sec or 59,94 fiels per sec? Does this make any difference?

Any sugestions?

thx in advance.

-- Roberto

virtualdub%20avisyth%20toms%20fast%20recompress%20teste%2060i.avi



poisondeathray posted 2008 Nov 16 09:24
@brunori - Those artifacts are likely from your AVC decoder. If you are using ffdshow tryouts, upgrade to a more recent version. You can see examples a few pages back that it does make a difference using DirectShowSource() . DGAVCDec still uses the old libavcodec library so it has the same problem as older revisions. Newer versions of ffdshow handle interlaced AVC material much better without those artifacts. An even better alternative is using CoreAVC, but it costs $15

It is YV12 colorspace 4:2:0, 59.94 fields/s



brunori posted 2008 Nov 16 10:38
poisondeathray :
@brunori - Those artifacts are likely from your AVC decoder. If you are using ffdshow tryouts, upgrade to a more recent version. You can see examples a few pages back that it does make a difference using DirectShowSource() . DGAVCDec still uses the old libavcodec library so it has the same problem as older revisions. Newer versions of ffdshow handle interlaced AVC material much better without those artifacts. An even better alternative is using CoreAVC, but it costs $15

It is YV12 colorspace 4:2:0, 59.94 fields/s


Many thx poisondeathray!

Now is realy nice!

The trick is that when we click "download" on "http://ffdshow-tryout.sourceforge.net/" (the official site), it starts downloading a mainstream (stable) version that has the bug!

BTW, is CoreAVC realy better than the ffdshow alternative? How much better?
I thouth decoding has not a great diferential between solutions!

Thx again.

P.S.: Please, confirm TFF on HF100 1080/60i. Is there a software/utility where I can see these atributes directly on the file?



Soopafresh posted 2008 Nov 16 15:56
BTW, is CoreAVC realy better than the ffdshow alternative? How much better?
I thouth decoding has not a great diferential between solutions!


Depends on the CPU in your computer. CoreAVC is very good with slower CPUs. With faster CPUs, the difference between CoreAVC and FFdshow isn't so much. Your Athlon 4400 would benefit by using CoreAVC, especially for playing your MTS files on your computer. CoreAVC has a 14 day evaluation of their decoder.

All HD transport streams are TFF



poisondeathray posted 2008 Nov 16 17:50
brunori - yes the "official" ffdshow site is old. The newest svn versions can be found here (also on sourceforge):

http://sourceforge.net/project/showfiles.php?group_id=173941

Any build within the last few months should have that bug fixed, I tested as far back as rev. 2080 and it decoded those streams properly



fishywishy posted 2008 Nov 18 14:36
is there any reason these mts converters or avchd players would make teh image have verical line across the whole video? maybe the way it makes 1440 to 1920? im about to return a sony hdr-cx7 because it looks bad




poisondeathray posted 2008 Nov 18 14:42
@fishywishy - I suspect there is something wrong with your decoder and/or playback chain. The horizontal lines maybe there from interlacing but there should not be any vertical lines

What camera is this from?

What software are you using to "convert" or to "view" ? The image should be 1920x1080, but your attached bitmap is 1440x1080 - so whatever software you are using is not honoring the 16:9 DAR flag

Can you upload a small sample of the unprocessed source to a free hosting site? e.g. mediafire



fishywishy posted 2008 Nov 18 14:49
poisondeathray :
@fishywishy - I suspect there is something wrong with your decoder and/or playback chain. The horizontal lines maybe there from interlacing but there should not be any vertical lines

What camera is this from?

What software are you using to "convert" or to "view" ? The image should be 1920x1080, but your attached bitmap is 1440x1080 - so whatever software you are using is not honoring the 16:9 DAR flag

Can you upload a small sample of the unprocessed source to a free hosting site? e.g. mediafire


'07 sony hdr-cx7

i used the avchd_convert_v7.zip and the vimeo one as well. i also used voltaicHD to wmv. i viewed the mts with oxygen avchd player. all show these vertical lines (click the image to full size and youll see them)

youre correct, i captured that image before i knew how to correctly use avchd_convert_v7.zip. however even at 1920x1080 i get those lines. when i get home ill upload a .mts file

much appreciated

oh and the cx7 records @ 1440x1080 and then strecthes it to 1920x1080 when its played or converted to raw to edit. thats where im guessing these lines are coming from



fishywishy posted 2008 Nov 18 16:53
heres a quick 5 second clip

http://www.mediafire.com/download.php?tm1mzgy4zng



poisondeathray posted 2008 Nov 18 17:04
Yes what you are saying about the DAR is correct. If you use MPC, for example it will display properly because it acknowledges the flags and displays as 1920x1080. The frame size is still 1440x1080 in avisynth or editing programs because they usually assume 1:1 square pixels

However, your sample has vertical lines despite using different decoders/renderers/software. I suspect something is wrong with your camera and/or your settings. For example, you can download other hdr-cx7 clips that do not have these lines (just the regular horizontal interlacing ones)

http://av.watch.impress.co.jp/docs/20070711/zooma314.htm



fishywishy posted 2008 Nov 18 17:11
wow, yeah my camera must be screwed up. guess thats why it was an open-box :| thankfully theres no restocking fee


Soopafresh posted 2008 Nov 18 17:14
Yeah, something is up with your camcorder.


brunori posted 2008 Nov 19 07:38
Soopafresh :


All HD transport streams are TFF


Thats strange, when opening an MTS file with

DirectShowSource("file.MTS").info()

the info filter shows BFF. If I use assumeTFF, it shows "TFF assumed".
Does info() reads some file field thats overlooked by assumeTTF()?

-- Brunori



Soopafresh posted 2008 Nov 19 19:43
Open up your file with DGavcindex. That'll be the more accurate method of determining field order.




waefwaeefwaefw posted 2008 Nov 23 21:20
Hi, thank you for the scripts!
However, the kind of .mp4 files your vimeo script creates does NOT work with Quicktime 7.5.x. Apparently it's not an h.264 or AAC problem, but an mp4box/aac combination problem. Please try to fix the problem, there are some pointers in this thread: http://thread.gmane.org/gmane.comp.video.mencoder.user/8533/focus=8568

Also, I would kindly suggest you remove the fadein/fadeout from the default script, because many people are using your scripts to create proxy files for further editing instead of just final versions of their videos, and so the fades interfere with further editing. Thanks!



dpShorts posted 2008 Dec 07 18:46
I'm brand new to this forum so let me start my saying a most heartfelt thank you to Soopafresh not only to the tremendous service he provides to the members of this forum but to the video enthusiast community at large.

I've been using your AVCHD_Convert scripts for several weeks now (i.e. since I purchased a Canon HF100.) The script package is a godsend for anyone attempting to edit AVCHD files on a PC that was purchased any less recently than a month ago. (Exaggeration intended.)

I use the scripts to convert 1920x1080 AVCHD to 640x360 MPG proxies, edit the proxies in Vegas Pro 8.0c and switch back to the original MTS files for final rendering. The workflow is a little tedious but Soopafresh's scripts make it manageable and cost effective.

(Note: It was Eugenia Loli-Queru who turned me on to this method. For those of you who are interested, check this link: http://eugenia.gnomefiles.org/2008/05/04/avchd-transcoding-using-free-tools)

The only "issue" I've found so far is that my converted MPG proxy files seem to be missing two frames at the beginning of each clip. If I place both an MTS file and its corresponding MPG file on the timeline (i.e. one on top of the other), I have to shift the MPG file two frames to the right to have it line up with the MTS.

Admittedly, two frames doesn't sound like a huge problem but when syncing to external (i.e. non-camera) audio, it becomes a major issue when your entire final render is out by two frames.

Question is: Is there something I can do to ensure the input and output files are identical in length. That is, recover the two missing frames?

Note: I've modified Soopa's _multi_demux_mts_HQ.bat script to:

a) remove the fadein() and fadeout() calls and
b) convert the AVS file to MPG with the following command:

for %%a in ("*.avs") do ffmpeg.exe -i "%%a" -vcodec mpeg2video -s 640x360 -b 1500k -y "%%~na.mpg"

I much appreciate any advice you can offer.

Thanks,
dp



Soopafresh posted 2008 Dec 07 19:29
Hi dpshorts, thanks so much for your kind words :D I've learned tons of stuff from Eugenia. She's bright as a whip.


The only "issue" I've found so far is that my converted MPG proxy files seem to be missing two frames at the beginning of each clip. If I place both an MTS file and its corresponding MPG file on the timeline (i.e. one on top of the other), I have to shift the MPG file two frames to the right to have it line up with the MTS.


I know... it's the demuxer - xport.exe . It looks for and splits on the first I Frame in the MTS file in order to maintain A/V sync. So if the MTS doesn't start on an I frame, the program skips ahead, cutting out the first frame or 2. The only suggestion I can make is to use the DirectShowSource() method, which will work fine, as long as you have the latest FFdshow or CoreAVC codec installed. If you can play the MTS file in Media Player or Media Player Classic, then you're already set to go.

Try this http://forum.videohelp.com/images/guides/p1892916/directshowsource_848x480.zip . Put the batch file in the same folder as the other stuff.

for %%a in ("*.avs") do ffmpeg.exe -i "%%a" -vcodec mpeg2video -s 640x360 -b 1500k -y "%%~na.mpg"

Cool, since you're resizing to those dimensions, you may as well modify the batch file to resize to 640,360 in Avisynth. I'm refering to the line that says Lanczos4Resize(848,480) .It'll make the conversion run a bit faster as a result.



dpShorts posted 2008 Dec 07 21:00
Soopafresh... I've installed the latest FFdshow (i.e. 12/05/2008) but DirectShow is failing. It's creating an MPG file within which is contained the error message (one of the more creative methods of error reporting I've encountered.)

Essentially, the message is "DirectShowSource: couldn't open file XXXX.MTS: Cannot play back the file. The format is not supported."

This tells me my system isn't configured to use FFdshow as its default codec for MTS/h.264 files.

Also noteworthy...

1) I installed a 14-day trial edition of CoreAVC over a month ago. It's still installed but has expired.

2) I tried throwing my MTS file into GraphEdit but the application was unable to create a graph from the file and asked "Have you installed all necessary filters?"

Thoughts?



Soopafresh posted 2008 Dec 07 23:50
1) Uninstall CoreAVC (if it's installed)

2) Download and Install the Latest FFdshow Beta http://sourceforge.net/project/showfiles.php?group_id=173941& ... _id=439904

3) Enable h264 decoding in FFdshow. You'll want it to say "libavcodec"



4) Download and install Haali Media Splitter (aka Matroska Splitter)

5) At this point, you should be able to play your MTS files with Windows Media Player or MediaPlayer Classic. If you don't have audio working, try to turn in on once again with ffdshow settings.




ch1apet posted 2008 Dec 21 22:51
Hey Soopafresh! I posted a really long time ago, and you gave me a lot of help while I was starting out trying to get videos off of my Canon HF10. I just wanted to drop a note to say that your stuff is fantastic, it works really well, and I learned a lot from lurking this thread! Keep up the good work, and thanks a ton!

P.S. - For some reason, I got an error message from the batch files on the front page when I tried to convert to x264 for vimeo, but I just went and got a new version of x264 and it worked like a charm. Just a heads up! Thanks again.



Soopafresh posted 2008 Dec 21 23:26
Hey, thanks for the heads up! I'll fix it.


dpShorts posted 2008 Dec 22 11:49
Soopafresh,

Been busy with the day job for the past few weeks. I greatly appreciate your mini-tutorial on ffdshow setup. I've followed it and am now able to playback MTS files via WMP... albeit slowly (but that's hardware related.)

Using your scripts on my PC now results in an MPG2 file that is of fine quality but is out of sync with my original files by an indeterminate number of frames which is problematic for my purposes.

However, the good news is that using SUPER (i.e. with DirectShow on) to do my AVC to MPG2 transcoding with the new ffdshow results in files that miss all but the final few frames... an issue I can live with.

If you're interested in seeing the results of my first HF100 project, check here for HD version:
http://www.youtube.com/watch?v=Uy6ziCEJ5AA&fmt=22

or here for YouTube SD: http://www.youtube.com/watch?v=Uy6ziCEJ5AA

Much thanks for helping this project come to fruition.

An interesting side note is that--using SUPER--on WinXP, FFMpeg produces usable files while MEncoder doesn't. On Vista however, the situation is reversed... MEncoder produces usable files.

In any case, thanks for your fantastic support and service of this forum and the community at large.

Happy holidays.



Soopafresh posted 2008 Dec 22 12:36
Balls!!!!!!!!!!!!!!!!!!!!! :lol:

I love "The City"

Looks great, I'm amazed at how well the HD transcoding is working over at Youtube.



kcnu posted 2008 Dec 25 15:15
Hi Soopafresh and Dpshorts,

Thanks a bunch for your excellent help in this forum. I am very happy with my Canon HF100 video, but had trouble converting the mts/m2ts files to regular DVD or mp4 to share with friends n family.

I then followed steps in this forum and http://eugenia.gnomefiles.org/2008/05/04/avchd-transcoding-using-free-tools to create .VOB and mp4 files. I could successfully do this if the file size is small, but ran into trouble when I tried to convert 6 GB file to mp4 format.

FYI, here is the SUPER profile I used to do that:

[Encoder]
Format=8
VidCodec=3
AudCodec=1
Encoder=0
VidBitr=109
AudBitr=7
VidScaleSize=0
MoreScaleSize=2
CustVWid=1280
CustVHght=720
Cust1VWid=368
Cust1VHght=208
Cust2VWid=416
Cust2VHght=176
VidAspect=-1
VidFPS=10
MoreFPS=0
Custfps=8
Cust1fps=16
Cust2fps=20
AudSample=6
AudChanl=1
VidDisable=0
AudDisable=0
VidCopy=0
AudCopy=0
Vidhq=1
Vidtq=0
Vidfasp=1
AudioSampleReference=0
AutoAudience=0
Target=0
TStarget=0
Theme=5
OutPutFolder=C:\Program Files\eRightSoft\SUPER\OutPut\
SourceFolder=z:\
DSlogo=0
DSlogoMessg=*eRightSoft*
DSlogoFont=Vivaldi
DSlogoSize=28
DSlogoColor=10354879
DSlogoHlColor=16240383
DSlogoPos=4
DSJoinMux=1
DSMotion=-1
DSsmUD=12
DSfmUD=69
DSFH=0
DSFV=0
DSRevrs=0
DSTurning=-1
DSinvY=0
DSinvU=0
DSinvV=0
DSBW=0
DSFI=0
DSFO=0
DSFIsec=4
DSFOsec=03
DSInf=0
VidDeinterlace=0
BF=0
H264Stream=0
BFrames=2
EncodeDuration=0
ClosedGOP=0
GOPAuto=0
ManualGOP=15
AdjustVolume=1
EncodeVolume=5
SnapShotAt=4.3
VideoOffsetSec=3
EncDurationFor=10
CropTop=32
CropRight=0
CropButtom=32
CropLeft=0
PadColor=4670008
PadTop=32
PadRight=0
PadButtom=32
PadLeft=0
H264profile=1
H264level=11
FLVTag=
[RealProducer]
Path=C:\PROGRA~1\
Audience=0
EncodeProfile=1321
[GeneralOptions]
ShowHints=1
ShowWarnings=0
ShowCreditScreen=1
AlwaysOnTop=1
AnalyzeON=0
AviSynthON=0
PSPcnt=0
VOBcnt=19
SameSrcFolder=0
UnderScoreON=0
SameDateTimeON=0
LowerCaseON=0
[Player]
Brightness=-75
Contrast=-5
Hue=0
Saturation=0
FullScreen=1
Aspect43=0
Aspect169=0
Tiles=0
PlaySlow=0
PlayFast=0
Deinterlace=0
Flip=0
Mirror=0
TurnRight=0
TurnLeft=0
ShowLog=0

Not sure if I am doing anything wrong here, please advice if I should try any thing different.

PC config: Core 2 duo 2GHz processor, 3 GB Ram, 160GB HDD and Win XP SP2

Thanks again.
Kcnu





Soopafresh posted 2008 Dec 25 15:30
Hi kcnu - Ask at the Super Forum (see bottom of your error message)


Glashio posted 2008 Dec 26 12:42
Soopafresh, I have using your scripts since few months now with beautiful results on youtube :) ( Sony HDR-SR11 )

I installed the conversion script (avchd_convert__vimeo__v8.rar) & avisynth on a clean windows xp 32bit laptop and ran the script.
On the x264.exe encoding part it reported an error, about missing : pthreadGC2.dll file (Multithreading...).
I fixed it with installing AviDemux and copy the .dll to the directory.

Many thanks for your great work!!! Your scripts are awesome!!! Happy 2009 :D



Soopafresh posted 2008 Dec 26 13:46
Thanks, Glashio :) I just updated the Vimeo script to v9 with a different version of X264. That should take care of the problem.


benzo posted 2008 Dec 29 03:29
I'm trying to use this method to convert AVCHD files from a Panasonic HDC-SD9. No matter what I do I'm getting artifacts in the final video.

I've used DGAVCIndex to look at the avc file that comes out of the xport command, and third frame from frame 6 has blocky artifacts - all other frames are fine.

The footage from the camera is 1920x1080 @ 50fps interlaced.

I can use Voltaic HD to convert the files and the output is fine, but I'm looking for an open source / free option.

Any advice?

Thanks,

Ben.




djthomas98 posted 2008 Dec 31 12:57
Hi Soopafresh,

I'm trying to playback the .mts files from my Canon HF100 using Windows Media Player. The audio seems to playback fine, but the video plays a lot slower and is way out of sync with the audio. I'm having the same problem when using Media Player Classic. I followed your recommendation to install the latest version of ffdshow and Haali Media Splitter. But after doing so, I'm still having the same problem as before in which the video is slowed down and can't keep up with the audio. Any suggestions? I'm new to this, so maybe it's a simple issue that I'm just not seeing. Thanks!



Soopafresh posted 2008 Dec 31 16:07
benzo - look at my Dec 7th post on this page on how to use the DirectShowSource solution to your problem. This batch file uses directshow: directshowsource_856x480.zip


djthomas98 - Your computer isn't fast enough to play AVCHD files at full resolution. P4 2.8Ghz isn't going to cut it. Plunk down $500 for a Quad Core Q6600 or E8400 computer.



benzo posted 2009 Jan 02 13:30
Soopafresh :
benzo - look at my Dec 7th post on this page on how to use the DirectShowSource solution to your problem. This batch file uses directshow: directshowsource_856x480.zip

Cheers - that did the trick, sorry I missed it.

Ben.



WallyMa posted 2009 Jan 28 13:57
This AVCHD thing was driving me crazy! Thanks so much! I am stabilizer crazy with virtual Dub + the plugin De shaker I and I thought I'd never be able to use my Sony HDR-7 with it.
Wally



Soopafresh posted 2009 Jan 28 14:52
Thanks for your kind words :)


Squid267 posted 2009 Jan 29 21:41
Is there support for .m2ts yet?


Soopafresh posted 2009 Jan 29 22:07
This should work, although I haven't tested it at all

avchd_convert_m2ts.rar



Squid267 posted 2009 Jan 30 06:19
Alright it converts it to .avs fine. I'm a little confused as to what to do from there. I can open it up in Virtual Dub and save as avi.


Soopafresh posted 2009 Jan 30 10:58
Squid267 :
I'm a little confused as to what to do from there. I can open it up in Virtual Dub and save as avi.


That's precisely what the batch files are for - they create AVS files which you can feed into any app you want. In VirtualDub for example, you can save the video as a lossless Huffyuv or Lagarith AVI file for editing in an app like Vegas or Premiere.

You can also feed the AVS file to an app like WinFF which will create Xvid or h264 AVIs.



Squid267 posted 2009 Jan 30 15:18
Great! I'll be sure to try it out soon. I'll let you know how it works.


esod posted 2009 Feb 18 04:47
hello Soopafresh - thanks for all your work here, it has been a fantastic learning experience!

though, i am still at a loss on how to go about what i am trying to accomplish. allow me to elaborate..

i have a ~20gb m2ts file (joined-1.9gb mts' in TSRemuxGui) at 1920x1080/24p
i am trying to transcode to an h264 file roughly 1/5th of the size (~4-5gb) at 1280x720 with a bitrate of ~3500 ,all of this for easier distribution to my associates
(im not sure if these settings will leave me with the file size i'm after, but they're more important because want to retain as much quality as possible for editing after this process)
i have the latest cineform codec available to me

basically, i need a proper avs script.. but i am rather confused as to which settings i need in the avs to do so.
do you think you could help me out with the settings? how do i achieve this resolution/bitrate/fileformat?
how do you make an avs use cineform?
what differences would be needed in the avs if the source were filmed in 30p?
thanks in advance, for all of the previous support to other members of this forum, and for any assistance you can provide me.
Please forgive me if i'm using any incorrect terminology as i'm quite new to the video editing scene, not to mention AVCHD :(
-esod



Soopafresh posted 2009 Feb 18 14:15
Hi esod, the scripts in the package are not going to work for you because TSremux changes the file enough that they won't demux.

What I'm trying to say is, if you want the easiest and best way (plus Cineform codec), buy the $100 Neo Scene software from Cineform. It'll convert your MTS files to Cineform AVIs so you can then edit them in just about any editing program. It'll also be a more joyous editing experience if your files are in peppy Cineform rather than clunky AVCHD.

Neo Scene has a 2 day eval of their software, you can try it out and see if it works for you.

Or, buy Vegas Movie Studio Platinum Edition (emphasis on Platinum), which should be able to open your MTS files without having to convert them to AVI first. Better yet, the combination of Neo Scene and VegasPlatinum would be a very good match, as mentioned above. So for around a $200 investment, you'd have a pretty decent conversion and editing program. This will save you the pretty significant learning curve of Avisynth, file format conversion, etc. You've got so much to learn on the editing side alone, you might as well make things easier for you.


http://www.sonycreativesoftware.com/moviestudiope

Whatever you end up doing, hope you have a Duo Core machine or faster. HD resolution material is processor intensive.



bazily posted 2009 Feb 19 21:48
Soopafresh, I've tried to follow your teachings but apparently I'm a slow learner!

I've got a bunch of .mts files that I can't get my new macbook to recognize because the HG10 camera wasn't initialized with the mac or some bs. It works great now for imports, but I'm stuck with 100 .mts files trying to get them in an imovie compatible format (mp4?) to burn to a DVD.

I've got your scripting setup on my PC, but I don't understand the command line parameters to figure out how to convert the video straight to mp4. I've got it to avi, avc, and the vimeo mp4, but the mac either needs more converting or can't read the file (vimeo mp4).

I've been able to use handbrake to create m4v files and streamclip to convert to mp4, all on the mac, but that takes forever. Other than deinterlacing, no size change, and imovie ready files (mp4), that's all I'm trying to get.

What am I missing?



Soopafresh posted 2009 Feb 20 00:07
Hi bazily, I wish I was more knowledgeable about multimedia formats in OS X. I do know that newer versions of final cut can import AVCHD footage via direct capture from the camera. I think it converts it to Apple Intermediate Codec for editing. Or maybe ProRes.

Only thing I can suggest to try is:

1)Install HuffyUV codec on PC
2)Install Perian on MAC
3)Convert AVS files to HuffyUV AVI via VirtualDub
4)Transfer AVI to Mac.
5) - Unknown. Either your app will be able to open the AVI thanks to Perian, or you'll have to use an app like MpegStreamClip for Mac to convert the AVI to a Quicktime format.

Good luck, friend :)

Another thing which MIGHT work is VLC for OS X. It contains file transcoding capabilities. Since it can play AVCHD, it most likely can convert it.



bazily posted 2009 Feb 20 23:23
Thanks for the tips. Perian made Quicktime play the mkv files, but no help on the MTS for some reason.

VLC can play the MTS file, but the stream/export function doesn't work right for some reason.

MPEG Streamclip appears to do a good, quick job with the AVI files, so I'll run those on my PC under your multi_demux_mts_xvid.bat script to create AVIs.

Is there a way to leave those AVIs at 1920x1080 in the script? I tried to modify it, but the zooming on the AVI was really jumpy. I'm trying to still maintain a file as close to the source as possible.

Any ideas?



Soopafresh posted 2009 Feb 21 02:45
Open the batch in notepad

delete the line in red

change the green section from 1280,720 to 1920,1080



and later in the script






bayme posted 2009 Mar 05 07:58
@Soopafresh, note that there are some major updates for

xport.exe
DGAVCIndex.exe
DGAVCDecode.dll
and
libavcodec.dll

The ones in your downloads are rather old..



Soopafresh posted 2009 Mar 05 10:36
bayme, you're the best. Thanks for the heads up. I'll update the stuff later today :)


JeroenNL posted 2009 Mar 12 08:42
is use the _multi_demux_mts_Xvid.bat batch file for converting MTS files to Xvid. the conversion goes without any problems. But the end result shows some litte degradation. It is not much but maybe someone nows how i can fix this. I have added a piece of video where you can see the end result.

thanks Soopafresh this Mini Guide did the thing. I've look for ages on the internet to find a free tool to convert MTS files to other files.

00026_xvid.avi



Soopafresh posted 2009 Mar 12 09:45
Hi Jeroen, look on this page - this is a common problem:

http://forum.videohelp.com/topic346331-300.html


I would try Xvid4PSP, I think it might work for you :)



JeroenNL posted 2009 Mar 12 17:20
Soopafresh Thanks it worked.

Xvid4PSP did a perfect job. I did only one video but so far as i can see. it worked.



Soopafresh posted 2009 Mar 12 19:30
Great, I'd suggest everyone use Xvid4PSP. My batch files are a year old - at the time they were pretty useful, but now there are better methods of converting AVCHD footage.


For Editing, Spend the $120 and get Neo Scene. You won't regret it.

For basic conversion, Xvid4PSP and ConvertXtoDVD will do the trick.



ghkchehade posted 2009 Mar 14 12:20
Hello,
I tried to read all the pages of this topic. Really it was impossible for me to convert or edit M2ts files from my canon G20 Camcorders.
Can u help me please?



Soopafresh posted 2009 Mar 14 19:19
You mean the Canon HG20 ?

Try Xvid4PSP



Darkflame posted 2009 Mar 29 11:58
Can anyone help me with how to convert a MTS 60i input to an AVS that will open in Virtual Dub for me to convert?

I been using the bats on this thread with great success for 24p stuff, but I accidently recorded some in 60i and the normal ("__1920x1080_Same_As_Source_.bat") is produceing many artifacts.
So I guess I need it either adjusted for 24p, or another bat file which will do the same.

I did try; __1920x1080_60i_to_24p.bat
Which has;

:
del *.avc
del *.dga
del *.ac3
del *.wav
del *.avs
del *.log

for %%a in ("*.mts") do xport -h "%%a" 1 1 1 && ren bits0001.mpa "%%~na.ac3" &&  ren bits0001.mpv "%%~na.avc"

for %%b in ("*.avc") do DGAVCIndex -i "%%b" -o "%%~nb.dga" -e

for %%c in ("*.ac3") do azid "%%c" "%%~nc.wav"

for %%a in ("*.dga") do @echo loadplugin("dgavcdecode.dll") > "%%~na.avs"
for %%a in ("*.dga") do @echo loadplugin("tivtc.dll") >> "%%~na.avs"
for %%a in ("*.dga") do @echo loadplugin("audiolimiter.dll") >> "%%~na.avs"
for %%a in ("*.dga") do @echo video=AVCSource("%%a") >> "%%~na.avs"
for %%a in ("*.dga") do @echo audio=wavsource("%%~na.wav").convertaudiotofloat().normalize(0.95).linearlimiter(1.5) >> "%%~na.avs"



for %%a in ("*.dga") do @echo tfm().tdecimate() >> "%%~na.avs"
for %%a in ("*.dga") do @echo Lanczos4Resize(1920,1080) >> "%%~na.avs"

del *.log

rem  for %%a in ("*.avs") do ffmpeg.exe -i "%%a" -threads auto -vcodec xvid -s 720x400 -maxrate 3800k -b 3500k -qmin 3 -qmax 5 -bufsize 4096 -acodec mp3 -ar 48000 -ab 160k -ac 2 -y "%%~na_xvid.avi"

rem for %%a in ("*.avs") do ffmpeg.exe -i "%%a"  -vcodec h264 -s 704x384 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -b 2050k -maxrate 2500k -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 "00072.mp4"


As its code.
But the resulting AVS files dont seem to open in VirtualDub.
(it complains of invalid parameters for the tfm...which I understand concerns the interlacing. I have downloaded TIVTC.dll and stuck it in my AviSynth directory with no effect).

The contents of the typical produced AVS files are;

:
loadplugin("dgavcdecode.dll")
loadplugin("tivtc.dll")
loadplugin("audiolimiter.dll")
video=AVCSource("00148.dga")
audio=wavsource("00148.wav").convertaudiotofloat().normalize(0.95).linearlimiter(1.5)
tfm().tdecimate()
Lanczos4Resize(1920,1080)


I dont see any parameters for that tfm line at all.

So, any advice?



Soopafresh posted 2009 Mar 29 14:43
Post a 10 second clip of an MTS file from your camcorder somewhere and I'll take a look


Darkflame posted 2009 Mar 30 03:24
Heres a quick one;
www.darkflame.co.uk/videotests/00169.MTS



gedas5 posted 2009 Mar 30 15:18
@ Soopafresh

please help me. i've tried all the conversion software available and i can't get as good results as i get with your avchd_convert__vimeo__v9! but the only problem is artifacts and some kind of glitches in output video...i attached sample of .MTS converted with one of vimeo bats from page 1. somebody else in previous page had artifacts as well and they said that ffdshow update might solve it and i tried everything but don'know how to solve it. if you could help me i would really appreciate that.
thanx



vimeo_00021.mp4



ghkchehade posted 2009 Mar 31 12:53
Yes i mean HG 20.


Soopafresh posted 2009 Mar 31 15:34
gedas5, try using Xvid4PSP

darkflame, your source video is PAL 25fps so no TFM is necessary. The artifacts issues are a common problem. It is due to the model and make of your camera and problems with the free libavcodec.dll file that decodes MTS files. Give Xvid4PSP a shot.



gedas5 posted 2009 Mar 31 19:45
@ Soopafresh

thanx for reply. i've tried Xvid4PSP several times but it doesn't produce nowhere near that much quality and sharpness as you vimeo bat does and in that prog it takes ages to convert whilst your stuff is really fast and gives the best quality. unless you know some good configuration in Xvid4PSP that could give similar or even the same results...
thanx so much



Soopafresh posted 2009 Mar 31 22:15
gedas, Xvid4PSP is using the same tools as my batch files. You want to manually set the bit rate to 4500 kbps, deinterlaced, and output resolution to 1280x720. That should do it.


Darkflame posted 2009 Apr 02 01:40
Soopafresh :
gedas5, try using Xvid4PSP

darkflame, your source video is PAL 25fps so no TFM is necessary. The artifacts issues are a common problem. It is due to the model and make of your camera and problems with the free libavcodec.dll file that decodes MTS files. Give Xvid4PSP a shot.


Thanks, I'll try that.

Although I dont get those artefacts when I have 24p Cinema mode turned on, the normal conversion bats do a fine job.
It seems only when I have it disabled. (which is odd you say thats 25fps, as the manual says that should be 60i)

Either way, there's obviously an extra complication being caused somewhere by flipping that mode on/off.

Incidently, before your reply I already found a very crude solution to my problem;
1) Use SUPER to convert the MTS to a loseless compressed video format. This converts with less artifacts, but the video comes out almost twice as long as it should be!
2) Use SUPER again to export it purely as a Wav. (which by the sounds of it, always comes out correctly)
3) Use the length of the Wav as a guide to resizeing the length of the loselessly compressed footage in Premiere.
(The ratio, incidently, seemed to always be about 196.8%.)


I'll give Xvid4PSP a shot next time, as this method is crude, and involved going ver 20gig-files so it wasnt that convient.



DanontheMoon posted 2009 Apr 07 22:39
Soop, I can't get AVISynth to install - says it can't write to the registry. Can you offer any advice?


Soopafresh posted 2009 Apr 08 01:08
Strange :shock: I have seen that problem before, however. I just can't recall how it was fixed.

edit:

delete "C:\Program Files\AviSynth 2.5" directory if it exists, then try installing again



gedas5 posted 2009 Apr 08 09:48
Hi Soopafresh

thanx for suggesting me to use XVID4PSP as it gives as good results as you said... BUT: it takes 16GB file to make it to .mp4 about 1 day and couple hours or as i decoded 8GB before which took about 12 hours...this seems to be ages..maybe i'm doing something wrong? or is this how it's supposed to be? take a look at the picture added and you'll see what settings i use. maybe you could give some suggestions?

thanx a lot for your help! :)




Soopafresh posted 2009 Apr 08 10:11
The only thing that is going to speed up your Xvid4PSP

1) Smaller output dimensions - 720x400 or 640x352

2) Faster computer - Dell I7-920 XPS-435MT is a ferocious transcoding machine and very low priced.



gedas5 posted 2009 Apr 08 10:33
@ Soopafresh

thanx for reply :)
can i ask you if you use Xvid4PSP yoursef? and what settings do you use to get the best quality? i've got Canon HF10 and the camera is superb but i'm strugling to find the best quality that can be played on any PC after decoding. also ther's problem with Vegas Studio 9 which doesn't seem to be supporting .mp4 :( as i would like to do some editing. any suggestions here as well?

thanx for your assistance



DanontheMoon posted 2009 Apr 14 12:39
Thanks, Soop! :D

I found a workaround for the install issue. Right now, I'm trying to convert some more footage from a Canon Vixia HG20 using the method here:

http://eugenia.gnomefiles.org/2008/05/04/avchd-transcoding-using-free-tools/

Just wanted to say "thanks for the help!". :lol: I'll let you know how it goes.

//The aspect ratio is a little off, but I reckon I can fix that in SUPER. Cheers!



Seasonal posted 2009 Apr 15 15:36
Soopafresh :
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_v9.zip

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




soop, i tried to follow but did not see the .bat extention in the folder. I did not see .bat extension but pal and ntsc



DanontheMoon posted 2009 Apr 16 14:29
Did they not show up at all? Check under your folder options, is "hide extensions for known file types" turned off?


DanontheMoon posted 2009 Apr 19 21:56
Soop, are there any good alternatives to AVISynth?

I tried deleting the folder and reinstalling, then running a registry cleaner, still, no dice.



waver123 posted 2009 Apr 24 11:02
Soopafresh,

Thanks for these great scripts, I recently got my panasonic zs3 and have been playing around converting those avchd lite videos.

Now here's my problem, your vimeo script that converts to mp4 works great. The avchd_convert_v9 script however after I saved with virtualdub is running at 2x frame rate (I can play inside vdub and see it run faster).

The original .mts file also run at 2x rate when I use kmp, but runs correctly when I run it in media player classic.

I've read a lot about these 2x rate problem with avchd lite videos, I tried play around with the -r switch with ffmpeg and mencoder fps but couldn't get it to run properly with divx. Any idea what I can do to make it runs correctly inside virtualdub? Thanks a bunch.



waver123 posted 2009 Apr 25 18:53
Ok I can kind of work around my 2x rate problem by doing this right now (which is not too bad),

after import the .avs into virtualdub, set frame rate to 29.97 (current @ 59.94), re-merge the .ac3 audio by using audio/audio from another file and select the extracted .ac3 stream (otherwise the music stop at midpoint).



laurenrodz posted 2009 May 21 11:43
hello
i'd like to use a rotation of image in the script

i came along a plugin called zoom.dll
http://forum.doom9.org/showthread.php?t=49429

and tried using it like this
for %%a in ("*.dga") do @echo loadplugin("zoom.dll") >> "%%~na.avs"
and this
for %%a in ("*.dga") do @echo zoom(angle="90") >> "%%~na.avs"

using a mts to mp4 .bat file for DGAVCdec
....
but nothing happens...
can you help ?

i'd like also to try a dutch angle plugin if possible ?...
http://en.wikipedia.org/wiki/Dutch_angle
tnx



tat2jr1 posted 2009 May 31 04:29
Soopafresh,
Thank you so much for this guide. I bought a Panasonic HDC-SD1 camera 2 years ago, and have been fighting with that damn PAFF interlacing until an hour ago!!!! I have since replaced it with a Canon HF11 that shoots in 30p, so I don't have any PAFF issues anymore, but wanted to help those who have any SD1 footage.

This guide didn't work for me at first because the programs in the guide somehow messed with the 5 video editing programs I use daily, so I just restored, and said I'd deal with it in the future. Last night I rechecked this thread, and downloaded that XviD4PSP as suggested. It didn't screw with any of my video editors... so far, so good! It wasn't working well when I first tried it (interlace wasn't detected correctly), but I finally figured it out!

First. You MUST go to Video/Decoding/Other files, and select FFmpegSource instead of the default DirectShowSource. DirectShowSource isn't going to deinterlace anything no matter what setting you pick.

When I drag my raw MTS file into the program it gets stuck at 4% when detecting the interlacing. I just close the 4% window, and the video is loaded. (I just drag my files off the SDHC card... if I actually used the panasonic program to get them off as m2ts files, maybe it would detect the interlacing fine? Not sure... I'll never know.)

Now I set the interlacing manually. Here's the settings I found that work with the (my?) SD-1:
Source Type: Hybrid Progressive Interlaced
Field Order: BFF
Deinterlace: YadifModEDI
Target Type: Progressive
Output Framerate: 29.970 fps
Framerate Converter: Convert FPS

The field order threw me off. I thought AVCHD was upper fields first. I set it at TFF and I was seeing it as deinterlaced, but with random blocks through the parts of the video with movement. When I switched to BFF it worked perfectly. Also, I tried pretty much all the deinterlacing modes and YadifModEDI gave me the best results by a far margin. One last note. I tried to bump it up from the standard 1440x1080 the camera shoots in to 1920x1080 and it didn't look very good (It could very well be that I'm so use to my Canon's 24Mbps instead of the Panasonic's 12Mbps), so I resized it to 1280x720. Looks great! Editable! AWESOME! Thank you again!

Hope this mini guide will help anyone that is in my shoes with that Panasonic.



skysailor64 posted 2009 Jun 25 20:09
This is my first post here so please forgive the lengthy explanation of my problem. Years ago I did quite a bit of video editing of old Betamax..yes Betamax home movies onto DVD+R's. During that period I got moderately familiar with Huffyuv, VirtualDub, Adobe Premiere, Ulead MF3, 4 & 6 and a few of the other names mentioned here. But I gave it up for a few years and now have rentered into the 21st Century by purchasing a new Sony HDR-TG1 camcorder. I upgraded my Uead programs to the current version of DVDMovieFactory 6 Plus with the HD Power pack add-on so I could (I thought) smoothly edit my videos of grandkids etc. Ha! The native files from my new camera play video but no audio in the project timeline and I have been playing around for three solid days since getting the camera, looking for answers. After reading through this forum topic and other forums I took a chance and downloaded a trial version of Sony Vegas 9 Platinum. That program seems to readily accept any and all types of video files I have thrown at it and unless Ulead tech support finally (no luck yet) helps me out, I think I may have to make the additional investment in Vegas. I know my computer will need upgrading too!

That brings me to my underlying issue and question. I would like to start using and enjoying this beauty of a little camera as quickly and effectively as possible and then take the next months/years exploring its more intricate capabilities. I dont yet have a Blu-ray set-up or an HDTV so my initial DVD production will nesessarily be the highest quality DVD's that can be created with a thought of eventually making the move up to full HD. This camera takes video at 1920 x 1080i at the top end and then has three other lower quality settings. Is anyone familiar enough with this camera and the programs I've mentioned to tell me the 12-step way to enjoyable use? I know I can archive the high resolution files for future use so basically what can/should I do for present day utilization?

I have read this thread from start to finish and I just know you can help but if I should be posting this elsewhere please let me know. Thanks for any help and again sorry for the lengthy explanation.



creamyhorror posted 2009 Aug 30 07:20
Soopafresh: just came across this interesting package of yours. Sorry if this has been asked before, but why do you not provide a batch file for deinterlacing 1080p? And why do you include the 45-frame fades?

Just wondering, because deinterlacing before import into an NLE would be great. (Or is that the wrong way to do things?)



Soopafresh posted 2009 Aug 30 11:03
Unzip and copy this batch file to the same folder as the others. It will deinterlace and there is no fade-in or fade-out.

1920x1080_deinterlaced.zip



creamyhorror posted 2009 Aug 30 11:22
I was just asking for the rationale. This package seems like it would solve the trouble of many NLE users who get lousy deinterlacing when they downscale from interlaced HD to SD.

I suggest putting the non-fade deinterlace batch file in your first post. I'll recommend the package to people who need such a solution - thanks for your work in putting it together.



Soopafresh posted 2009 Aug 30 15:05
When I wrote it (18 months ago) not many people had fast enough computers to transcode and edit 1920x1080 resolution. And the deinterlacing process for 1920x1080 resulted in some bad looking video, especially with the first generation of AVCHD camcorders.

The whole batch process to do this is pretty much antiquated by now, with better apps replacing this method - NeoScene is a far better way to feed your files to an NLE.



creamyhorror posted 2009 Aug 30 16:00
Soopafresh :

The whole batch process to do this is pretty much antiquated by now, with better apps replacing this method - NeoScene is a far better way to feed your files to an NLE.

Hmm, how is it better? Faster decoding, less use of disk space, faster transcode?

I would think Avisynth would remain relevant as it offers the best deinterlacing and resizing methods available. (Plus it's free...)



eckoze@yahoo.com posted 2009 Sep 01 13:30
Hi, Soopafesh,

I have a Canon HF100 camcorder. It records video in m2ts files. How do I convert those files to more conventional file format like avi or mpg?

Thank you!
Wendy



Soopafresh posted 2009 Sep 01 19:23
eckoze@yahoo.com- Try Xvid4PSP


eckoze@yahoo.com posted 2009 Sep 03 16:19
Soopafresh,

I downloaded Xvid4PSP and installed it, but I do not know how to make it work. Could you please give me some pointers?

Thanks,
Wendy



Soopafresh posted 2009 Sep 03 17:15
http://forum.winnydows.com/viewforum.php?f=8&sid=b71c2a057c33 ... 5165752a31


If you want the EASIEST method to convert your files to an AVI, purchase a copy of NeoScene. The resulting AVI files will be easily edited in just about any editing app like After Effects, Premiere, Vegas, etc.



creamyhorror posted 2009 Sep 03 20:22
I'm still wondering what advantage the NeoScene codec has over this workflow.


poisondeathray posted 2009 Sep 03 20:38
eckoze@yahoo.com :


I downloaded Xvid4PSP and installed it, but I do not know how to make it work. Could you please give me some pointers?


Install haali media splitter and ffdshow



eckoze@yahoo.com posted 2009 Sep 04 00:07
I installed Haali Media Splitter and ffdshow, that enables the Windows Media Player 11 to play m2ts files.

I installed Xvid4PSP. The problem is I do not know how to start Xvid4PSP. I'm not familiar with all the different video-audio file formats. I suspect the starting point for Xvid4PSP is the AviC.exe file. Is that right?



gedas5 posted 2009 Sep 08 06:23
@ eckoeze@yahoo.com

if you check my screenshot above of the settings i use with Xvid4PSP then you'll know what to select. in my mind it gives very good results! maybe coding is a bit slow (that's laptop's fault) :) but results are really good! by the way i've got Canon HF10 so it's almost the same as yours and i think with those settings you'd be happy with the result. Post your findings. Maybe you'll find some better solutions ;)



nOMERcy posted 2009 Sep 30 14:26
Hi all.. I just bought a Canon HF200.. I have read almost everything in the forum about converting mts files to avi/Xvid.. Specially the avchd_convert_vimeo has been VERY useful thanks to you scoopafresh! I'm converting the mts files with the "_multi_demux_mts_Xvid_1280x720" because thats the only .bat that works for me. The others work but the sound is way of...

The main problem though.. I havent been able to find anything about joining mts files.. Yes I have tsMuxer but it only gives me m2ts files as output and m2ts does not work with the script... IF I do convert two mts files to Xvid via the script of yours and as you know I get 2 Xvid files.. Would it be a bad idea to join them in Movie Maker or Camtasia Studio??? To get the final output?? Because I seriously don't know what else to do...
Sorry my bad english, tried my best to explain :)

Thanks!



Soopafresh posted 2009 Oct 01 12:10
Try Xvid4PSP instead


igi posted 2009 Oct 06 17:07
Hi Soopafresh

Thanks for all the help to the forum. I see that there are 2 batch files for NTSC, interlaced, progressive.... I am working on mts files from a Canon HF10, which batch file should I use?

I also see that you dropped the xvid creation line. when I added that from one of your previous batch files, nothing worked because now ffmpeg changed all the options.


I ended up using:

for %%a in ("*.avs") do ffmpeg.exe -i "%%a" -threads 2 -vcodec libxvid -s 720x400 -aspect 16:9 -maxrate 3800k -b 3500k -qmin 3 -qmax 5 -bufsize 4096 -acodec libmp3lame -ar 48000 -ab 160k -ac 2 -y "%%~na_xvid.avi"


Does this look OK? (BTW -threads auto wouldn't work)

Thanks,

I.




Login/Register to our forum to be able to post here.








Replay Video Capture, if you can Watch it, you can Capture it ! and save it to your computer. More info or download trial!
About   Advertise   Forum   Forum Archive   RSS Feeds   Statistics   Tools