Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 21st November 2006, 06:26   #21  |  Link
Pookie
Registered User
 
Join Date: Apr 2005
Posts: 1,339
IanB - Check your PM.
Pookie is offline   Reply With Quote
Old 22nd November 2006, 01:38   #22  |  Link
Fulcanelli123
Registered User
 
Join Date: Oct 2006
Posts: 20
Quote:
Originally Posted by Pookie View Post
Mencoder seems to work well with straight .TS h264 file input.
Nope this is no good. Winmenc didn't actually do anything except give me the syntax for mencoder, which I pasted into the CLI. The resultant avi file tries to load into VDub but attempts to reconstruct the index. Then it tells me it failed to find a suitable fourcc decompressor. Trying to load it via avisynth said the same thing.

WMP player won't play it and MediaPlayer Classic said it couldn't render some of the pins in the graph:

Stream 0
AVI Splitter

Media Type 0:
--------------------------
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Video {73646976-0000-0010-8000-00AA00389B71}
subtype: Unknown GUID Name {10000005-0000-0010-8000-00AA00389B71}
formattype: TIME_FORMAT_NONE {00000000-0000-0000-0000-000000000000}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 0

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

I've got plenty of fourcc codecs installed but this new avi file doesn't appear to like any of them.

So looks like mencoder won't be solving my problem.
Fulcanelli123 is offline   Reply With Quote
Old 22nd November 2006, 03:24   #23  |  Link
Pookie
Registered User
 
Join Date: Apr 2005
Posts: 1,339
To Make a 1 Pass Xvid Transcode: (Change the last portion from "input.ts" to the actual name of your TS file)

Code:
mencoder.exe  -vf-clr -pp 0  -tsprog 0  -vf scale=640:352,harddup -sws 9 -force-avi-aspect 1.818 -ovc xvid -xvidencopts vhq=1:fixed_quant=3:nopacked:trellis:nogmc:noqpel:nocartoon:bvhq=0:max_bframes=2 -oac mp3lame -lameopts preset=320 -o "output.xvid.avi" "input.ts"
To Make a 1 Pass h264 Transcode: (Change the last portion from "input.ts" to the actual name of your TS file)

Code:
mencoder.exe  -vf-clr -pp 0  -tsprog 0  -vf scale=640:352,harddup -sws 9 -force-avi-aspect 1.818 -ovc x264 -x264encopts bitrate=1900:cabac:qp_constant=12:8x8dct:i8x8:bframes=2:cqm=flat:subq=5 -oac mp3lame -lameopts preset=320 -o "output.264.avi" "input.ts"

Last edited by Pookie; 22nd November 2006 at 05:10.
Pookie is offline   Reply With Quote
Old 22nd November 2006, 20:43   #24  |  Link
Fulcanelli123
Registered User
 
Join Date: Oct 2006
Posts: 20
Nope, either of those options seem to re-encode them. I'll then have to re-encode to svcd (I send to US friends). If I have to encode to xvid>svcd I'm losing a generation and it's not worth the effort.

I went for a straight copy to output in an avi container which I'd heard mencoder could do. (Couldn't save out as an avi in VDub because the only way to get the ts in there was via avisynth and it's messing with the frames.)

Also tried avc>avi with the same results as mencoder. An avi with a missing index, and according to GraphEdit avisplitter can't find the first pin in this new avi. This has got me beat.

The weird thing is Procoder will take the file directly and encode in sync (though I've only tried a 10 minute segment so maybe it'll fall over later). However, without going through Avisynth first, it just doesn't look that good. (I get a better copy with the SD and AviSynth.) It'll also take about 15hrs as opposed to 5hrs using Avisynth (and 1hr 50m for SD version).

I really hate AVC files.

I'm really fed up - I got a new card specifically so I could capture from BBC HD. Never ocurred to me I wouldn't be able to use AviSynth or Vdub to encode to SVCD.

Thanks for your help.
Fulcanelli123 is offline   Reply With Quote
Old 26th November 2006, 15:08   #25  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,335
@IanB,

A related, but (i think) a bit different problem (I used latest CVS DSS):

About the Alexander trailer from this post: http://forum.doom9.org/showthread.ph...273#post890273

It's a VFR WMV with a duration of 1:53. Accordingly to the timescodes file wmvtimes.exe produces it has 2359 frames. So the average fps is about 2359/113 = 20.88 fps.

Encoding the following script to XviD:
Code:
DirectShowSource("F:\HDTV\WMV\Alexander_Trailer_1080p.wmv", fps=23.976, seek=false, logfile="F:\HDTV\WMV\log2.txt", logmask=-1)
Crop(0, 132, 0, -132)
LanczosResize(848, 352)
results in a clip with duration 1:53 with grey frames at the end. Apperently DSS tries to fetch frames, while there are none left (because the average fps is lower than 23.976), and thus grey ones are returned. Apperently the "trying to fetch" is done till the duration of 1:53 is reached (???). But it should have resulted in a clip with a shorter duration. (Ok, i can also use the framecount option to avoid this ...)

When I read the log file correctly (see attachment), AviSynth gets 2372 non-grey frames, but the WMV clip only has 2359 frames. However the resulting XviD has precisely 2359 non-grey frames, so i guess i misunderstood the log file
Attached Files
File Type: zip log2.zip (167.7 KB, 83 views)
Wilbert is offline   Reply With Quote
Old 27th November 2006, 01:47   #26  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,173
Grr! WideScreen posts!

From WMVTimes the last frame, 2358, starts at 113279ms. The time pattern 0, 41, 83, 125 -> 41, 42, 42 indicates approx 24fps source material. Latter the time pattern 917, 959, 1001, 1042 -> 42, 42, 42 is most typical of 23.967fps material.

The directshow duration was 1134910000*100ns, and the frame count was not available.

You specified FPS = 23.976 and no ConvertFPS=True option.

I would expect vi.num_frames = 1,134,910,000 * 23.976 / 10,000,000 = 2721 frames and 2359 of them to have valid content.

From the log, frames 0 to 2358 received valid content and frames 2359 to 2720 had blank frames returned because of end_of_stream.
IanB is offline   Reply With Quote
Old 27th November 2006, 11:58   #27  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,173
See this post http://forum.doom9.org/showthread.php?t=118715 for a new DSS.dll
IanB is offline   Reply With Quote
Old 27th November 2006, 16:09   #28  |  Link
Booker
Registered User
 
Join Date: Sep 2006
Posts: 7
Hi there,

I've just tried using the new DSS.dll and all is well except there's ONE grey frame just before the last few frames. The beginning has no grey frames though.
Booker is offline   Reply With Quote
Old 27th November 2006, 22:46   #29  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,335
Quote:
The directshow duration was 1134910000*100ns, and the frame count was not available.
Ok, so i guess i should have used the framecount option in this case?

Quote:
You specified FPS = 23.976 and no ConvertFPS=True option.

I would expect vi.num_frames = 1,134,910,000 * 23.976 / 10,000,000 = 2721 frames and 2359 of them to have valid content.

From the log, frames 0 to 2358 received valid content and frames 2359 to 2720 had blank frames returned because of end_of_stream.
The problem is worse with this new DSS. Instead of grey frames till the end (which i wanted to avoid), it inserts black frames throughout the clip to get a 2721 frames clip. (Perhaps in the same places as you would get duplicates when using convertfps=true, but i didn't check that.)

For completeness i added the log file again.

@Booker,
Quote:
I've just tried using the new DSS.dll and all is well except there's ONE grey frame just before the last few frames.
Post your log file.
Attached Files
File Type: zip log3.zip (168.7 KB, 82 views)
Wilbert is offline   Reply With Quote
Old 28th November 2006, 05:07   #30  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,173
@Wilbert,

I see nothing wrong in your latest log

Frames 0 to 2358 received valid content and frames 2359 to 2720 received a copy of frame 2358 because of end_of_stream.

Please try waiting 30 seconds between opening the script and starting to render it. The ASF splitter enforces a rate limit of real time on playing of streams, M$ may have added some nastyness to more strongly enforce this.


One problem I can see in your log is that the ASF splitter you are using is not returning the correct sample end time. This will cause the ConvertFPS function to advance to the next frame prematurely. I already have code to checks for bastard splitters that return end=start+1, looks like I am going to need to add code to check for end=start+10000 (1ms) as well Longer term it is obvious I am going to have to abandon use of the sample end time value F#@%ing M$.

Strictly interpreting the DirectShow spec this stream should be display as 10ms of frame followed by 31 or 32 ms of black in the gaps.


@Booker,

when you post your log also tell the exact frame number of the grey frame.

@Pookie.

Please try the new .dll
IanB is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:51.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.