Issues with ffmpeg installation for use with OBS.

Discussion about this major DATV Project. See https://wiki.batc.org.uk/The_Portsdown_Transmitter
Post Reply
Nick
Posts: 121
Joined: Sat Oct 03, 2015 10:09 am

Issues with ffmpeg installation for use with OBS.

Post by Nick » Fri Nov 06, 2020 10:38 am

Hello,

I am having some problems with installing ffmpeg to use with OBS.

I followed to Wiki instructions and used the download link https://ffmpeg.org/ and on selecting the Windows builds was taken to a site https://www.gyan.dev/ffmpeg/builds/ with multiple choices. I picked the one that looked correct and on downloading it Kaspersky decided it contained a trojan in one of the files and deleted it. Other versions of the download also contained a trojan.

I looked on YouYube and noticed that the download site was different site from where I was taken. I tried that site but found it no longer exists.

Following information on the QO100 BATC net last night I tried the download link https://github.com/adaptlearning/adapt_ ... ing-FFmpeg provided by John G7JTT (thanks John). However, the download site zeranoe.com closed on 18th September and all builds have been removed.

I eventually found the following site which I thought was OK.

https://www.videohelp.com/software/ffmpeg

I downloaded ffmpeg 4.3.2 windows 64bit and installed it. To me it seems to have worked OK - at least I can get the version number from it after setting Path variable as per instructions found on YouTube.

Next I downloaded the ffmpeg-4.0.2-pthreads files from https://github.com/jaskie/Server/wiki/f ... -builds.7z. The instructions are to overwrite the existing files with these. However, none of the .dll files exist in the original download, so where do these go ?

The download that contained the trojan did have an extra folder that contained loads of .dll files, so at this point I am not even sure that the download I have contains all the required files.

Also of note is that the files ffmpeg.exe, ffplay.exe and ffprobe.exe in the bin folder of the main download are massively larger than the replacement files (65Mbyte as opposed to less than 1MByte).

So at this point I don't know if the download I have is complete. The issue with the missing .dll files and size of the .exe files is also confusing.

It would be most appreciated if anyone can offer some advice on how to proceed.

Regards,

Nick - G4NKV

G7JTT
Posts: 352
Joined: Fri Jun 10, 2016 5:05 pm

Re: Issues with ffmpeg installation for use with OBS.

Post by G7JTT » Fri Nov 06, 2020 11:19 am

Hi Nick I'm at work at the moment but when I get home this evening I'll hopefully be able to help. I noticed that site closed down but the way back machine has the files on there.

73 John G7JTT

g0mjw
Posts: 2568
Joined: Sat Sep 20, 2014 9:15 am

Re: Issues with ffmpeg installation for use with OBS.

Post by g0mjw » Fri Nov 06, 2020 11:41 am

This should be simple. I think the problem is the anti-virus software. Not sure I would buy anti-virus software from Russia but the presence of lots of DLLs and the word "installation" concerns me somewhat. There should only be 3 files. Looking in my installation from July the programmes, there are only 3 files, (ffmpeg does not need to be installed, you just run it) all about 67Mb. There is no way a standalone executable of ffmpeg is only 1Mbyte. I guess you are seeing the difference between statically and dynamically linked versions. I.e. library included within the executable or called as a DLL.

c:\ffmpeg\bin>ffmpeg -version
ffmpeg version git-2020-06-28-4cfcfb3 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9.3.1 (GCC) 20200621
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
libavutil 56. 55.100 / 56. 55.100
libavcodec 58. 93.100 / 58. 93.100
libavformat 58. 47.100 / 58. 47.100
libavdevice 58. 11.100 / 58. 11.100
libavfilter 7. 86.100 / 7. 86.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100


The links from ffmpeg.org https://ffmpeg.org/download.html to the windows executables point here https://www.gyan.dev/ffmpeg/builds/

You probably wanted the release version. However, the download site throws a security warning. I don't recall it doing that a while back so it might have been hacked. FFmpeg.org shows an alternative download from https://github.com/BtbN/FFmpeg-Builds/releases that site flags as safe, if you can ever consider github safe.

I just downloaded the 64 bit ffmpeg-N-99863-g70d8077b79-win64-gpl from github and after a scan windows defender seemed happy about it. The files are bigger but then this is a development version and probably contains lot's of new code.

Perhaps better to compile your own copy? https://trac.ffmpeg.org/wiki/CompilationGuide but this does require programming knowledge.

Mike

Nick
Posts: 121
Joined: Sat Oct 03, 2015 10:09 am

Re: Issues with ffmpeg installation for use with OBS.

Post by Nick » Fri Nov 06, 2020 12:09 pm

Thanks for both replies. I did say install, but it's not really an install - just copying the files to the c:ffmpeg folder.

This is what files are in my ffmpeg folder. There are no .dll files.

Volume in drive C has no label.
Volume Serial Number is 76C8-D9C1

Directory of C:\ffmpeg

05/11/2020 01:10 <DIR> .
05/11/2020 01:10 <DIR> ..
05/11/2020 01:10 <DIR> bin
05/11/2020 01:10 <DIR> doc
28/07/2020 21:51 35,823 LICENSE.txt
05/11/2020 01:10 <DIR> presets
28/07/2020 21:51 4,907 README.txt
2 File(s) 40,730 bytes

Directory of C:\ffmpeg\bin

05/11/2020 01:10 <DIR> .
05/11/2020 01:10 <DIR> ..
28/07/2020 21:51 66,956,800 ffmpeg.exe
28/07/2020 21:51 66,818,560 ffplay.exe
28/07/2020 21:51 66,853,376 ffprobe.exe
3 File(s) 200,628,736 bytes

Directory of C:\ffmpeg\doc

05/11/2020 01:10 <DIR> .
05/11/2020 01:10 <DIR> ..
28/07/2020 21:51 109,519 bootstrap.min.css
28/07/2020 21:51 2,494 default.css
28/07/2020 21:51 43,278 developer.html
28/07/2020 21:51 53,173 faq.html
28/07/2020 21:51 13,931 fate.html
28/07/2020 21:51 1,881,180 ffmpeg-all.html
28/07/2020 21:51 37,838 ffmpeg-bitstream-filters.html
28/07/2020 21:51 223,531 ffmpeg-codecs.html
28/07/2020 21:51 95,437 ffmpeg-devices.html
28/07/2020 21:51 1,082,548 ffmpeg-filters.html
28/07/2020 21:51 191,796 ffmpeg-formats.html
28/07/2020 21:51 83,719 ffmpeg-protocols.html
28/07/2020 21:51 13,536 ffmpeg-resampler.html
28/07/2020 21:51 7,940 ffmpeg-scaler.html
28/07/2020 21:51 44,593 ffmpeg-utils.html
28/07/2020 21:51 125,590 ffmpeg.html
28/07/2020 21:51 1,484,016 ffplay-all.html
28/07/2020 21:51 33,736 ffplay.html
28/07/2020 21:51 1,498,037 ffprobe-all.html
28/07/2020 21:51 46,804 ffprobe.html
28/07/2020 21:51 106,766 general.html
28/07/2020 21:51 20,763 git-howto.html
28/07/2020 21:51 2,831 libavcodec.html
28/07/2020 21:51 2,702 libavdevice.html
28/07/2020 21:51 2,732 libavfilter.html
28/07/2020 21:51 2,798 libavformat.html
28/07/2020 21:51 3,253 libavutil.html
28/07/2020 21:51 3,649 libswresample.html
28/07/2020 21:51 3,265 libswscale.html
28/07/2020 21:51 25,704 mailing-list-faq.html
28/07/2020 21:51 9,795 nut.html
28/07/2020 21:51 17,990 platform.html
28/07/2020 21:51 6,288 style.min.css
33 File(s) 7,281,232 bytes

Directory of C:\ffmpeg\presets

05/11/2020 01:10 <DIR> .
05/11/2020 01:10 <DIR> ..
28/07/2020 21:51 21,233 ffprobe.xsd
28/07/2020 21:51 227 libvpx-1080p.ffpreset
28/07/2020 21:51 227 libvpx-1080p50_60.ffpreset
28/07/2020 21:51 219 libvpx-360p.ffpreset
28/07/2020 21:51 227 libvpx-720p.ffpreset
28/07/2020 21:51 227 libvpx-720p50_60.ffpreset
6 File(s) 22,360 bytes

Total Files Listed:
44 File(s) 207,973,058 bytes
11 Dir(s) 144,406,974,464 bytes free


This is the output I get from using -version.

ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 10.2.1 (GCC) 20200726
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100


If these don't seem correct I will delete them and replace. Will have a look at the github version later tonight.


Regards,

Nick.

Mike - maybe the security warning was related to the warning I had that there is a trojan in the download. It was in one of the .dll files.

g0mjw
Posts: 2568
Joined: Sat Sep 20, 2014 9:15 am

Re: Issues with ffmpeg installation for use with OBS.

Post by g0mjw » Fri Nov 06, 2020 12:22 pm

Your version is slightly newer than mine and built with a newer version of gcc but the three executable files look about the right size. Does it work?

A nice simple command like:

c:\ffmpeg\bin\ffmpeg -f dshow -i video="OBS-Camera" -thread_queue_size 512 -f dshow -i audio="OBS-Audio" -vcodec h264_nvenc -s 768x432 -r 15 -bf 0 -pix_fmt yuv420p -b:v 300k -preset slow -profile:v main -rc cbr_hq -rc-lookahead 5 -acodec aac -aac_coder twoloop -ar 48000 -ac 1 -b:a 32k -f mpegts -muxrate 440k -streamid 0:256 -streamid 1:257 -max_delay 1500000 -metadata service_provider="G4NKV" -metadata service_name="Nick" -y "udp://192.168.2.1:8282?pkt_size=1316"

would send an BATC net compatible H264 stream to the Pluto - assuming that's the IP address and you are running OBS Camera plugin (the plug in, not the built in virtual camera, the one you have to download and put in the OBS directory).

Mike

G7JTT
Posts: 352
Joined: Fri Jun 10, 2016 5:05 pm

Re: Issues with ffmpeg installation for use with OBS.

Post by G7JTT » Fri Nov 06, 2020 3:07 pm

Hi Nick they seem correct that's the version I have just tried from the same link, you wont need to worry about Pthreads as w32threads are disabled. If you want to be able to use ffmpeg without putting the path in as well then you'll need to add ffmpeg to the path in windows.

On the Windows desktop, right-click My Computer.
In the pop-up menu, click Properties.
In the System Properties window, click the Advanced tab, and then click Environment Variables.
In the System Variables window, highlight Path, and click Edit.
In the Edit System Variables window, insert the cursor at the end of the Variable value field.
If the last character is not a semi-colon (;), add one.
After the final semi-colon, type the full path to the file you want to find.
For example: path C:\ffmpeg\bin

Click OK in each open window.

hope that helps ?


73 and stay safe John G7JTT

Nick
Posts: 121
Joined: Sat Oct 03, 2015 10:09 am

Re: Issues with ffmpeg installation for use with OBS.

Post by Nick » Fri Nov 06, 2020 11:45 pm

Hello John and Mike,

Thanks for the replies.

John - I set up the path to ffmpeg as shown in the image. It is a little different to how you say.

My Settings
My Settings
ffmpeg Properties.jpg (205.04 KiB) Viewed 12132 times

I did it in a way I found on YouTube.

In user variable for Nick I selected New and set variable name as path and set c:\ffmpeg\bin in variable value.

Should I remove that and change to way you describe ?

Mike - at my stage of using ffmpeg that simple command is anything but simple. I obviously have a long way to go in my understanding of have to use it.

I did try a way of testing I found with Google. It was a simple video file conversion.

I copied a file from my camcorder to c:\users\Nick. The file was in .MTS format.

I used ffmpeg -i 00012.MTS 00012.mp4 and it did convert to an mp4 video, even though it took a few minutes as the file was nearly 400MByte. The file converted and plays OK.

Looking back a few days ago I did try play back a video file from the camcorder (JVC) into the Portsdown using the easycap, but the results through the satellite were very poor - a extremely low frame rate. Maybe it was because the file was a .MTS one.

My ultimate aim is to use OBS to stream to the Portsdown (2020 with Lime Mini). Only had OBS on the computer just over a week so still getting used to it.

Regards,

Nick - G4NKV.

G7JTT
Posts: 352
Joined: Fri Jun 10, 2016 5:05 pm

Re: Issues with ffmpeg installation for use with OBS.

Post by G7JTT » Sat Nov 07, 2020 6:13 am

Morning Nick, in system variables you should find "PATH" highlight this then click on edit. Then scroll to the end of the text, if there isn't a ; add one then add the path to ffmpeg IE c:\ffmpeg\bin.

John G7JTT

Nick
Posts: 121
Joined: Sat Oct 03, 2015 10:09 am

Re: Issues with ffmpeg installation for use with OBS.

Post by Nick » Sat Nov 07, 2020 11:40 am

Thanks John,

Got that sorted now. I will get there in the end....

Regards,

Nick - G4NKV

Post Reply

Return to “The Portsdown Digital ATV System”