View Full Version : DTV tools -- .TS -> AVISynth?
Randall
26th May 2007, 14:47
Does anybody here know the best way to convert 1080i30 ATSC to 24fps progressive using MEncoder? Is this even possible with avisynth? I know it's possible to get 720p60 down to 24 fps progressive, but I have a feeling that this is close to impossible with 1080i. Thanks.
jobe228
4th October 2007, 22:56
hey guys, i need a little help
I am trying to convert a .ts source (1920x1080i, 29.97fps) to NTSC DVD format (720x480). The Audio is AC3 5.1 so I would like to keep that unchanged unless someone recommends switching to PCM. I've tried procoder but it keeps de-interlacing the file. Shouldn't I keep it interlaced or should I make it progressive?
Aviscript? Virtualdubmod?
Thanks for any replies
Adub
6th October 2007, 09:46
Well, you can use DGIndex to create an index file that Avisynth can use, and then you can feed it directly into HCenc, Quenc, or whatever your favorite Mpeg-2 encoder is.
You should be able to keep the ac3 file, just make sure it is up to spec with the DVD specifications. You can always use Aften do re-encode it if you need to.
Toti
8th October 2007, 18:56
Actually is quite simple, use DGIndex to make a .d2v then use avisynth to do inverse telecine your video back to its original 24fps.
NOTE: This is only good if the video was originally shot at 24fps then used pulldown to make it 29.97/59.96fps If your video was shot at 29.97fps and true interlaced (like football games) then simply deinterlace but stay at 29.97. TV shows like CSI, Heroes, 24 etc... then its ok. Take out the commercials first since almost all commercials at native 29.97fps.
Anyway, use this for 29.97 -> 23.976
LoadPlugin("C:\Program Files\AviSynth 2.5.7\plugins\DGDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5.7\plugins\Decomb521.dll")
mpeg2source("C:\Movie\MainMovie.d2v", upConv=1)
Telecide(1,guide=1,vthresh=0)
Decimate(cycle=5)
FieldDeinterlace(Full=False,threshold=15,dthreshold=9)
Crop(4,4,-4,-4)
BilinearResize(1920,1080)
or from 59.96 -> 23.976
LoadPlugin("C:\Program Files\AviSynth 2.57\plugins\DGDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.57\plugins\Decomb521.dll")
mpeg2source("C:\Transporter 2\Main Movie\MainMovie.d2v", upConv=1)
Telecide(1,guide=1,vthresh=0)
Decimate(cycle=2)
Decimate(cycle=5)
FieldDeinterlace(Full=False,threshold=15,dthreshold=9)
Crop(4,4,-4,-4)
BilinearResize(1920,1080)
The last two lines you don't need but I have found that sources from DirecTV - DishNetwork - Over The Air always need to cut some black lines on sides which lines and how much depends on how bad they mess them up.
hkazemi
7th February 2008, 07:12
720p-to-FILM.avs
LoadPlugin("C:\Program Files\Encoding\DGIndex\DGDecode.dll")
MPEG2Source("__vid__")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Decomb.dll")
SelectEven().Decimate(cycle=5).Crop(4,4,-4,-4).Lanczos4Resize(960,528)
1080i-to-FILM.avs
LoadPlugin("C:\Program Files\Encoding\DGIndex\DGDecode.dll")
MPEG2Source("__vid__")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Decomb.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Uncomb.dll")
Uncomb().Decimate(cycle=5).Crop(4,4,-4,-8).Lanczos4Resize(960,528)
You are resizing from HD (height >=720) to SD (height < 720 lines) resolutions...a good portion of codecs, players, software, and renderers appear to use different color matrixes for HD and SD. The effect is seen as a color shift, usually most noticeable in greens and reds. (HD resolutions nearly always use the BT709 color matrix, while SD resolutions stick to BT601. MPEG streams are supposed to specify this information, but sometimes they don't, so most devices assume what I've just described in the absence of specific information.)
The solution is to use a color matrix changer like Avisynth plugins Colormatrix() or BT709toBT601() when resizing from HD to SD. If you use Colormatrix, it is supposed to be used early in the script, before deinterlacing. It also needs to explicitly be told whether the clip is interlaced or not.
In case you're interested in more, I have posted a thorough summary article here on this topic:
http://forum.doom9.org/showthread.php?t=133982
forex2409
23rd October 2010, 20:16
It seems I am unable to use YV12. Here's what brings me to that conclusion (I'll write these out in case other people have any of these symptoms, maybe they suffer from the same problem I am):
When I use DVD2AVIT3 to open a set of .TS files, I get an error saying "You video card cannot handle YUV display. Conversion will work, but you will not get any display in YUV mode". I click OK and it crashes. Note: The error message does say "You video card..." instead of "Your..." in case you feel like correcting grammar
dumbledore
25th October 2010, 05:48
hey guys, i need a little help
I am trying to convert a .ts source (1920x1080i, 29.97fps) to NTSC DVD format (720x480). The Audio is AC3 5.1 so I would like to keep that unchanged unless someone recommends switching to PCM. I've tried procoder but it keeps de-interlacing the file. Shouldn't I keep it interlaced or should I make it progressive?
Aviscript? Virtualdubmod?
Thanks for any replies
what you want to do is separate the fields, resize, and then reweave. should be easy in avisynth. you can't just resize the interlaced frames and expect them to stay interlaced.
subpardaemon
26th September 2012, 08:47
hi all,
i've read most of the guides, but i have a problem: here, in hungary, DVB is using MPEG4. so, my question is: what software do i need to do these steps, and what possible settings:
- format IN: .TS, in 4 1GB files (need to be joined, a la DGMPDec)
- codec IN: video: H264, MPEG4 AVC (part 10), 50FPS (PAL), planar 4:2:0 YUV, 1440x1080 pixels, quite possibly interlaced; audio: mpeg3 128kbps, 48khz, stereo
- need to do some editing (chop off the end of the stream as it contains ads), some cropping (the programme was in 4:3, however, it was broadcast as 16:9), and resizing (this kind of programme is fine in a slightly lower resolution)
- fomat OUT: mp4 container
- codec OUT: x264 MPEG4 AVC, aac audio
can you give me some pointers as to which software should i use to convert the source material to the destination format? in the past, i've been converting DVDs with DVDDecrypter, DMPEGDec, and Gordian Knot, i also have some experience in using virtualdub on its own, so i know of those -- but this kind of task is rather different.
:confused:
Guest
26th September 2012, 12:32
One option:
DGDecNV + Avisynth + x264 + FAAC + YAMB
DGDecNV is very similar to DGMPGDec. There are other options for serving your AVC video to Avisynth, such as FFMS2, DSS2(), etc.
subpardaemon
26th September 2012, 13:06
hey donald, thanks for the heads up! :)
my only gripe about dgdecnv are that: 1) it ties me to an nvidia architecture (which i actually have, in the form of a lenovo b560 laptop with an nvidia 310m -- AFAIK that's good enough to support these CUDA operations, right?), and 2) since it costs money, if somehow i still can't make the system work, it's just dollars down the drain.
however, if you are positive it should work in win7 64bit on the abovementioned laptop, i may chime in.
and how is the workflow? i open the .TS files just like the .VOBs in DMPEGDec, save an avisynth script from that, then start up YAMB, open the script and start working from that? (in case i skip the mp3->aac conversion... does the mp4 encapsulation format support mp3 streams as well?)
Guest
26th September 2012, 13:36
hey donald, thanks for the heads up! :)
my only gripe about dgdecnv are that: 1) it ties me to an nvidia architecture (which i actually have, in the form of a lenovo b560 laptop with an nvidia 310m -- AFAIK that's good enough to support these CUDA operations, right?), and 2) since it costs money, if somehow i still can't make the system work, it's just dollars down the drain. Your 310M should work but we may have to find just the right video driver. I always offer a refund if the tools won't work for you.
however, if you are positive it should work in win7 64bit on the abovementioned laptop, i may chime in. Should be fine.
As I said, however, you have freeware options, such as FFMS2 and DSS2, but be prepared to run into limitations that do not exist in DGDecNV.
and how is the workflow? There is a quick start guide in the distribution and a lot of material here on the forum. As I mentioned the workflow is very similar to that of DGMPGDec. And you can certainly get more specific help here and on my forum.
Kermit25
30th October 2012, 17:07
Welcome.
I have a problem with converting .ts files. I don't know, what the cause is, the formation of a "macro blocks".
1) DGIndex 1.5.8 doesn't load the recorded .ts files. Program get the message: "No video sequence header found!" - I can't make the index file D2V :(
2) DGAVCIndex 1.0.9 reads and creates index files. But after the opening:
...
d2vpath= "odc.29_20121012_072509.dga"
video=AVCSource(d2vpath, deblock=false)
....
audiodub(video,audio)
they look like in the image:
http://img341.imageshack.us/img341/1223/piksele.jpg
What is going on? But when playing all is OK.
3) Using the command "DirectShowSource()" in the .avs files, go to load .ts files. But I'm not completely happy with the final result (de-interlacing, audio and video were leaving). At least there is no longer the macro blocks that appear in the case of step 2
Someone can help me? If in doubt, I can provide a sample.
Guest
30th October 2012, 18:23
DGMPGDec won't work because your stream has AVC video.
DGAVCDec does not handle PAFF streams correctly.
Try DGDecNV if you want to stick with DG tools.
Kermit25
30th October 2012, 21:00
Try DGDecNV if you want to stick with DG tools.
Thank you for the offer, but there is one small problem. "That means the graphic card must have a VP2 or greater engine" I don't have, and the program will not even start.
I didn't say, that strongly hold the DG tools. I use them because so far I do not fail. I tried to use MeGUI to this .ts, but it isn't able to load recordings.
Hands fall, I do not know what these files is wrong?
Guest
30th October 2012, 21:05
You can try FFMS2, though it has issues with some transport streams.
Some people remux to MKV and then open with FFMS2.
Kermit25
30th October 2012, 23:46
FFMS2 it doesn't work properly. These macro blocks in the preview. Just as DGAVCIndex.
Maybe someone wants to look at the sample of the recording? Tell me, how to prepare for treatment. >>SAMPLE<< (http://www.sendspace.com/file/0lk3ux)
Please for help... :confused:
By the way, I use a 'TFM' filter to remove interlacing. However, I'm not entirely convinced by the result. I also tried FieldDeinterlace () and KernelDeint (). Both of these, also not fared.
Guest
31st October 2012, 00:04
You can use DSS2() instead of DirectShowSource().
Regarding deinterlacing: The stream is field blended so start looking into deblenders, such as SRestore().
kalehrl
31st October 2012, 17:25
Have a look here:
http://forum.doom9.org/showthread.php?t=164271
I also struggled with crap like that.
evaaa
4th March 2021, 19:21
Quote:
Originally Posted by FreQi View Post
720p-to-FILM.avs
Code:
LoadPlugin("C:\Program Files\Encoding\DGIndex\DGDecode.dll")
MPEG2Source("__vid__")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Decomb.dll")
SelectEven().Decimate(cycle=5).Crop(4,4,-4,-4).Lanczos4Resize(960,528)
1080i-to-FILM.avs
Code:
LoadPlugin("C:\Program Files\Encoding\DGIndex\DGDecode.dll")
MPEG2Source("__vid__")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Decomb.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Uncomb.dll")
Uncomb().Decimate(cycle=5).Crop(4,4,-4,-8).Lanczos4Resize(960,528)
You are resizing from HD (height >=720) to SD (height < 720 lines) resolutions...a good portion of codecs, players, software, and renderers appear to use different color matrixes for HD and SD. The effect is seen as a color shift, usually most noticeable in greens and reds. (HD resolutions nearly always use the BT709 color matrix with spyera opiniones (https://www.webnovedad.com/spyera-descarga-gratis-iphone-android/), while SD resolutions stick to BT601. MPEG streams are supposed to specify this information, but sometimes they don't, so most devices assume what I've just described in the absence of specific information.)
The solution is to use a color matrix changer like Avisynth plugins Colormatrix() or BT709toBT601() when resizing from HD to SD. If you use Colormatrix, it is supposed to be used early in the script, before deinterlacing. It also needs to explicitly be told whether the clip is interlaced,
.
In case you're interested in more, I have posted a thorough summary article here on this topic:
http://forum.doom9.org/showthread.php?t=133982.
You can to use a emulator
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.