Skip to content
This repository has been archived by the owner on May 12, 2024. It is now read-only.

FFmpegSource2 is the only video provider #29

Open
DonCanjas opened this issue Jul 27, 2021 · 5 comments
Open

FFmpegSource2 is the only video provider #29

DonCanjas opened this issue Jul 27, 2021 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@DonCanjas
Copy link

I noticed that there is DirectShowSource and other video providers, but in the options menu it doesn't show any other than FFmpegSource. Is it possible to add L-SMASH support?

@Ristellise Ristellise added enhancement New feature or request help wanted Extra attention is needed labels Aug 19, 2021
@Ristellise
Copy link
Owner

I noticed that there is DirectShowSource and other video providers, but in the options menu it doesn't show any other than FFmpegSource. Is it possible to add L-SMASH support?

Hi, is there any specific reason for L-SMASH Source?

@DonCanjas
Copy link
Author

It is much faster to import to import MP4 files since it doesn't need to create an index file.

Uses libavcodec as a video decoder and L-SMASH as a demuxer. Recommended for MP4, MOV, ISO Base Media and its derived file formats.
One advantage over LWLibavVideoSource and FFmpegSource is that it doesn't need to create an index file for its supported formats.

Quote from: http://avisynth.nl/index.php/LSMASHSource#Filters

@LightArrowsEXE
Copy link

LightArrowsEXE commented Oct 25, 2021

After running some tests in VapourSynth, @Ichunjo and I arrived at the following results:

# LibavSMASHSource
# Script evaluation done in 0.53 seconds
# Output 2232 frames in 5.16 seconds (432.64 fps)


# LWLibavSource
# Script evaluation done in 0.52 seconds
# Output 2232 frames in 5.08 seconds (439.30 fps)


# ffms2
# Script evaluation done in 0.57 seconds
# Output 2232 frames in 6.30 seconds (354.39 fps)

This was run over a single .mp4 (with the index files pre-generated), and lsmas/libav appears to significantly outperform ffms2 in speed (and likely accuracy too).

The difference between lsmas and libav in speed post-indexing seems negligible, but lsmas not needing to index might be a benefit to further speeds, while libav can handle more formats and is likely a bit "safer" overall.

EDIT:
Upon further testing, it seems ffms2 is significantly faster when dealing with lower-bitrate files, relative to the 55Mb/s average bitrate file I was testing it on lol. New speeds tested were 569.03 fps for ffms2 vs. 507.33 fps with Libav. What we can determine from this is what libav is more consistent with its speed (obviously becoming slower the more data there is), but ffms2 has much higher peaks and drops.

@Ristellise
Copy link
Owner

Ristellise commented Oct 27, 2021

Will consider if someone implements it. I myself don't have much motivation for it.

@oZanderr
Copy link

Just wanted to add more to this topic, but another reason why I believe that another video provider should be implemented is that sometimes ffms2 incorrectly indexes files and isn't frame-accurate (several frames off in random locations compared to mpv and vspreview with lsmas as source filter). I have noticed this several times when working with remuxes and random BD encodes. I have talked to others who have encountered the same problem and they simply said to just re-encode the videos, which isn't exactly ideal. L-SMASH Source would be a good option to add and I believe would fix this issue. DGSource is also another great source filter and is fast, however, it only works with Nvidia gpus.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants