Log in

View Full Version : Help with Simpsons DVD Encoding


teknomedic
6th January 2013, 06:34
Looking for some help with "The Simpsons" season DVDs. These are Region 1 NTSC Retail DVDs.

Basically, I can rip the VOBs with no problem... where I need some suggestions is during the coding/compression phase.

From my readings the simpson DVDs have used some strange interlacing or telecine and I'm guessing that's where my problems are.

I'm using MediaCoder (latest version) to encode the video into H264 into a MP4 container.

I've been using IVTC to correct many of the "interlace" issues and it has worked well, but I've been finding it doesn't work well at certain times during an episode.

An example would be that the main scene appears to be normal (even with motion), but say a character is talking or moving an arm... then I'll see interlaced lines on their mouth or arm while again the rest of moving parts of the scene remain OK.

Thoughts?? I'd be happy to post some screen grabs or samples, but would need direction on the best photo/video service to use. :)

BTW, I've tried google and the search here, but tend to only find info from several years ago and pretty much all of it doesn't describe the type of problem I'm seeing.

Thank you.

teknomedic
6th January 2013, 07:01
Here's an example, this is AFTER encoding from the VOB using IVTC (no other de-interlacing used) with H264/MP4... if you look at Burns nose and mouth you can see some very specific type of interlacing (that I have no word to describe)... his entire mouth was moving along with some Smithers movement as well... but only portions of Burns nose and mouth show the interlacing.

Is this really interlacing?... Telecine?... is this a type of DRM that was present in the VOB and tranlated into the encode?

Something else I've noticed is that it this "problem seems to be there for a second or two... take a break for a few seconds then return. Could be just me or lack of motion in certain scenes though???

http://i163.photobucket.com/albums/t297/teknomedic/Simpsons%20IVTC/Untitled_zps51c632cd.jpg

Thanks again.

teknomedic
6th January 2013, 07:12
One more example...

Here it's Homer's mouth.

Again... the first several seconds before this had tons of motion with flying letters, arms, picking Bart up and putting him back down... but zero interlacing problems for well over 30 seconds with all that motion... then a flicker of it while Homer is talking at his lips. Strange... and how do I fix this??

http://i163.photobucket.com/albums/t297/teknomedic/Simpsons%20IVTC/Untitled2_zps976f37c6.jpg

Bakadesu
6th January 2013, 07:23
Did you use AVISnyth? Can you post your script? (This might be a stupid question considering I've never used MediaCoder before)

lansing
6th January 2013, 07:29
upload a sample

teknomedic
6th January 2013, 07:48
Did not use AVISnyth... I've found MediaCoder to be pretty exceptional for 99% of my coding needs. I know I've only scratched the surface of what it can do... but from what I gather it appears to use many codecs and coders under the hood... only it places them in a very useful GUI. Again... from what I can gather... only been using for a month or so.



Would love to upload a sample... who's a good, free server? ((didn't know I could do video at Photobucket.... will try there))

Also... a good program to cut a sample from an MP4 container?? ((found one called SPGSoft MP4 Cutter... it seems to degrade the video some (must reconvert), but the interlacing is still noticable))

Uploading 3 samples to Photobucket... standby... nevermind, lol.

Bakadesu
6th January 2013, 07:59
Just upload it to fileserve or something like that.

And why are you uploading your encode? Can you post part of the original vob so we can give a solution? No point trying to fix an edited source.

lansing
6th January 2013, 08:01
mediafire is good here for upload. And we need an uncompressed sample from the original source, you can cut the vob file with dgindex, 10 seconds from moving scene should be enough

teknomedic
6th January 2013, 08:09
Copy that... will grab dgindex and use the VOB instead... sorry, didn't think of that. lol

Used Dgindex... I demuxed the video and ended up with an M2V file... assume that's what your after. Will upload shortly... gonna grab one more sample.

Bakadesu
6th January 2013, 08:23
ended up with an M2V file..

That's good :)

teknomedic
6th January 2013, 08:32
Sample 01 - http://www.mediafire.com/?s29itg1wi97gy9b

Sample 02 - http://www.mediafire.com/?jfpoumqhuy08c68


AFTER Coding Samples:

01 - http://s163.beta.photobucket.com/user/teknomedic/media/Sample001_zps461fb922.mp4.html

02 - http://s163.beta.photobucket.com/user/teknomedic/media/Sample002_zpsf11f12ce.mp4.html

teknomedic
6th January 2013, 08:45
As a final try... I tried encoding with/without IVTC, with/without de-interlacing... and WITH IVTC & De-interlacing... no changes.

IVTC alone does the best job for 80% of the video... it's just these other random areas that I can't correct. hmmm.

teknomedic
6th January 2013, 08:51
Edit... I take this back... after closer inspection I do see it... it's just not as frequent or pronounced. Certainly acceptable from my perspective. Season 2 on the other hand is far too noticable and frequent for my liking.

Something else I should add... I did season 1 with IVTC (all other settings the same too) without this issue... this started on season 2 of my DVDs.

Haven't tried season 3 yet cause I don't want to waste time encoding until I have a solution for season 2.

lansing
6th January 2013, 09:06
both samples were telecined, so all you have to do is call ivtc, don't use deinterlacer as it's not for this case. Use the avisyth's ivtc if the one in mediacoder doesn't work: tfm().tdecimate()

i see ivtc didn't work well on sample 2 at default setting, .ie the zoom on the envelope wasn't smooth, so you may want to tweak it a little.

teknomedic
6th January 2013, 09:49
That's my issue... I've used IVTC (tried both "primitive" and "pullup") via MediaCoder with de-interlace disabled and you can see my results via the other "AFTER" samples or the jpg pics earlier in thread.

I'll attempt some work on the samples with Avisynth... but what tweaks would you suggest for IVTC settings?

teknomedic
6th January 2013, 09:56
Looks like MeidaCoder can use Avisynth... or does... also going to try avsp to give me a gui for Avisynth... this turning into a pain, lol.


----edit
OMG... I have no idea what I'm doing with Avisynth or avsp... or even attempting tweaking Avisynth or IVTC inside MediaCoder. Meh.

I "think" I need to make a script??... but have no idea how or what settings do what.

If a kind soul makes a tweaking script that I can import into MediaCoder that will correct my "interlace" issues it would be very much appreciated... but I know, not likely to happen. ;)

teknomedic
6th January 2013, 10:06
I'm certainly not the first to have this issue, lol... hmmm...
http://forum.videohelp.com/threads/217323-Inverse-Telecine-coming-out-crappy-with-GK-what-s-wrong

lol... and that's from 2005. I have a feeling the home work on how to do this is already done. Is it some internet video encoding secret to frustrate noobs? lol.

teknomedic
6th January 2013, 10:50
May have found an easy solution... I turned on "motion correction" in MediaCoder and my test sample had no interlacing issues... going to try the whole episode... will report back with full episode results.

lansing
6th January 2013, 11:08
Your problem can be solve with no more than two lines of code in avisyth. One line to load the video file and one line to call ivtc. It shouldn't be that hard.

Install avisyth, get the TIVTC package and extract the dll file to the avisyth plugins folder. Get avspmod as a GUI, run it, and then drag and drop the video file into it. After that just enter the ivtc line I wrote earlier and you're pretty much done.

Save the avs file and you can encode it with any GUI that supports it. The end framerate should be 23.976. If you got anything other than that, you're doing it wrong.

teknomedic
6th January 2013, 11:31
Will try what you described... didn't notice the IVTC line you wrote earlier, thank you. :)

As an update for my other trial... the full episode encoded with zero interlace issues that I can see using the "motion compensation" setting on "medium".

I'll still try your method though and see how the two compare and report back.

teknomedic
6th January 2013, 12:30
Oh man... this is a sample of what I get following your directions and inputing the script into MediaCoder

Sample Video
http://www.mediafire.com/?et4lorzy5alxwpt

Script
http://www.mediafire.com/?u4lpef47pkl0yu8

Any suggestions on different encoding software so I can try again without MediaCoder?? I'm going to assume it has to do with my lack of knowledge on how to input AVS script into MediaCoder.

teknomedic
6th January 2013, 12:56
Might have sorted it out with MediaCoder.... or not.

First sample test looked good... so I applied it to the full episode. Again... looked 99% perfect.

Where the problems started again was after I tried to re-encode the file to compress it... the file ended up being like 20MB.. the video played at a super fast speed with audio playing at normal speed. Very strange. The only thing I can think is that I still had IVTC enabled???

Next trial... I'm going to try a different container and run the same test on both MP4 and MPEG containers with only change being IVTC disabled.
(attempted a few other containers, but ended up with 0MB files, huh... Mpeg and MP4 appear to work for initial coding of the AVS script)

teknomedic
6th January 2013, 13:27
For those following along...

In order to get an Avisynth script to work in MediaCoder I recommend using the script template.

For my setup the script looks like this:

DirectShowSource(“$(SourceFile)”)
tfm().tdecimate()

The AVS file is added under the "AviSynth" tab and "use script template"

Then... to enable the script then you goto the "Video" tab... be sure to check "copy video" for the "Format" and uncheck "auto" for the "Source" and then select "AviSynth" in the drop down for "source".

I also hit up the Audio tab and checked "copy audio" to again speed up the conversion.

As for Container... again... so far it seems only MP4 or Mpeg will output a real file while other containers I've tried only mess up. Also noted... the resulting MP4 is very jumpy while the resulting Mpeg plays much, much smoother. So at this stage I have to recommend going with MPEG as the container during this step.


now then... still re-encoding the resulting file from the above directions.. will report what happens this time around.

...finally... in theory, I should be able to simply use the AVS script and directly compress the video (skipping the MPEG) option... but as you can see with my previous uploaded sample... the result is an "interlaced nightmare".


Edit... the MP4 still has video play as super fast speed making a 20MB file... as for the MPEG... it stragely reverted to PRE-AviSynth script display after conversion (ie, has all the interlacing I just removed making one time wasting circle... meh)

teknomedic
6th January 2013, 14:04
Well... unless some can offer a working guide to get this working this what I recommend after spending 12 hours trying to get my Simpson animation videos corrected....



Use MediaCoder... then under "picture" tab... look to the far right... then select "de-interlace" tab. Under that... select "disable" (to disable de-interlacing)... then check "motion compensation" (your choice on setting... "fast" worked for me) then under IVTC select Primitive (pullup works too, but I feel I got slightly better results with primitive).



This should correct any visual interlacing on "The Simpsons"... again... I haven't fully tested, but all my previous examples now play cleanly with no noticable interlace artifacts and a full episode encode also showed no evidence of the interlacing issues. So either it's "fixed" or I'm looking in the wrong spots or otherwise missing the errors.

As a final tip... I'm using the H264 coder so... under the x264 tab of Video (far right again) I've placed "tune" to "animation"




Final thoughts....

Now... don't get me wrong... the AviSynth script did allow me to produce a 99% cleaned up file around 1.2GB (roughly same size as the VOB source)... where it's falling through is when I try to encode to the H264/MP4 container using that "cleaned up" file to get me a file size around 100MB-150MB.

It seems AviSynth can't encode the VOB directly (I get error 13 in MediaCoder)... and if I convert to the Mpeg or MP4 container first, then new issues appear (super fast video or reversion of pre-AviSynth settings with intact interlace errors). So... I'd need to find a way to let AviSynth use VOBs... or perhaps demux the video/audio and then use MediaCoder to do it's job.... but all I can keep thinking is... why take all those extra steps? It only takes one adjustment in MediaCoder it seems and the end result appears to be the same in terms of picture quality.

Thoughts???

teknomedic
6th January 2013, 16:03
Some more info from a helpful person named "jagabo"... and he states....


I only looked closely at the first sample, the one from the title sequence. I saw two problems which make it impossible to perfectly IVTC.

At 7.0 to 7.7 seconds, while zooming into the letter P of "SIMPSONS" the telecine pattern of the outer title and the hole in the P don't match. Any field matcher (like TFM()) will be confused by this.

At about 14 seconds in to the shot the video was slowed down with field blending (after the video was telecined). This causes fields to have a double exposure look.

You could use a script like:


Code:
Mpeg2Source("Sample01.demuxed.d2v", CPU=6, Info=3)
TFM(d2v="Sample01.demuxed.d2v")
TDecimate()
VInverse()


VInverse() gets rid of most of the residual combing from the TFM().TDecimate() sequence. Or you could try:


Code:
Mpeg2Source("Sample01.demuxed.d2v", CPU=6, Info=3)
QTGMC(preset="fast")
SelectEven()
TDecimate()

lansing
6th January 2013, 19:26
you don't need to encode an intermediate file when using avisynth, you can preview the script with avspmod without encoding it. You encode after you're done modifying and achieved what you want.

for vob file, it will be good to create an index file "d2v" before loading it into avspmod. First open the vob with dgindex, then save the project. That will create a d2v file. Drag and drop that file into avspmod and then add the ivtc line.

And you don't have to use mediacoder to encode x264. There're a lot of options out there.
http://forum.doom9.org/forumdisplay.php?f=78

teknomedic
7th January 2013, 01:18
... continued some of the discussion here...
http://forum.videohelp.com/threads/352233-Help-with-Simpsons-Animation?p=2211080#post2211080

Basically... back to using MediaCoder again. It's been fun running encoding trials. Whish I had a faster PC, lol.

teknomedic
7th January 2013, 03:14
another sample uploaded for those that want to toy with this...
http://www.mediafire.com/?o9cbw77h2a3yfdj

Will need to read the other discussion to know why this sample was uploaded.

x265
9th January 2013, 17:39
Will need to read the other discussion to know why this sample was uploaded.

Its because others can help you out by analyzing your sample!!.

7ekno
12th January 2013, 10:09
It seems AviSynth can't encode the VOB directly (I get error 13 in MediaCoder)...
Thoughts???

Rubbish, Avisynth can be used to dump to any container via any encoder ...

Just because MediaCoder fails, doesn't mean any other DECENT encoder GUI will ... There's a reason MediaCoder isn't recommended or used around these parts, maybe one day you will accept that reason ;)

7ek

lansing
12th January 2013, 11:31
So, by the end of this thread we learned how to use mediacoder, and in order to encode a vob file with avisynth, we need to first encode the file to a lossy mpeg format, and then reencode it again to mp4...