Hi. I'll start with what I am trying to accomplish. I want to put my digital tv caps of a tv show onto bluray using AVCHD. The files were all 704 x 480 transport streams captured with hauppauge tuner. All were 29.97 fps. Interlaced tff. I created a disc and burned it only to find the combing effect was bad. I Decided I needed to deinterlace the video and since I had to reencode now anyway, convert to h264.
After some reading here I decided to use Megui. My scripting skills are not good so I started one with megui's script creator and pasted in some lines i found in the forum. I read about avisynth batch scipter so I made a template using the script I had made then made all the avs files. After converting some files I found that the aspect ratio seemed to have changed from 4 by 3 to 16 by 9. Did some more reading and added some lines to define the aspect ratio. Somehow I am causing severe audio sync issues. I think it has to do with megui changing the frame rate but I am not sure how to control it. I converted about 60 files and only about 10 had the 29.97 frame rate i was expecting. Most were 23.97 and some were 19.
I used 2 different scripts.
Here is one of the template scripts I used
Clip="%CLIP%"
LoadPlugin("C:\Users\Gerald\Downloads\Blueray tools\MeGUI_2418_x86\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source(Clip+".d2v")
LoadPlugin("C:\Users\Gerald\Downloads\Blueray tools\MeGUI_2418_x86\tools\avisynth_plugin\TIVTC.d ll")
tfm(order=1).tdecimate(hybrid=1)
#crop
LanczosResize(720,480) # Lanczos (Sharp)
# Set DAR in encoder to 4 : 3. The following lines are for automatic signalling
global MeGUI_darx = 4
global MeGUI_dary = 3
#denoise
TTempSmooth()
Here is the other
Clip="%CLIP%"
LoadPlugin("C:\Users\Gerald\Downloads\Blueray tools\MeGUI_2418_x86\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source(Clip+".d2v")
#QTGMC( Preset="Slow" )
QTGMC( Preset="Slow", Sharpness=1.2, SLMode=1 )
SelectEven()
#LoadPlugin("C:\Users\Gerald\Downloads\Blueray tools\MeGUI_2418_x86\tools\avisynth_plugin\ColorMa trix.dll")
#ColorMatrix(hints=true, threads=0)
#deinterlace
#crop
LanczosResize(720,480)
global MeGUI_darx = 4
global MeGUI_dary = 3
TTempSmooth
#Lanczos (Sharp)
#denoise
#TemporalSoften(4,4,8,15,2)
Is there a way to tell megui what frame rate to use in the script? I tried to read about assume frame rate but didnt get how to use it and the syntax. My goal here is to put the entire series on bluray without the combing. I don't really care if it is in mpg2 or mp4 so long as I can keep the original frame rate and the audio sync
thanks
Jerry
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 25 of 25
Thread
-
-
u need to change audio framerate too to get proper syncronization. Use tfm audio tools for converting ur audio to ur desired framerate.
-
I want to put my digital tv caps of a tv show onto bluray
If you want full blu ray compatibility with SD you need either to keep the interlacing or upsize to 720p.
The Framerate issue is being caused by tdecimate, TFM is an IVTC function that produces progressive frames from telecined with a few duplicate frames, tdecimate then removes the duplicate frames to restore the video to the assumed original framerate of 23.976. I'm not sure where the 19's came from because I've never done anything that dumb. The rest would be from the second script and it's doubtful they'll be all that much use for Blu Ray anyway. I won't say any more until you can tell us if you want actual blu ray compatible files. -
I want compatibility. The only reason I am trying blu ray is to keep the number of discs down. The unconverted files work and play in my player but the combing is really annoying. All I really want to do is deinterlace and resize to 720p. However Multi Avchd accepts the files without that by changing detected properties from 704 to 720. I have 120 episodes of the original Batman tv series that i am trying to work with. The 2 scripts are from my search to deinterlace. I just found parts of scripts for deinterlacing and patched these together. Obviously not the right way to go about it but I don't do scripts very well. I did not fully understand what I was putting together. Just trying to make something work.
This is the output from Media info on one of the files I am working on
General
Complete name : X:\batman\Bluray disc 2\061 The Penguin's Nest.mpg
Format : MPEG-PS
File size : 384 MiB
Duration : 22mn 56s
Overall bit rate mode : Variable
Overall bit rate : 2 342 Kbps
Video
ID : 224 (0xE0)
Format : MPEG Video
Format version : Version 2
Format profile : Main@Main
Format settings, BVOP : Yes
Format settings, Matrix : Custom
Format settings, GOP : Variable
Duration : 22mn 56s
Bit rate mode : Variable
Bit rate : 1 912 Kbps
Maximum bit rate : 15.0 Mbps
Width : 704 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Frame rate : 29.970 fps
Standard : NTSC
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.189
Time code of first frame : 00:00:00;00
Time code source : Group of pictures header
Stream size : 314 MiB (82%)
Audio
ID : 189 (0xBD)-128 (0x80)
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Format settings, Endianness : Big
Muxing mode : DVD-Video
Duration : 22mn 56s
Bit rate mode : Constant
Bit rate : 384 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 63.0 MiB (16%)
Text
ID : 224 (0xE0)-CC1
Format : EIA-608
Muxing mode : A/53 / DTVCC Transport
Muxing mode, more info : Muxed in Video #1
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)
Thanks -
If you want blu ray comatiblilty it needs to be interlaced (or fake interlaced) and it needs to be 720x480, blu ray only supports specific resolutions and frame rates. The media info on your video doesn't mention Scan type, I'm not sure what that means, but if you say it's interlaced then hopefully it's proper interlacing. I've never used MEGUI, but I know handbrake doesn't support interlaced encodes, if MEGUI is the same then you'll have to find anthoer way. It would be best to use x264 directly anyway just so you know nothing untoward is being done to the video before encoding. If you really need it progressive then you'll have to upscale to 720p because that's the only resolution Blu Ray supports at 59.94fps.
Here's what you need to know:
http://www.x264bluray.com/
Code:MPEG2Source(*.d2v") #insert filters here AddBorders(8,0,8,0) #or here
-
You can just copy the audio as is but I think you'll need ccextractor to extract the captions from the video, then you can convert them to PGS with Subtitle Edit.
-
So, I need to upscale to 720, leave it interlaced and change the frame rate to 59.94fps? Would doubling the frame rate this way help or eliminate the combing issue? If I am understanding this correctly what would be the code to change the frame rate from 29.97 to 59.94?Thanks for that information about ccextractor. I hadn't even thought about using subtitles till now.
-
Going by the scripts you used, the length of none of your files was changed and that's not the reason for the audio being out of synch. addu is dead wrong. You got 19.98fps for one (some?) because DGIndex was used in ForcedFilm mode with an IVTC thrown in afterwards. Very bad.
Your interlacing issues could maybe be caused by using TTempSmooth as if the source was progressive. From the TTempSmooth doc:
interlaced - (interlaced yv12 input)
Set this to true if you are using ttempsmooth on a YV12 interlaced clip... otherwise set it to
false.So, I need to upscale to 720, leave it interlaced and change the frame rate to 59.94fps?
If you make them 720x480 (by adding borders as suggested by ndjamena), they have to be interlaced 29.97fps, just as the source. Perhaps a short sample of your Batmans would say if they should be IVTC'd, or maybe bobbed to 59.94fps for 720p.
Edit later: I decided that ndjamena is probably right in thinking your interlaced material for Blu-Ray was encoded as progressive and that's the reason your player isn't deinterlacing. And if they can be IVTC'd back to 23.976fps, maybe 720p at 23.976fps isn't so bad after all.Last edited by manono; 1st Feb 2014 at 01:52.
-
Batman WAS shot on film rather than video tape, so it's possible it may be able to be ITVC'd. It depends on what's been done to it during post-processing. But, yes, ITVCing would require up-scaling. (Unless someone knows how to apply soft pull-down to the stream???? if that's even possible.)
-
By the way, 720p is 1280×720.
720x480 is 480i.
Just making sure we're aware of that, since they both contain the number 720. -
Me thinkth some of the episodes have already been ITVC'd, OP didn't notice the different frame rate and that's where the 19fps came from.
--pulldown 32
is an x264 setting for soft telecining, I'm not sure BD authoring tools will accept it but you can try it out for us
Sort the files, find any with a 23.976 frame rate and put them aside.
Code:MPEG2Source(*.d2v") TFM(slow=2) TDecimate() AddBorders(8,0,8,0)
Code:SetMemoryMax(1024) MPEG2Source(*.d2v") QTGMC() RequestLinear(13, 26, 8, false, false) SRestore(speed=-1, frate=23.976, thresh=12) AddBorders(8,0,8,0)
Just to see what it looks like and we can find a way to iron out any artefacts once we know what we're dealing with.Last edited by ndjamena; 1st Feb 2014 at 05:57.
-
-
Hmmmm, according to Wikipedia digital TV in America allows content to be streamed as 23.976 fps, soft pull-down is only mentioned in the DVD category but I suppose it's possible it's used on TV as well.
Um, there are 120 episodes of Batman, you're going to have to be more specific about what exactly you want a sample of. Remember, he used two different scripts and got 3 different results... -
Well, it's obvious I know even less about this than I thought. I thought 720 was 720x480. Not 1280x720, so thanks for that. I was letting what I thought I knew get in the way while trying to read the forum before posting. Several other bits of "knowledge" were also in the way. I am uploading a short clip. The clip is an action sequence that I cut out using Videoredo tv suite. All videos were edited with videoredo plus. Editing was simply removing commercials. I used Batchdemux overnight to demux 60 files. All that I have looked at with Medinfo show the video to be 704*480 29.970 fps ntsc. I have made a few blu ray test discs using multiAvchd,and rewritable media, that played fine except for the combing effect
Thanks -
Even your capture is out of synch by something like -150ms. You can easily tell when Catwoman claps her hands at 16 seconds in. Maybe you dropped frames when capping, maybe cutting it caused it (not likely). Is your final result more noticeable than that? Is the delay greater?
The episode(s) has/have been time-compressed. The complete unedited episodes are longer but had fields removed to make them shorter so more ads could be inserted. The 'effective' framerate is greater than 23.976fps, to make it play faster and make the total length less. I didn't bother trying to figure it out as Blu-Ray makes no allowances for that. A simple IVTC:
TFM().TDecimate()
deinterlaces a ton of frames but might be OK if you're not too picky. This is a good reason to bob it to 59.94fps for 720p and Blu-Ray - you won't have to do anything really difficult. Maybe a script something like this:
Yadif(Mode=1)#or the better and slower QTGMC
Lanczos4Resize(960,720)#or the better and slower nnedi3_rpow2
AddBorders(160,0,160,0)
Or keep it interlaced 29.97fps and add borders for 720x480 Blu-Ray. And if you can't use interlaced encoding for x264, you could keep it MPEG-2 which is allowed for Blu-Ray. It's easy to encode interlaced for MPEG-2. Unfortunately, for Blu-Ray it has to be 720x480 and:
AddBorders(8,0,8,0)
forces a reencode of the entire thing. If you're willing to make it DVD rather than Blue-Ray, you wouldn't have to do anything but author it. 704x480 is perfectly legal for NTSC DVD.Last edited by manono; 1st Feb 2014 at 18:52.
-
The bad files were minutes off by the end. Before Posting I had demuxed several and found that the audio would be say apx 23 minutes and the video would be about 19. But if I demuxed the original file the times would be the same. I intend to use your script examples and see how it goes. I have 2 methods for creating d2v files. Megui has its file indexer and I also have dgmpgdec158 dgindex. does it matter which one I use? I have done many dvds with similar material and not had these problems, but I want to learn to do blu ray. Thanks to all for the input and help. I will post results when I have time to get some results.
Thanks -
Don't bother with my scripts, as manono said, the TV station sped the video by removing fields, meaning IVTCing them won't achieve much and there's no original frame-rate to return it to. You said there was still interlacing in your original encodes and that's most likely why. I tried using TFM on the buffy episodes I'm currently working on and it's deinterlacing abilities aren't anything to speak about, I've had to resort to QTGMC'ing them to get the progressive frames back. The best options you have left are to encode them as they are, ie 480i or run them through QTGMC and encode as 1024x720, 59.94fps. There are always other options of course, but no one who cares about quality will help you with them, it's a matter of pride.
-
Demuxed timings are meaningless. Unless it stays like that once it's been muxed again, it's not a problem.
See:
https://forum.videohelp.com/threads/362079-Demuxed-video-showing-wrong-timing -
tfm means the film machine a software a freeware in which there is chance to convert the framerate of an audio to the desired framerate.
-
-
Update. I have finished encoding half of the files using hcencoder and this template script
Clip="%CLIP%"
DGDecode_mpeg2source(Clip+".d2v")
global MeGUI_darx = 4
global MeGUI_dary = 3
QTGMC( Preset="fast", Sharpness=1.2, SLMode=1 )
SelectEven()
AddBorders(8,0,8,0)
Actual Scripts were written using Avisynth batch Scripter
Muxing the files into m2ts format using Tsmuxergui and playing with vlc to check sync. There is some small amount of audio sync issues as in the uploaded clip but nowhere near what I was experiencing before. I have to pay attention to notice it. I found that in the megui settings force film was checked for the included file indexer. That was how I was creating the .d2v files on the files that I was having trouble with. I used this version of Dgindex to make the latest d2v files. dgmpgdec158. Now everything is 720x480 29.97 fps mpeg2 and I am satisfied with the results. I still cant script very good but seem to have this project in hand now.
Thanks to all for the help and advice.
Jerry -
Similar Threads
-
Reducing the frame rate of M2TS files from 120fps to 60fps or lower
By TaZ-z in forum Video ConversionReplies: 3Last Post: 8th Dec 2011, 19:53 -
Audio sync issue, Virtualdub, old video clips changing frame rate
By litmus in forum Video ConversionReplies: 1Last Post: 19th Sep 2011, 12:35 -
Does changing frame rate make audio out of sync?
By aznbennet in forum AudioReplies: 2Last Post: 11th Sep 2011, 03:32 -
no audio from transport/program stream file when i try to encode
By uptonm in forum CapturingReplies: 0Last Post: 20th Mar 2010, 11:41 -
M2TS playback A/V sync issues
By sixleaf in forum Software PlayingReplies: 0Last Post: 25th Apr 2009, 18:22