Forum archive - AVCHD Footage to SD (AVI for Premiere)

http://www.supermediastore.com/



Forum Archive Home -> Camcorders (DV/HDV/AVCHD) -> AVCHD Footage to SD (AVI for Premiere)



AVCHD Footage to SD (AVI for Premiere)

foochuck posted 2009 Sep 17 17:42
I shot some footage with a Sony camcorder in 1080i AVCHD format. I'd like to downgrade the footage to Standard Definition - 720 x 480 (Widescreen at 1.2 PAS).

Does anyone recommend any software to do this? I'm going to be editing the footage in Premiere Pro & After Effects CS3.

Thanks!

-foochuck



Baldrick posted 2009 Sep 17 18:15
I would use avisynth, like

DirectShowSource("PATH\myfile.m2ts",fps=23.976)

and save as video.avs, then open in for example virtualdub, resize and save as avi lagarith.

Or use a frontend for avisynth like Xvid4PSP. You also need to install codecs so you can decode the mt2s, ffdshow and haali media splitter is usually enough.

But doesn't premiere pro support avchcd? Maybe just latest cs4 version.



foochuck posted 2009 Sep 17 18:20
I think just cs4 supports avchd - I don't think CS3 does.

Baldrick, are there any tutorials out there for the workflow you suggested?



Soopafresh posted 2009 Sep 17 20:46
http://forum.videohelp.com/topic346331.html

Or Xvid4PSP

or the easiest (and best, but not free) is NeoScene



creamyhorror posted 2009 Sep 17 20:48
If you're starting out at interlaced 1080 and you want max quality, you should bob-deinterlace before you resize. (Resizing without deinterlacing damages field structure.)

In this thread, poisondeathray suggested this Avisynth script:

:

AssumeTFF()
ConvertToYV12(interlaced=true)
interp=nnedi2(field=3) #double rate, starts with top
yadifmod(order=1, field=-1, mode=1, edeint=interp) #TFF,field set to order,double rate
Spline36Resize(720,480)

This is very good deinterlacer, but also very slow. You'll have to install the Yadifmod and NNEDI2 plugins from http://bengal.missouri.edu/~kes25c/.

The output from the script will be progressive 720x480. You can import that into your editor, edit it, and interlace once again if needed. Follow Baldrick's method of installing VirtualDub and the Lagarith codec (you should find a guide).

edit: If you use soopafresh's first method, note that you'll get 848x480 square pixels rather than 720x480 with PAR 1.2. Or you can choose the 1920x1080 output option, which means you retain the full resolution for importing (higher quality but much more taxing for editing).



poisondeathray posted 2009 Sep 17 21:02
creamyhorror :

In this thread, poisondeathray suggested this Avisynth script: .....


If he's starting from AVCHD, it's already YV12 so ConvertToYV12() isn't necessary (as opposed to DV in the other thread, which was YUY2)

foochuck would probably want to re-interlace it as well, assuming the end goal was NTSC DVD

:

AssumeTFF()
interp=NNEDI2(field=3) #double rate, starts with top
YadifMod(order=1, field=-1, mode=1, edeint=interp) #TFF,field set to order,double rate
Spline36Resize(720,480)
SeparateFields()
SelectEvery(4,0,3)
Weave()


Another option is to use the Premiere AVS Import plugin, which works with CS3, and you can get practically any file into it that way, including AVCHD.

But the benefit of resizing to an SD lossless intermediate is that editing will be a snap even on old PC's



creamyhorror posted 2009 Sep 17 21:10
Ah, I forgot to remove the ConverttoYV12 line.

PDR, have you used NeoScene? What advantages does it have over Avisynth+Ut/other lossless codecs (besides lower bitrate)?



poisondeathray posted 2009 Sep 17 21:15
creamyhorror :

PDR, have you used NeoScene? What advantages does it have over Avisynth+Ut/other lossless codecs (besides lower bitrate)?


No I haven't.

I use UT because it's truly lossless, and decodes fast (I haven't seen a head-to-head test vs. cineform for multithreaded decode speed, but I suspect cineform is faster)



creamyhorror posted 2009 Sep 17 21:29
offtopic: I've been testing x264 intra-only as a potential lossy intermediate codec, but it may not decode fast enough in NLEs even then (though it's plenty fast to play and seek with any multithreaded decoder). Even if I use DSS2 via AVS to load the output in Premiere CS3, it doesn't play back smoothly (while Ut does). Not sure what I'm doing wrong...should I be trying DGAVCDec?


poisondeathray posted 2009 Sep 17 21:33
creamyhorror :
offtopic: I've been testing x264 intra-only as a potential lossy intermediate codec, but it may not decode fast enough in NLEs even then (though it's plenty fast to play and seek with any multithreaded decoder). Even if I use DSS2 via AVS to load the output in Premiere CS3, it doesn't play back smoothly (while Ut does). Not sure what I'm doing wrong...should I be trying DGAVCDec?


Not sure, it might be the extra overhead of feeding it through to a NLE , and avisynth, and the import plugin (Everything is slower in NLE than media players). You can try DGAVCDec, but DSS2 has way higher FPS decoding on multithreaded system like a quadcore

Another "trick" you can do is to use something like MPEG2 as a lossy intermediate, then swap the asset (replace footage back to the original version) in the clip bin after you're done your editing (all instances will be replaced in the timeline, and edits will be kept), so when you export you get full quality. The lossy proxy has to be the same size dimension (can't use 1/2 sized proxies etc...)



creamyhorror posted 2009 Sep 17 21:56
poisondeathray :

Not sure, it might be the extra overhead of feeding it through to a NLE , and avisynth, and the import plugin (Everything is slower in NLE than media players). You can try DGAVCDec, but DSS2 has way higher FPS decoding on multithreaded system like a quadcore

I guess Ut is the way to go, in the end.

:

Another "trick" you can do is to use something like MPEG2 as a lossy intermediate, then swap the asset (replace footage back to the original version) in the clip bin after you're done your editing (all instances will be replaced in the timeline, and edits will be kept), so when you export you get full quality. The lossy proxy has to be the same size dimension (can't use 1/2 sized proxies etc...)

Thanks, I've been meaning to look into proxy files for a while. This should help a good deal.



foochuck posted 2009 Sep 25 16:02
Soopafresh :
http://forum.videohelp.com/topic346331.html

Or Xvid4PSP

or the easiest (and best, but not free) is NeoScene


I have Neo Scene ;)

If I convert all of my footage from AVCHD to AVI with Neo Scene, can I then resize the AVI to SD AVI files?



minidv2dvd posted 2009 Sep 25 16:04
you have to crop or pan/scan the sides off them. just resizing will squish the video to the wrong aspect ratio.


poisondeathray posted 2009 Sep 25 17:49
Are we assuming this is for DVD and you want to keep interlacing?

As already mentioned, if you resize without an interlace aware method you will get distortions (It's ok to simple resize only along horizontal axis, but that's not very useful)

If you use Adobe for everything, you will get lower quality results - not because of the MPEG2 encoder - it's because it's resizing and deinterlace-reinterlace algorithm is poor. See here :
http://www.precomposed.com/blog/2009/07/hd-to-sd-dvd-best-methods/

(I can't speak for the hd2sd package or if it's any good, but I've used the other avisynth method I listed above):



foochuck posted 2009 Oct 06 17:49
Poison, what software will I need to download to do the method you described below?

poisondeathray :
creamyhorror :

In this thread, poisondeathray suggested this Avisynth script: .....


If he's starting from AVCHD, it's already YV12 so ConvertToYV12() isn't necessary (as opposed to DV in the other thread, which was YUY2)

foochuck would probably want to re-interlace it as well, assuming the end goal was NTSC DVD

:

AssumeTFF()
interp=NNEDI2(field=3) #double rate, starts with top
YadifMod(order=1, field=-1, mode=1, edeint=interp) #TFF,field set to order,double rate
Spline36Resize(720,480)
SeparateFields()
SelectEvery(4,0,3)
Weave()


Another option is to use the Premiere AVS Import plugin, which works with CS3, and you can get practically any file into it that way, including AVCHD.

But the benefit of resizing to an SD lossless intermediate is that editing will be a snap even on old PC's



poisondeathray posted 2009 Oct 06 17:56
foochuck :
Poison, what software will I need to download to do the method you described below?


avisynth and the following plugins: yadifmod, nnedi2 which you can find here http://web.missouri.edu/~kes25c/

It might be easier to use that hd2sd package and guide from that weblink (although I've never tried it out). If I ever do try it out I'll post some comparisons, but I almost never make DVD's anymore.



foochuck posted 2009 Oct 06 17:57
I looked at that link - it looked like it was geared towards making MPEG-2 footage - whereas I want to end up with SD Interlaced AVI files (1.2 PAR) that I can edit in Premiere Pro.


poisondeathray posted 2009 Oct 06 18:01
But what are you going to do with SD interlaced AVI files? Just play with editing? ie. What is your end goal?

I would use the script to encode to a lossless intermediate (e.g. huffyuv, lagarith or UT is even faster on quads), then import into premiere and conform the file to your PAR

But a warning: that script is very slow because it uses a higher quality filters, that's how you get rid of the artifacts in the first place. If it's too slow for you, you can make some trade offs (e.g. use yadif instead of yadifmod+nnedi)



foochuck posted 2009 Oct 06 19:20
I'm going to be editing the SD interlaced AVI files in Premiere Pro. The rest of my footage is in that format. After I'm done editing I will be saving everything to MPEG-2 for DVD format.


foochuck posted 2009 Oct 06 19:22
I'm working on a 64-bit system with about 8 GB of ram. I'll try out this method tomorrow. Thanks your input / help.

poisondeathray :
But what are you going to do with SD interlaced AVI files? Just play with editing? ie. What is your end goal?

I would use the script to encode to a lossless intermediate (e.g. huffyuv, lagarith or UT is even faster on quads), then import into premiere and conform the file to your PAR

But a warning: that script is very slow because it uses a higher quality filters, that's how you get rid of the artifacts in the first place. If it's too slow for you, you can make some trade offs (e.g. use yadif instead of yadifmod+nnedi)



poisondeathray posted 2009 Oct 06 19:23
What field order is your other footage? e.g. DV is BFF

You might have a problem with mixed field order with different footage, as AVCHD is TFF, and the script above conserves TFF for SD. I think there is a procedure to field order swap in avisynth, but I am uncertain...



foochuck posted 2009 Oct 06 19:25
My other footage is SD DV - Interlaced lower field first.


poisondeathray posted 2009 Oct 06 19:38
This seems to work: Get jdl-util.avsi and jdl-interlace.avsi from the url below, put in avisynth plugins directory (just like you did with nnedi2.dll, yadifmod.dll) , and use the JDL_ReverseFieldDominance() function. The 1st and last field will be screwed up unless you pass a bobbed frame JDL_ReverseFieldDominance(bobfirstlast=true)

http://avisynth.org/stickboy/

I tested it out on some avchd and seems to work ok => now lower field first instead of top field first

If you do it first before the deinterlace-resize-reinterlace step, the arguments in yadifmod and nnedi will change to reflect BFF instead of TFF. If you do the field swap after, they will be the same. I'm not sure if one method is preferrable to the other



foochuck posted 2009 Oct 06 20:18
creamyhorror :

The output from the script will be progressive 720x480. You can import that into your editor, edit it, and interlace once again if needed. Follow Baldrick's method of installing VirtualDub and the Lagarith codec (you should find a guide).


Do I need Baldrick's method before or after I edit my video? Is that used to re-interlace my footage???



poisondeathray posted 2009 Oct 06 20:33
foochuck :

Do I need Baldrick's method before or after I edit my video? Is that used to re-interlace my footage???


You want to keep it interlaced, but just a HD=>SD proper conversion so you still need to encode it to a lossless AVI intermediate using something e.g. vdub

So install avisynth, plus the plugins mentioned earlier in the plugins directory. I already assume you have ffdshow + haali splitter installed for decoding .mts or .m2ts files, then type the following in a notepad .txt file, save it, then rename the extension from .txt to .avs. Change the filenames and paths to match your files

:

DirectShowSource("0001.mts")
AssumeTFF()
interp=NNEDI2(field=3) #double rate, starts with top
YadifMod(order=1, field=-1, mode=1, edeint=interp) #TFF,field set to order,double rate
Spline36Resize(720,480)
SeparateFields()
SelectEvery(4,0,3)
Weave()

AssumeTFF()
JDL_ReverseFieldDominance(bobfirstlast=true)


Now open that .avs file in virtualdub. Select video=>fast recompress, video=>compression (then select either lagarith, or huffyuv or ut video codec or some other lossless format, you may have to install them if you already haven't. I highly recommend UT video codec for lossless if you have a quadcore, its many times faster than lagarith and almost twice as fast as huffyuv-mt for decoding), then file=>save as avi. If you leave audio as direct stream copy, it will encode the audio as wav. If you wanted to disable this, just go audio=>no audio. Then you could import the native audio separately into premiere (you might demux it using tsmuxer for example)

As I mentioned before, this script is very very slow. If you want a faster version, but slightly lower in quality (when you resize hd=>sd , many of the artifacts get reduced so they are not as visible). You can do some mini-tests to see if it's an acceptable tradeoff for your tastes.

:

DirectShowSource("0001.mts")
AssumeTFF()
Yadif(order=1,mode=1)
LanczosResize(720,480)
SeparateFields()
SelectEvery(4,0,3)
Weave()

AssumeTFF()
JDL_ReverseFieldDominance(bobfirstlast=true)


When you import into premiere, you have to conform the clip to the proper PAR (1.21), field order (lower field) etc...by using the "interpret footage as" function, because it will initially be interpreted as progressive and square pixel.

Cheers



foochuck posted 2009 Oct 06 20:56
I hate to be a PITA (pain in the a$$) but what do I feed this Avisynth script into? Virtual Dub? Premiere Pro?

creamyhorror :
If you're starting out at interlaced 1080 and you want max quality, you should bob-deinterlace before you resize. (Resizing without deinterlacing damages field structure.)

In this thread, poisondeathray suggested this Avisynth script:

:

AssumeTFF()
ConvertToYV12(interlaced=true)
interp=nnedi2(field=3) #double rate, starts with top
yadifmod(order=1, field=-1, mode=1, edeint=interp) #TFF,field set to order,double rate
Spline36Resize(720,480)

This is very good deinterlacer, but also very slow. You'll have to install the Yadifmod and NNEDI2 plugins from http://bengal.missouri.edu/~kes25c/.

The output from the script will be progressive 720x480. You can import that into your editor, edit it, and interlace once again if needed. Follow Baldrick's method of installing VirtualDub and the Lagarith codec (you should find a guide).

edit: If you use soopafresh's first method, note that you'll get 848x480 square pixels rather than 720x480 with PAR 1.2. Or you can choose the 1920x1080 output option, which means you retain the full resolution for importing (higher quality but much more taxing for editing).



poisondeathray posted 2009 Oct 06 20:59
foochuck :
I hate to be a PITA (pain in the a$$) but what do I feed this Avisynth script into? Virtual Dub? Premiere Pro?


You might have missed it - I gave detailed instructions right before your post ^ . avs script into vdub=> spits out a lossless sd-avi with lower field first => import that avi into premiere with the same sequence settings as your other dv footage

Although you could feed the .avs script directly into Premiere with the avs import plugin, you wouldn't get real time editing (i.e too slow to process). So in this case, it would be better to encode to a lossless AVI intermediate for import



videobread posted 2009 Oct 06 21:58
Just my 2 cents but, this thread is so complex it's almost comical. I had to ask myself why shoot in HD at all when the end product is SD. I sell DVD's - that's SDVD. AVCHD and HDV are shortcut manufacturer sponsored formats. Editing software is not yet prime time. Rendering/hardware costs are out of sight. Blu-Ray blanks are not mass marketable, not printable for the money and the cost per unit is prohibitive. Maybe you should consider shooting in SD and waiting for Adobe to develop their product more, for hardware prices to come down and for a market for Blu-Ray to develop. Is this a commercial venture? Are you trying to make a buck? Sounds like you are spending a lot of time and money to go the long way around the barn.


foochuck posted 2009 Oct 07 13:58
Videobread: I shoot everything in HDV. For this project I had a camera problem and was forced to shoot with an AVCHD camcorder. I have a normal workflow with my main camera for shooting in HDV and from the start I know if I need to edit in HDV or SD. I have workflows for both.

It's my first time using AVCHD and I'm trying to figure out a workflow for this format.



foochuck posted 2009 Oct 07 14:04
poisondeathray :
foochuck :
I hate to be a PITA (pain in the a$$) but what do I feed this Avisynth script into? Virtual Dub? Premiere Pro?


You might have missed it - I gave detailed instructions right before your post ^ . avs script into vdub=> spits out a lossless sd-avi with lower field first => import that avi into premiere with the same sequence settings as your other dv footage


Found it! Thank you sir.



poisondeathray posted 2009 Oct 07 14:08
You can do it all in Premiere too, that's definitely an easier option and workflow. HDV is 1440x1080i 4:3 PAR, so mixing AVCHD 1920x1080i footage can cause some problems as well. But at least both are TFF, so you don't have the field reversal business.

The quality of the resize and deinterlace using Adobe (or vegas for that matter) isn't as good as using other higher quality methods. This has been proven time and time again here and on other forums.

99.9% of the time a DVD made from downscaled HD material will look better than one made shot from the same camera in SD mode.

We are just providing options; it's up to the end user to choose what sacrifices in terms of quality or workflow s/he is willing to make. Some users might not be able to "see" the differences but I assure you 100% , that there are clear differences.



foochuck posted 2009 Oct 07 14:34
Where can I get the UT video codec you referenced below? That is neither lagarith or huffyuv, correct?

Now open that .avs file in virtualdub. Select video=>fast recompress, video=>compression (then select either lagarith, or huffyuv or ut video codec or some other lossless format, you may have to install them if you already haven't. I highly recommend UT video codec for lossless if you have a quadcore, its many times faster than lagarith and almost twice as fast as huffyuv-mt for decoding), then file=>save as avi. If you leave audio as direct stream copy, it will encode the audio as wav. If you wanted to disable this, just go audio=>no audio. Then you could import the native audio separately into premiere (you might demux it using tsmuxer for example)



poisondeathray posted 2009 Oct 07 14:38
UT Video Codec
http://forum.doom9.org/showthread.php?t=143624

One "bug" is that it has to be set up in the configuration each time you use it to encode (it doesn't remember or save the settings). If you have a quad, set it to 4. If you have a i7 with HT, set decode to 8 threads etc...



foochuck posted 2009 Oct 07 14:45
After opening the script in Virtual Dub I received this error:

Avisynth open failure: Script error: there is no function named "JDL_ReverseFieldDominance"

Did I forget a plug-in?



poisondeathray posted 2009 Oct 07 14:49
Yep, they are from stickboy's page. It's listed on a previous post

:

Get jdl-util.avsi and jdl-interlace.avsi from the url below, put in avisynth plugins directory (just like you did with nnedi2.dll, yadifmod.dll) , and use the JDL_ReverseFieldDominance() function. The 1st and last field will be screwed up unless you pass a bobbed frame JDL_ReverseFieldDominance(bobfirstlast=true)

http://avisynth.org/stickboy/




foochuck posted 2009 Oct 07 14:56
Got it. I'm saving my first clip now trying out the lagarith codec.

One question about UT video codec - I'm using an intel core i7 - you said it would run faster on this computer - however my other computer isn't quite as fast - for editing purposes, would it be better to stick with lagarith or were you just referring to the decoding process?



poisondeathray posted 2009 Oct 07 14:59
foochuck :
Got it. I'm saving my first clip now trying out the lagarith codec.

One question about UT video codec - I'm using an intel core i7 - you said it would run faster on this computer - however my other computer isn't quite as fast - for editing purposes, would it be better to stick with lagarith or were you just referring to the decoding process?


For editing, you need fast decode speed. Lagarith, although commonly used, is fricking slow. Edits aren't very snappy even with a fast PC. (although you might be ok since it's only SD)

Look at the decode times for UT vs . lagarith. It's 8x faster on a quad, but not as good compression. If you want best compression for YV12 formats, FFV1 (using ffdshow) is slightly better than lagarith






foochuck posted 2009 Oct 07 15:02
Wow this first clip looks like it's going to be over 2GB - the original m2ts file was 320MB!


poisondeathray posted 2009 Oct 07 15:03
Yes, that's typical for lossless compression. Now think of how big an HD version would be...

If you wanted, you could encode to DV as an intermediate, but suffer some generational quality loss.



foochuck posted 2009 Oct 07 15:04
I'm going to try out a DV Codec as well, I might be able to live with that.


foochuck posted 2009 Oct 07 15:09
If I go with a DV codec, everything would be the same, I will just need to choose my DV codec when I decode the footage, right?


poisondeathray posted 2009 Oct 07 15:10
foochuck :
If I go with a DV codec, everything would be the same, I will just need to choose my DV codec when I decode the footage, right?


You mean ENcode right?

So instead of lagarith, you would use your DV encoder (e.g. cedocida)



foochuck posted 2009 Oct 07 15:14
lol...Encode...right.


foochuck posted 2009 Oct 07 16:01
I just finished encoding this test clip. After playing the AVI file it looks like there is some artifacting going on - as if the footage is still interlaced. It didn't look like progressive footage (even after interpreting it correctly in Premiere). Is that just a loss in quality?


poisondeathray posted 2009 Oct 07 16:10
foochuck :
I just finished encoding this test clip. After playing the AVI file it looks like there is some artifacting going on - as if the footage is still interlaced. It didn't look like progressive footage (even after interpreting it correctly in Premiere). Is that just a loss in quality?


You're testing this in premiere?

What were your sequence settings and conform settings?

Can you post a screenshot of what you mean? ( I tested this same procedure yesterday)



foochuck posted 2009 Oct 07 16:11
Also, I left the audio on Direct Stream Copy, but no wav file.


poisondeathray posted 2009 Oct 07 16:12
what model is your camcorder? can you use mediainfo on one of your avchd clips, and post the text information here?

and what mode did you shoot in? I assumed it was 1080i30



foochuck posted 2009 Oct 07 16:35
General
ID : 0
Complete name : E:\video projects\footage camera 2\20090912134401.m2ts
Format : BDAV
Format/Info : Blu-ray Video
File size : 320 MiB
Duration : 5mn 16s
Overall bit rate : 8 499 Kbps
Maximum Overall bit rate : 18.0 Mbps

Video
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.0
Format settings, CABAC : Yes
Format settings, ReFrames : 2 frames
Duration : 5mn 16s
Bit rate : 7 895 Kbps
Width : 1 440 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 29.970 fps
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Interlaced
Scan order : Top Field First
Bits/(Pixel*Frame) : 0.169
Stream size : 298 MiB (93%)

Audio
ID : 4352 (0x1100)
Menu ID : 1 (0x1)
Format : AC-3
Format/Info : Audio Coding 3
Duration : 5mn 16s
Bit rate mode : Constant
Bit rate : 256 Kbps
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 48.0 KHz
Video delay : -67ms
Stream size : 9.65 MiB (3%)

Text
ID : 4608 (0x1200)
Menu ID : 1 (0x1)
Format : PGS
Duration : 5mn 15s
Video delay : -67ms



poisondeathray posted 2009 Oct 07 16:40
For the audio, do you have an AC3 decoder installed? e.g. AC3Filter ?

Otherwise you can use the demux (using tsmuxer) and reimport the native AC3 audio into Premiere

The shooting mode is important. If you don't know if it was 1080i30 (i.e. 1080i60) , vs some other mode, it could explain what you are seeing. If you are unsure of what you have, cut a sample using tsmuxer and post to a free hosting site eg.. mediafire.com



foochuck posted 2009 Oct 07 16:49
The footage is: 1440 x 1080 (1.33) - Upper Field First - 29.97 fps


poisondeathray posted 2009 Oct 07 16:52
Where are you getting that info from? I know what it says, but often you have different content than what the container signals. e.g. 24p in 30i container. It will read the same specs, but the actual content is different. Because whatever program you are using is reading only the header information


foochuck posted 2009 Oct 07 17:15
NeoScene gives me the ability to convert my footage to AVI and to a progressive format. If I convert the footage to progressive, would it be easier to resize my footage?


poisondeathray posted 2009 Oct 07 17:22
foochuck :
NeoScene gives me the ability to convert my footage to AVI and to a progressive format. If I convert the footage to progressive, would it be easier to resize my footage?


That would be deinterlacing it. And yes, there are no "special" issues when resizing progressive footage

But you would be losing 1/2 the fields. That's 1/2 the temporal information.

But I thought you wanted a SD interlaced AVI, comparable to your DV-AVI footage so you could use it together?



foochuck posted 2009 Oct 07 19:12
You are correct, I do want SD interlaced AVI files so that I can edit them in the same Premiere Pro (CS3) project to go with my existing DV-AVI footage.


poisondeathray posted 2009 Oct 07 19:24
foochuck :
You are correct, I do want SD interlaced AVI files so that I can edit them in the same Premiere Pro (CS3) project to go with my existing DV-AVI footage.


Then you don't want to single rate deinterlace it , which is what cineform is doing by converting to progressive. It's converting 60 fields per second (assuming that's what you really have, not 24p in 60i) to 30 frames per second progressive. And that won't match the DV footage (which is 60 fields per second, BFF).

You want to bob it up to 60p then resize it, then reconstruct the interlacing with lower field first (just like the DV footage) - which is what the avs script is essentially doing

You have to provide the information requested if you want more specific help...



foochuck posted 2009 Oct 07 19:26
I'm gonna double check the camera model / shooting mode...


poisondeathray posted 2009 Oct 07 19:29
It would be better to post a short sample. That way we can be sure exactly what you have, and what you need to do.


foochuck posted 2009 Oct 07 19:35
I have a stupid question. Which of the following is a standard DV-AVI codec (from a virtual dub screen cap of video compression)? I'm guessing just Microsoft Video 1. I'm going to convert a short clip to that format.




poisondeathray posted 2009 Oct 07 19:42
None of them.

I would install cedocida if you want to use DV-AVI

(But personally I would use lossless compression, especially if you are going though all the trouble of doing this properly through avisynth...)



foochuck posted 2009 Oct 07 20:08
Here is a very short sample clip that was encoded to lagarith :

http://www.foochuck.com/video/video-test-1.avi

As you can see the clip does not look progressive - it also looks like it's skipping frames.

If you'd like, I can cut a short clip of the original m2ts file. You mentioned a software I can use to grab a small segment of the m2ts file - could you repost that software / link?



poisondeathray posted 2009 Oct 07 20:16
tsmuxer , the split and cut tab

It is supposed to have combing and horizontal lines (because you re-interlaced it with the script, to make it similar to DV), but the fps is off, and it's "jerky"

I suspect specifying the fps in the 1st line will fix it (and if you install ac3 filter, it will encode audio to wav, or you can do the demux option discussed earlier) , but I have to look at the original footage to be sure

Directshowsource("0001.mts", fps=29.97, audio=true)



foochuck posted 2009 Oct 07 20:26
That update in the script you sent made a huge difference. Here's an updated clip:

http://www.foochuck.com/video/video-test-2.avi

I'm going to install and test out ac3 filter now.



foochuck posted 2009 Oct 07 20:39
I have installed ac3 filter - is there anything special I need to do to get it to work with vdub?


poisondeathray posted 2009 Oct 07 20:43
I don't think so...You can test it out on a short clip

Plan B is using the native audio



foochuck posted 2009 Oct 08 09:50
Poison,

I think I'm about set for converting these clips. My one last issue is pulling the audio. I'm not sure what I can use to pull the native audio from the .m2ts clips. I tried ac3 filter but haven't had any luck yet.

Could you point me in the direction of a tutorial for pulling audio from those clips to wav format?



poisondeathray posted 2009 Oct 08 10:04
Do you have haali media splitter + ac3 filter installed?

Just use tsmuxer, and hit the demux radio button

Checkmark the audio track

This will give you the native AC3 audio. It shouldn't be necessary to convert to wave



foochuck posted 2009 Oct 09 12:11
Okay so I need to have all 3 programs installed (haali media splitter, ac3 filter & tsmuxer) in order to use tsmuxer to demux the audio track, correct?


poisondeathray posted 2009 Oct 09 12:14
foochuck :
Okay so I need to have all 3 programs installed (haali media splitter, ac3 filter & tsmuxer) in order to use tsmuxer to demux the audio track, correct?


Nope tsmuxer doesn't need any

Those 3 are for directshowsource() in the script if you wanted to convert ac3 to wav, as you are processing the script in vdub

If you set audio to direct stream copy, it will decompress it to wav, because you are using an .avs script



foochuck posted 2009 Oct 09 13:36
I was able to extract the ac3 audio, but Premiere Pro (CS3) doesn't want to import it. Dooooh!


poisondeathray posted 2009 Oct 09 14:03
Might be a limitation with PP CS3; PP CS4 will import it

You can convert ac3 to wav, e.g. foobar2000, eac3to, audacity, many others...

I'm curious as to why the avs script doesn't pass though the audio for you in vdub. This would be easier, and everything would be synced up. If you render one of the native .mts files in graphstudio, do the pins connect? or if you open the .avs file in vdub and use file=>file information what does it say about the audio ? Did you make sure you didn't have audio->no audio selected?



foochuck posted 2009 Oct 09 14:25
I didn't have haali media splitter or ac3 filter installed when I encoded the videos to SD AVI. I DID have 'Direct Stream copy' selected.


foochuck posted 2009 Oct 10 13:49
poisondeathray :
Nope tsmuxer doesn't need any

Those 3 are for directshowsource() in the script if you wanted to convert ac3 to wav, as you are processing the script in vdub

If you set audio to direct stream copy, it will decompress it to wav, because you are using an .avs script


I have both haali media splitter and ac3 filter installed.

This is the script I'm running:

Directshowsource("20090912161022.m2ts", fps=29.97, audio=true)
AssumeTFF()
interp=NNEDI2(field=3) #double rate, starts with top
YadifMod(order=1, field=-1, mode=1, edeint=interp) #TFF,field set to order,double rate
Spline36Resize(720,480)
SeparateFields()
SelectEvery(4,0,3)
Weave()

AssumeTFF()
JDL_ReverseFieldDominance(bobfirstlast=true)

Do I need to open those two programs prior to saving as an avi through virtual dub? I tried again and there was no audio - however when I play the original m2ts file there is indeed audio.

Audio in virtual dub is set to direct stream copy.



poisondeathray posted 2009 Oct 10 15:08
Render the .mts in graphstudio or graphedit and see if the pins connect

What does virtualdub say with the avs open? file=>file information



foochuck posted 2009 Oct 10 17:56
Screen cap of File -> File Information




poisondeathray posted 2009 Oct 10 17:59
According to that, the audio should be passing through

Can you use mediainfo on one of the converted files exported from vdub?



foochuck posted 2009 Oct 10 18:05
poisondeathray :
According to that, the audio should be passing through

Can you use mediainfo on one of the converted files exported from vdub?


General
CompleteName : C:\Users\Charley\Desktop\video tests\audio test 1.avi
Format : AVI
Format/Info : Audio Video Interleave
FileSize/String : 114 MiB
Duration/String : 18s 51ms
OverallBitRate/String : 53.2 Mbps
Encoded_Library/String : VirtualDub build 32618/release

Video
Format : Lagarith
CodecID : LAGS
Duration/String : 18s 51ms
BitRate/String : 51.6 Mbps
Width/String : 720 pixels
Height/String : 480 pixels
DisplayAspectRatio/String : 1.500
FrameRate/String : 29.970 fps
Standard : NTSC
Resolution/String : 12 bits
Bits-(Pixel*Frame) : 4.985
StreamSize/String : 111 MiB (97%)

Audio
Format : PCM
Format_Settings_Endianness : Little
Format_Settings_Sign : Unsigned
CodecID : 1
CodecID/Hint : Microsoft
Duration/String : 18s 51ms
BitRate_Mode/String : Constant
BitRate/String : 1 536 Kbps
Channel(s)/String : 2 channels
SamplingRate/String : 48.0 KHz
Resolution/String : 16 bits
StreamSize/String : 3.31 MiB (3%)
Interleave_Duration/String : 34 ms (1.02 video frame)
Interleave_Preload/String : 500 ms



poisondeathray posted 2009 Oct 10 18:08
It shows audio there too...

What software are you using for playback? Try something else e.g. MPCHC, KMplayer, VLC etc..

The audio should show up in Premiere as well



foochuck posted 2009 Oct 10 18:14
I tried playing it in windows media player as well as Premiere Pro CS3 - there are no audio levels showing up on the clip. Does it create a separate wav file?


foochuck posted 2009 Oct 10 18:15
I imported one of my m2ts clips into a friends Premiere Pro CS4 and there is definitely audio contained in the clips.


foochuck posted 2009 Oct 10 18:16
I'm going to test out exporting these m2ts files audio from CS4 to wav files - if I do that, will there be any sync files with the AVI files I'm creating from vdub?


poisondeathray posted 2009 Oct 10 18:16
Nope the audio should be in the AVI file

Do a test, make a new .avs script with only this:

DirectShowSource("0001.mts", fps=29.97, audio=true)

And play it in MPC, can you hear audio? But you say playing back clip 0001.mts (or whatever it's called) directly results in audio?



poisondeathray posted 2009 Oct 10 18:19
foochuck :
I'm going to test out exporting these m2ts files audio from CS4 to wav files - if I do that, will there be any sync files with the AVI files I'm creating from vdub?


Shouldn't be any problems...but those are famous last words

You have AC3 Filter installed, but Premiere relies on ACM type codecs so if you install AC3 ACM , it should be able to handle the native AC3 audio from tsmuxer too



foochuck posted 2009 Oct 10 18:55
Poison - just wanted to say thanks for all of your help on this topic. You're a patient guy!

-Charley



poisondeathray posted 2009 Nov 12 13:18
This is just a follow up, for those who might be wondering "why all the trouble?"

As stated earlier, the problem is Adobe uses a poor deinterlace-resize-reinterlace algorithm. When downsizing HD=>SD material, you generally expect sharp pictures, but this is not the case with CS3/CS4 - the end results are rather soft. There are numerous reports of these findings in various forums, and other examples in this link provided earlier:
http://www.precomposed.com/blog/2009/07/hd-to-sd-dvd-best-methods/

So here is an illustrative example, encoded to a lossless format (lagarith), to eliminate the MPEG2 encoder variables (so the final results would look worse after MPEG2 compression). The lossless videos were deinterlaced with nnedi2 and screenshots were taken with AvsP. This particular shot actually hides many of the deinterlace artifacts from Adobe; on "less busy" shots such as with titles in the link above, you can see the aliasing artifacts more clearly.

Adobe CS4 Method


Avisynth Method


If anyone wants to test this out for themselves, the original 1080i AVCHD clip can be found here
http://www.megaupload.com/?d=9B84U1II

Let's hope Adobe improves this for CS5 :roll:



foochuck posted 2009 Nov 12 13:24
Thanks for the follow up poison.


poisondeathray posted 2009 Nov 12 13:30
Did the project turn out ok?

The trade off, of course, is it takes a loong time with a decent quality deinterlacer / processing, and a few extra steps. It might not be worth it for some people, but at least you have better quality options open



foochuck posted 2009 Nov 12 13:39
The project turned out great. Hopefully next time I'll be able to shoot with 2 cameras of the same format as well as just edit in HD.

Thanks again.




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








DVDFab DVD to DVD lets you backup DVDs to DVDr, AVI or MP4 for portable devices. More info or download trial!
About   Advertise   Forum Archive   RSS Feeds   Statistics