View Full Version : Converting TS or MPEG to WMVHD
brent3000
18th September 2008, 15:03
I have been trying for some time now to convert shows i record from my TV card to my pc in sometimes TS but mostly MPEG and was wondering whats the most effective way to convert these into WMVHD and still maintain as must quality as possible to fit on a DVD-9 disc.
SO far for some time now i have been trying to convert Start Wars which i recorded awhile ago using Nic's WMEnc v1.02 Beta. The file seems to (at times) run very well but before i started changing settings left right and center the video seemed to skip and jump every second and i tryed for weeks and seem to always get a very bad result...
My current computer specs are as follows so i dont think they are to blame... just something i am doing wrong...
Windows XP x64 SP2
INtel Core 2 Duo E6850
4gb RAM
Nvidia Gforce 9600GT 512mb
any help at all would be great... this is starting to drive me nuts :(
I do have some small (under 10mb) files which i have encoded recently which show the effects i am talking about...
I have also tryed this with both K-lite and CCCP codec packs installed and have had no major change...
poisondeathray
18th September 2008, 21:48
It's tough to guess what you are trying to say or mean by "skip or jump"
Does this behaviour occur in the original .ts or .mpg?
Interlaced? What .avs script are you using?
Can you post the small sample and a small clip of the original file too?
brent3000
19th September 2008, 00:03
The files are located here http://www.3knetwork.net/test/
The mpg is the original and the wmv is the encoded one (naturally)
The image is the settings that i used to make the wmv file
The movie almost skips a frame every now and then and u can see a sudden jump in the frame for a second... the 1st main one is located at just after the 1st sec of the vid... Its mainly noticable after the 6th or 7th second as the ship is passing....
The avs script i used is as follows
Directshowsource("D:\WinFast WorkArea\Star Wars ESB Split\WMVHD_1.mpg")
i also tryed this olfer avs script with same results
Directshowsource("D:\WinFast WorkArea\Star Wars ESB Split\WMVHD_1.mpg", fps=25, seekzero=true, seek=false)
poisondeathray
19th September 2008, 00:30
Part of the reason may be your computer specs. (e.g. I played it on my older Athlon, and it skipped frames, but looked better on my newer system), although your duo core should be ok...
Part of the reason may be jerky playback depending on your software player and/or codecs/splitters/filters installed used to decode
A big reason is probably that your source has 239 frames, but the .wmv has 233 frames. DirectShowSource() has been know to do this
Consider using DGMPGdec instead of DirectShowSource() in your .avs script, since your input is .mpg. It will index your file and should give you frame accuracy. There is an easy quick start manual that you should read when you download it
You might consider deinterlacing it as well
brent3000
19th September 2008, 01:05
are you able to try this one out...
I think it may have something to do with the codec which i am running to play and encode... this file was done on another computer (same file same software though only using CCCP pack)
http://www.3knetwork.net/test/Videox86.wmv
This machine is also a intel dual core though it is running Windows XP x86 not x64.. Would this have any effect on it? or would it be the K-lite codec i installed prior...
Also how to i go about using DGMPGdec?? can u link me the guide?
poisondeathray
19th September 2008, 01:15
http://neuron2.net/dgmpgdec/dgmpgdec.html
I can't help you with your codec problems other than to say avoid codec packs and just install the specific ones you need - most of the folks here will say the same thing.
I can tell you encoding DirectShowSource() often leads to problems because of directshow codec and filter conflicts. It should only be used as a last resort.
I doubt x64 OS will have an effect if you run everything in 32-bit mode.
If you don't deinterlace (image resized)
http://i36.tinypic.com/2iqfj0w.png
Deinterlace (image resized)
http://i37.tinypic.com/soplkn.png
Good luck
brent3000
19th September 2008, 01:36
must say massive improvement....
How did u archive that?
poisondeathray
19th September 2008, 01:59
You recorded from a TV source, and often they broadcast interlaced which is why I asked you earlier if it was.
You might want to read up & learn about interlacing
http://www.100fps.com/
http://en.wikipedia.org/wiki/Interlacing
So I deinterlaced using yadif in the .avs script, but there are many, many different options
Here is a big guide to a lot of things to do with video, lots to read
http://www.animemusicvideos.org/guides/avtech/
Is that what you were referring to initially by "skipping and jumping"? Because all the other possible reasons listed above still apply to why your playback might not be "smooth"
brent3000
19th September 2008, 02:04
after testing that video i made on the x86 machine i tested it on the xbox 360 (main reason i wanted wmvhd) and it all seemed to play very nice though my PC still jumped and jerked every now and then (so i may asume the codec packs may be conflicting... time for another format i would guess.) though i will give this new info a try :) thx alot for your info and help :) hope i can finally get this movie done now :)
poisondeathray
19th September 2008, 02:23
That last sample still had artifacts (not deinterlaced). Here is a sample script you might try using DGMPGdec, you have to replace with proper paths/filenames of course
LoadPlugin("PATH\DGDecode.dll")
Load_Stdcall_Plugin("C:\Program Files\AviSynth 2.5\plugins\yadif.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\NicAudio.dll")
video=MPEG2Source("WMVHD_1.d2v")
audio=NicAC3Source("WMVHD_1 T80 2_0ch 448Kbps DELAY 40ms.ac3")
AudioDub(video,audio)
DelayAudio(0.040)
Yadif(order=1) #Top Field First
Good luck
brent3000
19th September 2008, 06:35
AFter running and testing that script i would like to say a MASSIVE thanks :) you helped solve my issue and i tested the video and it looked very nice and run smooth on my 360 (computer still jumped but it worked as far as i am worried.....)
Some info needed though regarding that script...
The audio info
WMVHD_1 T80 2_0ch 448Kbps DELAY 40ms.ac3
are you able to explain this line and how u determained 448 and if that needs to change depending on the audio output i would enter into Nic's WME?? and also the reason for delaying the audio y .04....
Also u may know whats the way to determine the bitrate that is recommended? like is there a calculator or something similar to determine what number to use?
I will begin encoding all of these files now to see how big the end result is :)
also here is my file that i did using ur script :) http://www.3knetwork.net/test/Video-din.wmv
poisondeathray
19th September 2008, 06:46
That is the bitrate of the original AC3 audio in the .mpg - all determined by DGIndex. When you use it, the audio track will have the information in the name when it is demuxed.
All that information is also found in the DGMPGdec log - it reads and figures it all out for you even the audio delay to keeps in sync. You can open the log file with notepad to read it. It even tells you field order. Have a look at the DGMPGdec manual it will explain everything.
If you need a specfic end filesize use a 2-pass bitrate and use a bitrate calculator, otherwise your previous settings were using 1-pass "quality" mode for the video (set at 95)
Play around with some settings and have fun learning
Cheers
brent3000
19th September 2008, 07:06
silly me before :P i didnt notice that file when i demuxed it lol :P
Thx again great help :)
brent3000
14th October 2008, 09:51
Im back with more questions :)
I have spent some time playing around with this and have gotten the hang of alot of it and am having some fun with the settings :) one issue that has come about is that that original movie i has (star wars one) was recorded in a TS format... I tryed demuxing it with dgmpgdec but for some reason (although the AC3 is in the file) it pulled some other format of audio out of it.. I originally used HDTVtoMPEG to remove the adds and convert it form TS to MPEG but i noticed when combining them all and processing (using the scripts you gave me) the audio always went out of sync... Do you know how to pull the AC3 out of a TS using dgmpgdec or something to help me with this issue? cuz i beleive its the HDTVtoMPEG thats causing the issue... (why it even splits them into 1gb files i have no idea...)
poisondeathray
14th October 2008, 19:21
Did you record in MPEG2/AC3 .ts format?
Use mediainfo to provide more information on each of your files (identify the "some other format audio")
TsMuxeR can remove streams out of a transport stream
There is not enough information provided to know at what stage the desync is introduced; and I'm unfamiliar with HDTVtoMPEG, but it's possible that the desync is introduced here. You also should describe the desync - is it constant (e.g. 1sec the whole way through) vs. progressively worsening. Are the individual MPEG converted files in sync? At what stage is the desync noticable?
You can use DGIndex on the original .ts if it was MPEG2/AC3. One option is to use frame accurate MPEG2 editors like videoredo or womble mpeg video wizard to remove commercials. Unfortunately neither are free, but videoredo even has ad detection. A free MPEG2 is mpg2cut2, but it's not frame accurate (only cuts on keyframes.)
You can also do the whole thing manually with avisynth using Trim()++Trim() etc..
brent3000
15th October 2008, 10:31
Ill start from the top of your post and work my way down make it easy for both of us...
I recorded the ts file using Winfast (comes with the Leadtek cards) and it only had Transport Stream (dont know what the full detail of it is...)
Here is the media info (sorry for it being so long was not sure what part u wanted) When i did it before it started spitting out like m2a or something like that as the audio (not bineg ac3 it didnt work in that script) Doing it now though it dosnt seem to spit any audio out with the demux file. In DGIndex the audio section seems to label it as 0: AC3 2/0 448 yet the folder which i demux it to only has the m2v and d2v files in it...
General
ID : 602
Complete name : G:\TV Recorded Backup\Video_0823-2220(Ten Sydney Star Wars).ts
Format : MPEG-TS
File size : 28.9 GiB
Duration : 3h 0mn
Overall bit rate : 23.0 Mbps
Video #1
ID : 512 (0x200)
Menu ID : 1573 (0x625)
Format : MPEG Video
Format version : Version 2
Format profile : Main@Main
Format settings, Matrix : Standard
Duration : 3h 0mn
Bit rate mode : Constant
Nominal bit rate : 9000 Kbps
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 16/9
Frame rate : 25.000 fps
Standard : PAL
Colorimetry : 4:2:0
Scan type : Interlaced
Scan order : Top Field First
Bits/(Pixel*Frame) : 0.868
Video #2
ID : 514 (0x202)
Menu ID : 1569 (0x621) / 1576 (0x628)
Format : MPEG Video
Format version : Version 2
Format profile : Main@High
Format settings, Matrix : Standard
Duration : 3h 0mn
Bit rate mode : Constant
Nominal bit rate : 90.0 Mbps
Width : 1920 pixels
Height : 1080 pixels
Display aspect ratio : 16/9
Frame rate : 25.000 fps
Colorimetry : 4:2:0
Scan type : Interlaced
Scan order : Top Field First
Bits/(Pixel*Frame) : 1.736
Audio #1
ID : 650 (0x28A)
Menu ID : 1573 (0x625)
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 2
Duration : 3h 0mn
Bit rate mode : Constant
Bit rate : 256 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Resolution : 16 bits
Video delay : -607ms
Language : English
Audio #2
ID : 651 (0x28B)
Menu ID : 1573 (0x625)
Format : AC-3
Format/Info : Audio Coding 3
Format profile : Dolby Digital
Duration : 3h 0mn
Bit rate mode : Constant
Bit rate : 256 Kbps
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 48.0 KHz
Video delay : -598ms
Language : English
Audio #3
ID : 672 (0x2A0)
Menu ID : 1569 (0x621) / 1576 (0x628)
Format : AC-3
Format/Info : Audio Coding 3
Format profile : Dolby Digital
Duration : 3h 0mn
Bit rate mode : Constant
Bit rate : 448 Kbps
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 48.0 KHz
Video delay : -33s 720ms
Language : English
Language_More : Clean effects
Text #1
ID : 576 (0x240)
Menu ID : 1573 (0x625)
Format : Teletext
Language : English
Text #2
ID : 577 (0x241)
Menu ID : 1569 (0x621) / 1576 (0x628)
Format : Teletext
Language : English
Menu #1
ID : 257 (0x101)
Menu ID : 1569 (0x621)
Format : MPEG Video / Teletext / AC-3
List : 514 (0x202) (MPEG Video) / 577 (0x241) (Teletext, eng) / 672 (0x2A0) (AC-3, eng)
Menu #2
ID : 256 (0x100)
Menu ID : 1573 (0x625)
Format : MPEG Video / Teletext / MPEG Audio / AC-3
List : 512 (0x200) (MPEG Video) / 576 (0x240) (Teletext, eng) / 650 (0x28A) (MPEG Audio, eng) / 651 (0x28B) (AC-3, eng)
Menu #3
ID : 263 (0x107)
Menu ID : 1576 (0x628)
Format : MPEG Video / Teletext / AC-3
List : 514 (0x202) (MPEG Video) / 577 (0x241) (Teletext, eng) / 672 (0x2A0) (AC-3, eng)
TsMuxeR sounds interesting so i might have to give it a look into...
HDTV2MPEG does this weird thing where it splits the files into 1gb sections and that it how the sync issue happens worse with every gb file :( SO i think its that software.....
Thx for the info on add cutting and i will look into that software tonight as i am keen to get some good software that does the job good :)
brent3000
15th October 2008, 10:35
as a side note i did some playing around just then and it seems that it fixed something some how but a small section of the clip i wanted did spit out 1 .ac3 file... i shall work on it for a few and see what has happened but last time it was not spitting this file out...
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.