VideoHelp Forum
+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    I have an old script which I ran using Avisynth 2.58 to deinterlace (and reduce to 29.97) an MP4 file that is 59.94 interlaced. I used FFindex, and everything worked fine, including previewing the script in AvsP.
    Had to get a newer computer, and downloaded the Avisynth Universal Installer to see if I could use newer versions. I was getting alot of errors in AvsP, and could only bump up to 2.6 with the least problems, until I used the old script for above video. The AvsP video preview for the mp4 59.94 played too slow. I loaded the video with Directshowsource and the video played too fast. I switched to Avisynth 2.58 to process the video, but I'd like to understand how to resolve this in 2.6 or higher. I can set the framerate in FFvideosource and Directshowsource to 29.97, but that wasn't necessary in 2.58.
    Quote Quote  
  2. Were you using a multithreaded version of AviSynth before? Are you using one now? Does your script enable multithreading? I'd recommend using AviSynth Plus these days.
    Quote Quote  
  3. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    No multithreading then or now. When I switched to A+ and ran AvsP, an error window popped up with a long list of errors, and I hadn't even loaded a script.
    Quote Quote  
  4. Originally Posted by spiritgumm View Post
    No multithreading then or now. When I switched to A+ and ran AvsP, an error window popped up with a long list of errors, and I hadn't even loaded a script.
    Hard to say what that is without seeing your scripts and the error messages. But generally, older AviSynth plugins work with AviSynth Plus as long as you have the correct bitness and the plugins in the right folders.
    Quote Quote  
  5. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Any notion about the speed issues with the interlaced 59.94 mp4 with Avisynth 2.6? I added fps=29.97 to the Directshowsource command and resulting mkv encode was 29.97 fps, but still played too fast.
    Quote Quote  
  6. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Post the whole script and a mediainfo report (text view) of the source
    Quote Quote  
  7. Originally Posted by spiritgumm View Post
    Any notion about the speed issues with the interlaced 59.94 mp4 with Avisynth 2.6? I added fps=29.97 to the Directshowsource command and resulting mkv encode was 29.97 fps, but still played too fast.
    DirectShowSource should be used only as a last resort. ffmpeg source and lsmash are much preferred. But since you're using it, try just opening your source with DirectShowSource and just playing it (nothing else in the script). Does it play at the right speed?

    Also try using DirectShowSource's convertfps=true option. That will convert a variable frame rate source to constant frame rate.
    Last edited by jagabo; 19th May 2024 at 06:36.
    Quote Quote  
  8. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Directshowsource played too fast in both Avisynth versions 2.58 and 2.6, but adding "convertfps=true" fixed that. Thanks!
    Btw, if I re-encoded the video (from mp4 to mkv) when it was playing too fast, the new video also played fast (using MPC-HC for playback). What controls the speed of playback? Is there a simple flag one could change?
    So the outstanding issue is video playing too slow using FFINDEX in 2.6. And not getting higher versions of Avisynth to run.
    Quote Quote  
  9. So your source is variable frame rate (VFR). convertfps=true converts it to constant frame rate. Your other option would be to extract the time codes from the source and apply them to your earlier VFR encodings.
    Quote Quote  
  10. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Not sure what your addressing since I asked several questions. I added a "timecodes" line to my FFindex video, got a text of numbers, not sure what I'd do with that. I was hoping for some equivalent fix when loading the video with FFindex (which works in 2.58 but not 2.6).
    Quote Quote  
  11. With VFR video different frames are displayed for different amounts of time, ie, at different frame rates. The frame rate flagged at the container level (and reported by MediaInfo or other programs) is sometimes the max frame rate, sometimes the average frame rate, or sometimes just random. In the end, it's the timecodes (one time code for each frame) that tell the player exactly how long each frame is to be displayed, and hence how long the full video is.

    By default, DirectShowSource() returns one frame for each frame in the source video, not compensating for the timecodes. For example, the container may indicate a video is 30 fps. But the timecodes may show some frames displaying for 1/30 second and others for 2/30 second. If you assume every frame is displayed for 1/30 second the total playback will be too fast. If you assume the frame rate is 1/15 second the video will play too slow. So you need to mux the timecodes along with your final video to get the correct playback speed.

    If you use convertfps=true and fps=30, DirectShow source will return two copies of each of those 2/30 frames so to maintain the correct playback speed. You won't need the timecodes in your final video.
    Quote Quote  
  12. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by spiritgumm View Post
    Directshowsource played too fast in both Avisynth versions 2.58 and 2.6, but adding "convertfps=true" fixed that. Thanks!
    Btw, if I re-encoded the video (from mp4 to mkv) when it was playing too fast, the new video also played fast (using MPC-HC for playback). What controls the speed of playback? Is there a simple flag one could change?
    So the outstanding issue is video playing too slow using FFINDEX in 2.6. And not getting higher versions of Avisynth to run.
    If your video is VFR, you should only use LWibavVideoSource or LSMASHVideoSource to open it.

    Code:
    AudioDub(LWLibavVideoSource("source.mp4",fpsnum=60000,fpsden=1001), LWLibavAudioSource("source.mp4"))
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!