Log in

View Full Version : AVS DirectShowSource problem...


whatever-ever
9th November 2007, 21:39
Here's my AVS:

DirectShowSource(".mpg")
Lanczos4Resize(640,352,2,2,-2,-2)

Playback is fine, but it appears as twice as long when played in media player (or any other player for that matter). What happens after the first half has passed (with nice playback, w/ audio and video and everything)? Nothing. Just freezes the last frame for the rest of the clip.

"Why don't you use DGIndex?" Because it's not a MPEG2 file. "But it says .MPG in your AVS!" yes, but it's not a MPEG2 file!

I tried using the convertfps=true parametre and fps=50, no change. If I play back the video in a player by itself it says 1 min playtime, so does the audio. if played with the above mentioned AVS its 2 mins.

Any help is appreciated, thanks!

PS: I also tried dubbing it in AVS like so:
video=DirectShowSource("...")
audio=DirectShowSource("...")
audiodub(video,audio) no change.

DarkT
9th November 2007, 21:48
Mmhmhmh, I think somewhere it says DSS isn't always accurate with the FPS it sets... You might want to try setting the FPS manually - 's in the readme somewhere...

whatever-ever
9th November 2007, 21:54
I tried setting Fps=12.5, Fps=25, Fps=50 (source is 25fps), but doesn't seem to change the outcome :(

IanB
9th November 2007, 22:07
DSS can only work with the values your DirectShow splitter reports, many outright lie or report nothing at all!

There is a FrameCount=N option for just these recalcitrant cases.

Changing the FPS will not help because DirectShow reports stream duration and we calculate number of frames from this duration and the FPS.

whatever-ever
9th November 2007, 22:56
Could you please give an example of how it would look? I've tried openen an AVS with nothing but a DirecShowSource("..") line in it, to determine when it starts getting "black screen" and then setting FrameCount to that number, and yes, it make the clip match how many frames there are, BUT it's still way longer (and appr. 4 min clip showed as ~20mins in media player - avs playback)

IanB
9th November 2007, 23:01
DirectShowSource(".mpg", FPS=25, FrameCount=6000)
...

DigitalDeviant
9th November 2007, 23:15
"Why don't you use DGIndex?" Because it's not a MPEG2 file. "But it says .MPG in your AVS!" yes, but it's not a MPEG2 file!

Maybe I'm misunderstanding you here but I'm pretty sure DGIndex supports mpeg1. Perhaps we could have a sample to help us help you better?

whatever-ever
9th November 2007, 23:37
Yes of course :) Where can I put a sample?

And it's not MPEG1 either, it's AVC (and yes I know of xmuxer and DGAVCIndex).

whatever-ever
9th November 2007, 23:53
Sample here (http://rapidshare.com/files/68619890/partial.mpg.html). When you reply I'll take that as a "yes, I've downloaded it, you can delete it now" :)

Thanks for helping me out, guys.

DigitalDeviant
10th November 2007, 00:37
Ok, I can't get the video to play in MPC or VLC. How did you create this file?

whatever-ever
10th November 2007, 00:45
I just recorded it with ProgDVB as .MPG instead of .TS.
You should be able to see it when you open it in xmuxer/ whatever method of demux you prefer. Or by making an AVS file with directshowsource(). It should end with a duration of 23 seconds - which is my question: How do I get the AVS file fixed so it plays back correctly.

Guest
10th November 2007, 02:09
Demux the audio and video. Then open the video in DGAVCIndex. Make a project and an avs script with avcsource(). You will get 23 seconds of video. You can dub the audio back in in the script or later. The advantage of DGAVCDec is that you get accurate seeking.

AVC video in an MPEG2 program stream is very uncommon. I've never seen it before. Typically, mp4 is used. I'm not surprised that DSS and DS-based players have trouble with it.

http://forum.inmatrix.com/lofiversion/index.php?t5038.html

For better compatibility, capture to a transport stream.

whatever-ever
12th November 2007, 01:09
Thanks. I was hoping to avoid DGAVCDec though as it sometimes adds some wierd blurry lines to the video. And about the MPEG2 thing... It's the program I used for recording, it only records in MPEG2 ;) doesn't hurt though... DGAVC still recognized the stream, but yeah, of course it's not the proper container. I did it to avoid the demux process.