anthwlock / untrunc

Restore a truncated mp4/mov. Improved version of ponchio/untrunc
GNU General Public License v2.0
1.9k stars 182 forks source link

Some clarifications about relation to ffmpeg inREADME would be appreciated #64

Closed dzek69 closed 3 years ago

dzek69 commented 3 years ago

Hey,

In README we can read:

Building In certain cases a specific version of ffmpeg is needed. Untrunc works great with ffmpeg 3.3.9. (...) Docker container The optional argument 'FF_VER' will be passed to make.

After reading README (and before actually testing the software) I still have some questions unanswered which I believe should be explained:

1) FF_VER param a) What's the difference between specifying or leaving it blank? b) Is this value used on build time only or within binary that will be build or both?

Extra question, not really needed in README: What if I lie and provide numbers that don't match installed version? Can't it be detected instead?

2) Because there is no "ffmpeg path" flag in the binary (or at least not menioned in README) I assume this software will just take ffmpeg available in PATH. But I need version 4.x in PATH because of a lot of other software installed. While it should work with it untrunc README tells me that best version for it is 3.3.9. Can i specify ffmpeg path somewhere while running untrunc? If the answer is "no" then I think it would be nice to put that info in README.

(And if this is not possible - are you willing maybe to implement it in the future?)

Thanks, Jacek

anthwlock commented 3 years ago

The default value of the FF_VER parameter is shared, meaning ffmpeg gets linked dynamically (aka at runtime).

When you use e.g. FF_VER=3.3.9, ffmpeg is linked statically (aka at compile time). In that case, ffmpeg is included in the untrunc executable. It doesn't matter what your system has, since that version gets freshly compiled (look at the Makefile).

The PATH environment-variable is used for is for finding executables, untrunc doesn't use the ffmpeg executable. On Linux, you can use LD_PRELOAD_PATH to specify which shared-libs get loaded first, see man ld.so for more.

dzek69 commented 3 years ago

Thank you