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. |
![]() |
#1 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,530
|
FFmpegSource
TRIGGER WARNING
The posts contained in this thread may be very upsetting for users of old operating systems, old cpus and stupid people ------------------------------------------------------- This thread shall begin much like one of my previous ones... One day I got bored (again) and thought it would nice to have a plugin to open mkvs and similar things. That attempt failed miserably because it turns out that ffmpeg has just as much documentation as the average open source project. But as you all know you can't let computers win. Ever. This plugin should support decoding of all FFmpeg supported video formats with frame accurate seeking in avi, mkv and mp4 and possibly some others. Haali's parser is used for matroska since the ffmpeg one has serious issues and FFmpeg for everything else. Opening files is however a bit slow due to the required indexing. Github project Latest binaries Note: The real name is "Fabulous FM Source 2" and is in no way related to FFmpeg. How to use as an image source in VapourSynth: Code:
import vapoursynth as vs first_image = 4 num_images = 160 filename_pattern = 'D:/imgseq/output_{0:05d}.jpg' c = vs.get_core() placeholder_clip = c.std.BlankClip(clip=c.ffms2.Source(filename_pattern.format(first_image), cache=False), length=num_images) def image_loader(n): return c.ffms2.Source(filename_pattern.format(n + first_image), cache=False)[0] clip = c.std.FrameEval(placeholder_clip, image_loader) clip.set_output()
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet Last edited by Myrsloik; 7th January 2017 at 22:17. Reason: Update links |
![]() |
![]() |
![]() |
#3 | Link |
ангел смерти
![]() Join Date: Nov 2004
Location: Lost
Posts: 9,555
|
Very awesome. I might be able to skip DirectShowSource entirely now.
Seeking is broken on MPEG1 PS files, and when muxed into another container they just don't work at all. Well, I can continue using DGDecode on those. All other formats appear to work perfectly. One concern I have is the naming of the support files. Obviously they can't be statically linked, being different compilers, but other software uses the same libs, but incompatible. (Mediacoder for one, probably others.) Would it be possible to add a prefix/suffix to them? Even better, use loadlibrary to load them from the plugin's folder (which is rarely the same as current working folder in avisynth)? The listed improvements would be awesome, particularly timecodes. =D |
![]() |
![]() |
![]() |
#5 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,530
|
Actually I'm considering making it a c interface plugin because then I could statically link everything with gcc.
With vfr it just returns every encoded frame and sets the fps to 30.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
![]() |
![]() |
![]() |
#8 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,530
|
That should be fixed in the updated version. It used the duration from another unrelated place before which for some reason also was 30 fps.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
![]() |
![]() |
![]() |
#9 | Link |
Swallowed in the Sea
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
|
Thanks for the new build.
btw, I've a request for the next releases : to be able to choose/select the video *or* audio tracks numbers. Something like that : Code:
FFmpegSource(string source, int vtrack = -1, int atrack = -1, bool forceseek = false, string timecodes) |
![]() |
![]() |
![]() |
#11 | Link |
Registered User
Join Date: Oct 2006
Posts: 68
|
Hi Myrsloik,
unfortunately I get a "Loadplugin: unable to load C:\Program files\AviSynth 2.5\plugins\FfmpegSource.dll" error....but apparently everything should be in order (plugins in the right place). Do you have an idea on what I'm doing wrong? |
![]() |
![]() |
![]() |
#12 | Link |
ангел смерти
![]() Join Date: Nov 2004
Location: Lost
Posts: 9,555
|
All of the support dlls have to be on the path, not in the same folder as the plugin. The simplest path is just putting them in the windows folder. (Or you can add the plugin folder to the windows path in the system control panel, but that might not be a great idea.)
|
![]() |
![]() |
![]() |
#15 | Link |
AviSynth plugger
Join Date: Nov 2003
Location: Russia
Posts: 2,183
|
I am a little confused by this comment:
Myrsloik do you complile this "support DLL" some special way or they are standard?
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick I usually do not provide a technical support in private messages. |
![]() |
![]() |
![]() |
#16 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,530
|
They're completely standard. The included dlls were compiled with:
Code:
./configure --enable-shared --disable-static --enable-memalign-hack --enable-swscaler --enable-gpl --disable-encoders --disable-muxers
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
![]() |
![]() |
![]() |
#17 | Link |
ангел смерти
![]() Join Date: Nov 2004
Location: Lost
Posts: 9,555
|
It's the configure options that are different. Mediacoder uses a totally different set, since it enables encoders and muxers.
Actually, now that I went hunting, I can't figure out what's dependant on that older avformat-51.dll. I guess it's not that important, in that case. >.> |
![]() |
![]() |
![]() |
#18 | Link |
Mushroomeur
Join Date: Jun 2003
Location: Mushrooms of Paris Town
Posts: 267
|
Kurosu tried to write an ffmpeg source for avs3. He had a lot of problems with the audio. I can't remember what was the difficulty, though.
One thing to note about ffmpeg: the dev team never does any release and the api can change one day or another. So the plugin can, one day, not work anymore. |
![]() |
![]() |
![]() |
#19 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,530
|
I've looked a bit at the audio part now and everything seems to be the difficult part (unless you just want to play it linearly from one not too accurately specified point, then it's trivial).
The part about ffmpeg developers possibly changing the api one day is an exceptionally weak point if you look at how much has actually changed over the years. The sample I started with (unfortunately the only decent one in existence) from http://www.inb.uni-luebeck.de/~boehm...ec_update.html which was written exactly 3 years ago can still be compiled by only changing 3 lines or so (and by adding a few explicit casts if you use a c++ compiler). The changes were only in the names of fields containing information about the streams and the replacements were easy to locate. There were no changes in the actual decoding logic and the library still contains all deprecated functions so older programs should work with the new version after a recompile. You might as well say that one day windows will change and avisynth won't work anymore... What official releases have to do with it will remain a mystery...
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
![]() |
![]() |
![]() |
#20 | Link |
Mushroomeur
Join Date: Jun 2003
Location: Mushrooms of Paris Town
Posts: 267
|
ask the gstreamer developpers about the different versions of ffmpeg. For a developper it's a pain. Example : 3 or 4 days ago : they changed the options of configure. It's not 3 years at all.
The interest of a release : When compiling a program, you can check a specific version of the release. Then you know what the api is and use the correct functions, struct, etc... You might also know with a release if the abi is broken from a version to another, or not, which is also very important. windows has already changed and some programs didn't work anymore. Even with different SP of XP some programs work or not. |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|