Log in

View Full Version : Encoding Issues


apk
28th July 2006, 18:34
Hello,

Firstly i love AutoGK, before i was using a backwards way to encode which involved TMPGenc, VDMod and some other programs.

Anyway so i capped Top Gear so i could watch it again as i had to go out half way through. I wanted to keep the size at about 700mb with VBR audio of 128kbps. I let it auto size but changed the audio.

After it was done i had a look and everything looked fine although the video could have been a bit more crispy (runnig 19" monitor @ 1600x1200) so that could have something to do with it. But the audio was out of sync, i know this issue has been brought up before but i wanted to explain fully, no one has really had the same issue with DVB-T cap's.

I checked the source file and it was fine, no problems at all.

If anyone has any ideas/suggestions that would be HUGELY appreciated :)

Thank you,

apk

Log file included

-----------------------------------------------------------------------------------------------

[28/07/2006 07:30:43] AutoGK 2.27
[28/07/2006 07:30:43] OS: WinXP (5.1.2600).2
[28/07/2006 07:30:43] Job started.
[28/07/2006 07:30:43] Input file: G:\_BBC TWO_20060716_200116.mpg
[28/07/2006 07:30:43] Output file: G:\_BBC TWO_20060716_200116.avi
[28/07/2006 07:30:43] Output codec: XviD
[28/07/2006 07:30:43] Audio 1: Audio Stream 0 MPEG
[28/07/2006 07:30:43] Subtitles: none
[28/07/2006 07:30:43] Format: .AVI
[28/07/2006 07:30:43] Target size: 700Mb
[28/07/2006 07:30:43] Custom audio settings: VBR MP3 with average bitrate: 128Kbps
[28/07/2006 07:30:43] Started encoding.
[28/07/2006 07:30:43] Demuxing and indexing.
[28/07/2006 07:31:59] Processing file: G:\_BBC TWO_20060716_200116.mpg
[28/07/2006 07:31:59] Source resolution: 720x576
[28/07/2006 07:31:59] Found PAL source.
[28/07/2006 07:31:59] Source aspect ratio: 16:9
[28/07/2006 07:31:59] Analyzing source.
[28/07/2006 07:34:10] Source has percentage of interlacing in motion areas: 27.06
[28/07/2006 07:34:10] Source is considered to be interlaced.
[28/07/2006 07:34:10] Output will contain 93459 frames
[28/07/2006 07:34:10] Encoding audio.
[28/07/2006 07:41:19] Audio1 size: 52,029,984 bytes (49.62 Mb)
[28/07/2006 07:41:19] Overhead: 3,738,368 bytes (3.57 Mb)
[28/07/2006 07:41:19] Video size: 678,234,848 bytes (646.82 Mb)
[28/07/2006 07:41:19] Running compressibility test.
[28/07/2006 07:41:19] Writing the following script to G:\agk_tmp\_BBC TWO_20060716_200116_comptest.avs
===========================================================
LoadPlugin("C:\PROGRA~1\AutoGK\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\autocrop.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\RemoveGrainSSE3.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\kerneldeint.dll")

movie = mpeg2source("G:\agk_tmp\_BBC TWO_20060716_200116.d2v")
cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=0,threshold=34,samplestartframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
fixed_aspect = 1.42222222222222
c_width = width(cropclip)
c_height = round(height(cropclip) / fixed_aspect)
input_par = float(c_width)/float(c_height)
out_width = 640
out_height = round(float(out_width) / input_par)
hmod = out_height - (floor(out_height / 16 ) * 16)
out_height = (hmod > 4) ? (out_height + (16 - hmod)) : (out_height - hmod)
new_aspect = (float(out_width) / float(out_height)) / fixed_aspect
KernelDeInt(movie,order=1,sharp=true)
autocrop(mode=0,wmultof=4,hmultof=4,samples=10,aspect=new_aspect,threshold=34,samplestartframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
LanczosResize(out_width,out_height)
RemoveGrain(mode=2)
SelectRangeEvery(300,15)
===========================================================
[28/07/2006 07:44:55] Duration was: 3 minutes 35 seconds
[28/07/2006 07:44:55] Speed was: 21.65 fps.
[28/07/2006 07:44:55] Compressibility percentage is: 51.56
[28/07/2006 07:44:55] Chosen resolution is: 608x352 ( AR: 1.73 )
[28/07/2006 07:44:55] Predicted comptest value is: 56.74%
[28/07/2006 07:44:55] Running first pass.
[28/07/2006 07:44:55] Writing the following script to G:\agk_tmp\_BBC TWO_20060716_200116_movie.avs
===========================================================
LoadPlugin("C:\PROGRA~1\AutoGK\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\autocrop.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\RemoveGrainSSE3.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\kerneldeint.dll")

movie = mpeg2source("G:\agk_tmp\_BBC TWO_20060716_200116.d2v")
cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=0,threshold=34,samplestartframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
fixed_aspect = 1.42222222222222
c_width = width(cropclip)
c_height = round(height(cropclip) / fixed_aspect)
input_par = float(c_width)/float(c_height)
out_width = 608
out_height = round(float(out_width) / input_par)
hmod = out_height - (floor(out_height / 16 ) * 16)
out_height = (hmod > 4) ? (out_height + (16 - hmod)) : (out_height - hmod)
new_aspect = (float(out_width) / float(out_height)) / fixed_aspect
KernelDeInt(movie,order=1,sharp=true)
autocrop(mode=0,wmultof=4,hmultof=4,samples=10,aspect=new_aspect,threshold=34,samplestartframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
LanczosResize(out_width,out_height)
RemoveGrain(mode=2)
===========================================================
[28/07/2006 08:20:07] Duration was: 35 minutes 12 seconds
[28/07/2006 08:20:07] Speed was: 44.24 fps.
[28/07/2006 08:20:07] Expected quality of first pass size: 60.48%
[28/07/2006 08:20:07] Running second pass.
[28/07/2006 09:13:10] Duration was: 53 minutes 2 seconds
[28/07/2006 09:13:10] Speed was: 29.37 fps.
[28/07/2006 09:13:10] Job finished. Total time: 1 hour, 42 minutes 26 seconds

------------------------------------------------------------------------------------------------------------

apk
28th July 2006, 19:14
also i dont think the issue is hardware - i dont use the pc while encoding and ive got 1GB ram and an AMD Athlon 3500+ 64, also i encode to a different HDD, one that windows is not installed on and combined have 800GB, with 500GB of free space.

BigDid
28th July 2006, 21:23
...Anyway so i capped Top Gear so i could watch it again as i had to go out half way through. I wanted to keep the size at about 700mb with VBR audio of 128kbps. I let it auto size but changed the audio.
Hi,

1/For audio/synchs problems use Setarip_old how-to resynch with VDM covered many, many times :search:
2/ or try mp3-128-CBR instead of VBR... It may work (or not)
3/ see other possible solutions in other post here: http://forum.doom9.org/showthread.php?p=856312#post856312

After it was done i had a look and everything looked fine although the video could have been a bit more crispy (runnig 19" monitor @ 1600x1200) ...
608 width is kind of minimum for details keeping specially if softer matrix is used -check sharp matrix in hidden options to be sure- and give more size: 800Mb or more (1/5 of DVD?)

Did

apk
28th July 2006, 23:50
cheers, will give those options a go and repost with results :)

apk
29th July 2006, 00:03
hey again,

tried it again, pic looks great now but still out of sync. Only by ms rather than seconds.....im not sure what to try now, the source is perfect and the encoded video is also perfect and so is the audio, just the sync issue.

Ive had a look for that first suggestion but had no luck finding a post with that information :(

BigDid
29th July 2006, 00:36
... Ive had a look for that first suggestion but had no luck finding a post with that information :(
Come on, it's like homework you don't like it but it has to be done. So I made your homework:
June10
http://forum.doom9.org/showthread.php?t=112230&highlight=audio+synch
April21
http://forum.doom9.org/showthread.php?t=110282&highlight=audio+synch+agk
April7
http://forum.doom9.org/showthread.php?t=109724
Feb26
http://forum.doom9.org/showthread.php?t=107889

All this threads being pre-historic, :devil: I made a copy/paste for generations to come :D

Load the file into VirtualDub, VirtualDubMod, or NanDub.
Set BOTH "Video"(VirtualDub, VirtualDubMod and NanDub) and "Audio"
(VirtualDub and NanDub - VirtualDubMOD>"Streams>"Stream list") to "Direct Stream Copy".

A) If the difference between audio and video is constant throughout the video:

From the "Audio" dropdown menu, select "Interleaving" (For VirtualDubMOD, rightclick on the listed audiostream and then select "Interleaving")
Under "Audio skew correction", set an appropriate number of milliseconds (positive or negative) in the box labelled "Delay audio track by"
Save with a new filename

B) If the difference increases as the movie plays:

From under the "Video" dropdown menu, select "Framerate" - and select "Change so video and audio durations match"
Save with a new filename

Let us know of your success ;>}
Today being one of my days of generosity, there is a freeware for getting the delay of audio synch (you'll need to enter the good value once done). It's called syncview, not really tested, try and test here: http://software.sdecnet.com/index.html?http://software.sdecnet.com/syncview.htm

Did

apk
29th July 2006, 11:10
Ok, i tried doing it again, now the sync is random.....at the beggining its fine, then about 10 mins it goes out of sync then after 5 mins it goes back into sync then out then in again for the rest, i have tried 0adjusting the framerate using a method in VDubMod and changed it to 25.005 which helped a bit.

Any more suggestions?

CWR03
29th July 2006, 12:34
It's not unusual for captured video to have drifting synch issues throughout after encoding, especially with AutoGK. The issue is hardware despite what you may have thought - very few capture devices synch the audio throughout the capture, but instead rely on the PC clock for timing, and it's never exact. Your options would be to recapture directly with VirtualDubMod, which as I understand will keep the audio in synch, or encode it with something other than AutoGK. I use an ancient program called Vidomi for the rare captures I encode from my PC-based DVR, and it actually works.

apk
29th July 2006, 15:17
i did some research when i got my tv card and there were good reviews (Hauppauge WinTV NOVA-T USB2). I have never had sync issues with capping music videos, although i did replace the sound with .mp3 afterwards but before i replaced it was fine. Im now trying with GK, not AGK - hopefuly will get better results :)

Ill report back and let you know :)

apk
30th July 2006, 01:32
ahh...no luck :( ive tried everything, i just cant get it to stay in sync when using and GK software.....

setarip_old
30th July 2006, 01:54
@apk

I'd suggest that when you are initially capturing, you use PCM (.WAV) audio - and convert/compress it later...

apk
30th July 2006, 02:00
Hello,

what do you mean? do you mean when i cap, before i encode demux then encode video and mux?

cheers,

apk

apk
30th July 2006, 23:10
ok, i capped again - these evenings Top Gear - just to see if the last one was badly capped, i get the same results - very high quality video and very high quality audio, just not in sync, i can get them in sync using TMPGenc and outputting to xvid but GK/AGK produces much better quality outputs.

Any more suggestions?

apk
31st July 2006, 00:33
i think i know the problem, when autogk encodes it decides to delay by 40ms or around that each time - is there anyway to stop it doing this?

setarip_old
31st July 2006, 01:13
You've not stated clearly - when you capped again - these evenings Top Gear - just to see if the last one was badly capped did you, as I suggested, capture the audio as Uncompressed PCM (.WAV), in order to maintain synch?

apk
31st July 2006, 18:50
please explain a little more if you can, i really want to understand

apk
31st July 2006, 18:51
or if you have msn and dont mind talking on that then please let me know

setarip_old
1st August 2006, 01:12
My suggestion is quite simple.

What software are you using to capture the video and audio?

Whatever program it is, I'm sure you can choose the audio FORMAT you want to use for capturing - and I'm suggesting you choose Uncompressed PCM (".WAV) audio as that format...

apk
1st August 2006, 08:11
I use WinTV for capturing. There is no option for audio, and only one option for video - its got a hardware decoder or whatever so it just captures the mpg2 stream.

Which program would you suggest to use instead, i open to any ideas :)

thanks for your help so far.

CWR03
1st August 2006, 11:59
Which program would you suggest to use instead, i open to any ideas
You must have completely skipped over my suggestion (http://forum.doom9.org/showthread.php?p=856794#post856794) above. It accurately fits your problem and contains a solution. There's also a VirtualDub VCR+Sync version, with a very good guide here (http://arstechnica.com/guides/tweaks/vidcap.ars).

apk
1st August 2006, 19:45
i had a go with your suggestion, didnt have much luck with it :(

setarip_old
1st August 2006, 20:05
Yes, via your WinTV card, you're limited to "MPEG Audio Modes: Full MPEG-1 layer 2 support"Which program would you suggest to use instead, i open to any ideasYou might want to try software capturing, via either VirtualDub or VirtualVCR (both are freeware)...

apk
2nd August 2006, 00:33
VirtualVCR doesnt see my card which is a shame - the wintv version i use doesnt have any options for audio at all, just video and there is only one option (DVD Quality 2048kbps), thats it - very limited options.

setarip_old
2nd August 2006, 01:14
doesnt have any options for audio at allPlease clarify - How are you capturing the audio?

apk
2nd August 2006, 07:52
well i press record and it just captures the stream, including audio as pcm.