I've mentioned this before in other threads, but Myrsloik over on the doom9 forums has created an input filter for AviSynth 2.5 based on FFmpeg, allowing frame accurate decoding/seeking of many different formats and containers, such as MKV, MP4, etc - pretty much anything ffmpeg (of which libavcodec is a part) can handle, although Haali's splitter is used for MKV.
The doom9 thread (includes a link to download the newest version):
http://forum.doom9.org/showthread.php?t=127037
It does this in much the same manner as DGIndex does with MPEG-1 or MPEG-2, by writing an index file. However, it doesn't require you to specifically load the index file, it just calls the index file when you run the script (the index is created the very first time the script is played, which slows down opening for just that first time). The one integral thing it lacks is the ability to convert framerate to maintain audio sync when dealing with variable framerates. The decoding of H.264 streams also still retains the dummy frames at the end of the file that sometimes appear, except that, unlike DirectShowSource, the ones now are black instead of gray, so it's probably not noticeable unless the video abruptly ends with anything except a fade to black. I'm not sure if this is also the case for other types of compression.
Basically, what this means is that DirectShowSource is no longer required for loading things not covered by AVISource or MPEG2Source, unless you want to maintain audio sync in VFR files. FFmpegSource does have an option to write timecodes, though, so that could feasibly be used to correct framerate in a more roundabout way. Maybe by way of a separate plugin that can read said timecodes and do the conversion if needed - I don't have any programming skills or else I'd try my hand at it.
The basic syntax is like this:
FFmpegSource("video.mkv", atrack=-1)
By default, the plugin only loads the video; atrack=-1 will have it load the audio as well. Audio is handled by decoding the stream to PCM (or FLAC, if you use that parameter) at the same time as the index is written, and stored in a separate .ffa1cache file. There are other parameters detailed in the plugin's documentation.
FFmpegSource - frame accurate, multiformat/container loading
This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
- Qyot27
- Surreptitious fluffy bunny
- Joined: Fri Aug 30, 2002 12:08 pm
- Status: Creepin' between the bullfrogs
- Location: St. Pete, FL
- Contact:
- Org Profile
Locked
1 post
• Page 1 of 1
Jump to
- Announcements
- ↳ Site Announcements
- ↳ Rules & FAQs
- Community
- ↳ 2025 Viewers' Choice Awards
- ↳ AMV Documentary Project
- ↳ General Discussion
- Anime Music Videos
- ↳ General AMV
- ↳ Recommended AMVs
- ↳ AMV Monthly - {Currently on hiatus}
- ↳ AMV Announcements & Feedback
- ↳ Awaiting Catalog Entry
- ↳ Other Videos
- ↳ Works in Progress
- ↳ AMV Contests
- ↳ Org Supported Contests
- ↳ Contest Archives
- ↳ Viewers' Choice Awards
- ↳ 2025 Viewers' Choice Awards
- ↳ 2024 Viewers' Choice Awards
- ↳ 2023 Viewers' Choice Awards
- ↳ 2022 Viewers' Choice Awards
- ↳ 2021 Viewers' Choice Awards
- ↳ 2020 Viewers' Choice Awards
- ↳ 2019 Viewers' Choice Awards
- ↳ 2018 AnimeMusicVideos.org Viewers' Choice Awards
- ↳ 2017 AnimeMusicVideos.org Viewers' Choice Awards
- ↳ 2016 AnimeMusicVideos.org Viewers' Choice Awards
- ↳ 2015 AnimeMusicVideos.org Viewers' Choice Awards
- ↳ 2014 AnimeMusicVideos.org Viewers' Choice Awards
- ↳ 2013 AnimeMusicVideos.Org Viewer's Choice Awards
- ↳ 2012 AnimeMusicVideos.org Viewers' Choice Awards
- ↳ 2011 AnimeMusicVideos.org Viewers' Choice Awards
- ↳ 2010 AnimeMusicVideos.org Viewers' Choice Awards
- ↳ 2009 AnimeMusicVideos.org Viewers' Choice Awards
- ↳ 2008 AnimeMusicVideo.org Viewer's Choice Awards
- ↳ VCA Shameless Promotion Archives
- ↳ VCA Shameless Promotions 2007
- ↳ VCA Shameless Promotions 2006
- ↳ VCA Shameless Promotions 2005
- ↳ VCA Shameless Promotions 2004
- ↳ VCA Shameless Promotions 2003
- ↳ Project Org Editor
- ↳ Project Org Editor 2024
- ↳ Project Org Editor 2022
- ↳ Project Org Editor 2020
- ↳ Project Org Editor 2016
- ↳ Project Org Editor 2015
- ↳ Project OrgEditor Season 3: The King of Spring
- ↳ Project Editor: Tag Team Trials
- ↳ Project OrgEditor Season 2
- ↳ Project OrgEditor Season 1
- ↳ AMV Roulette
- ↳ AMV Roulette 2016
- ↳ AMV Roulette 2015
- ↳ AMV Roulette 2014
- ↳ The Quickening
- ↳ The Quickening 2015
- ↳ The Quickening 2014
- ↳ The Quickening 2013
- ↳ The Quickening 2012
- ↳ Team Warfare
- ↳ The Online AMV Iron Chef Tournament v4.0
- ↳ Multi-Editor Projects
- Anime
- ↳ General Anime
- ↳ Anime Screencaps
- ↳ Anime Series Discussion
- ↳ Anime Conventions
- Editing & Technology
- ↳ Video & Audio Help
- ↳ Capturing / Ripping Help
- ↳ Conversion / Encoding Help
- ↳ AviSynth Help
- ↳ VapourSynth Help
- ↳ Video Editing Software
- ↳ Adobe Software
- ↳ Movie Studio & Vegas Pro
- ↳ Windows Movie Maker
- ↳ Mac Software
- ↳ Effects & Techniques
- ↳ Guides & Tutorials
- ↳ A&E's Technical Guides
- ↳ Hardware Discussion
- Web Site
- ↳ Site Help & Feedback
- ↳ Org Redesign
- ↳ Moderator Drop Box
- ↳ Heads Up!
- ↳ Video Software Help Archive
- ↳ How To Defeat the Fire Lord
- ↳ Penguin Sledding
- ↳ Avatar The Last Airbender
- ↳ Unobtainium Harvesting Help
- ↳ Website Archive
- ↳ General Off Topic
- ↳ It's all about me!