Log in

View Full Version : Stream goes blank gray/grey


AviSynther
7th June 2004, 22:48
I've written a very simple script (2.5) that does temporalsmoothing, resizing, and an overlay. It usually works wonderfully when previewed with mplayer2.exe. However, the video stream occasionally goes to a blank gray while the audio continues to play and the position indicator advances. This also happens with the more recent versions of MediaPlayer. Unfortunately, blanking to gray is much more frequent while previewing in TMPGenc and nearly universal while encoding with TMPGenc. Blanking also happens while previewing and compressing in VirtualDub. The audio output of VirtualDub also has an irritating buzz-saw effect similar to sound being chopped by a slowly rotating fan.

Here's another problem. To easily preview my script while editing, I put the script file on the command line of a shortcut to mplayer2. When I open the same file from the mplayer2 menu, however, the video is subtly more noisy. Why does opening a file via the command line have a different result than opening it from the menu? Unfortunately, opening the script in TMPGenc results in the more noisy result.

Thank you.

Phil

Guest
7th June 2004, 23:18
:script:

AviSynther
8th June 2004, 17:01
The goal of my script (see below) was to maximize compression of a language training video while preserving the temporal and spacial resolution of the speaker's facial features - typically in the center of the frame (I couldn't find any face-recognition plug-ins for dynamic mask generation). The result is as I hoped when opened on the command line of mplayer2 but more noisy when opened from the menu. Unfortunately, the video stream goes to gray at seemingly random points during compression with TMPGenc. Once the video goes gray, it stays gray.

The source material was captured with an ATI Radeon using ATI's Personal Video Recorder software. The source format is MPEG2 (not ATI's VCR format). The overlay mask has a transition zone of about 16 pixels from white to black.

Here's the script:

# LOAD MPEG VIDEO AND SELECT FIRST FIELD

clip=SelectEven(SeparateFields(DirectShowSource("e:\video\channel20.mpg")))

# AVERAGE TEMPORAL NOISE, CROP, and RESIZE to 320x240

BASE = BilinearResize(TemporalSoften(clip,2,4,8,15,2),320,240,14, 0, 702, 240)

# REMOVE AUDIO, AVERAGE FRAMES TOGETHER, DISCARD EVERY OTHER FRAME

BASE0 = ChangeFPS(SelectEven(VerticalReduceBy2(DoubleWeave(KillAudio(BASE)))), 29.97)

# OVERLAY AVERAGED FRAMES ON BORDER OF BASE

omask = ImageSource("Mask240x184OffsetSoft.png")

Overlay(trim(BASE, 1, 0), BASE0, 0, 0, omask)

Guest
8th June 2004, 17:57
Uh-oh, DirectShowSource(). All bets are off. Try DGMPEGDec.