Log in

View Full Version : Is it possible to source from a HTTP direct URL?


konstantin1
17th January 2016, 18:37
I mean something like:
ffvideosource("http://www.example.com/video.mp4")

Little disk space on my VPS, and sometimes would be useful to source the video over http. FFmpeg can easily decode remote files over http, I wonder why source plugins, like ffms2 (ffvideosource) don't handle videos over http URLs.

I also tried mounting http URLs to the local file system, but packages for doing this proved to be buggy ("httpfs2" package : constantly slow reading speed, about 500K through a 10 M connection, "avfs" package: read speed suddenly decreases after reading exactly 100 MB of data from 9-10 M to 1-2 K.)

Myrsloik
17th January 2016, 20:17
I mean something like:
ffvideosource("http://www.example.com/video.mp4")

Little disk space on my VPS, and sometimes would be useful to source the video over http. FFmpeg can easily decode remote files over http, I wonder why source plugins, like ffms2 (ffvideosource) don't handle videos over http URLs.

I also tried mounting http URLs to the local file system, but packages for doing this proved to be buggy ("httpfs2" package : constantly slow reading speed, about 500K through a 10 M connection, "avfs" package: read speed suddenly decreases after reading exactly 100 MB of data from 9-10 M to 1-2 K.)

The problem with ffms2 is that the whole file has to be indexed first anyway. So in the end it's probably always faster to download it and then do things. I guess it could be ok if you had an existing index but that's a really unusual use case.

TheFluff
17th January 2016, 20:45
I mean something like:
ffvideosource("http://www.example.com/video.mp4")

Little disk space on my VPS, and sometimes would be useful to source the video over http. FFmpeg can easily decode remote files over http, I wonder why source plugins, like ffms2 (ffvideosource) don't handle videos over http URLs.

Daemon404 claims ffms2 should support this now (idk if the, but as Myrsloik said it'll have to download the file twice (unless you can run ffindex on the server and then download the index file first).

e: actually, have you tried it? I think it should work.

Myrsloik
17th January 2016, 20:58
Apparently network support is disabled in the current ffms2 builds but it will be enabled in the next release. And then it will be able to open files over http just like you want it to.