leandromoreira / ffmpeg-libav-tutorial

FFmpeg libav tutorial - learn how media works from basic to transmuxing, transcoding and more. Translations: πŸ‡ΊπŸ‡Έ πŸ‡¨πŸ‡³ πŸ‡°πŸ‡· πŸ‡ͺπŸ‡Έ πŸ‡»πŸ‡³ πŸ‡§πŸ‡·
https://github.com/leandromoreira/ffmpeg-libav-tutorial
BSD 3-Clause "New" or "Revised" License
9.78k stars 937 forks source link

Compiling on Windows with GCC #129

Closed couleurm closed 8 months ago

couleurm commented 8 months ago

I'm currently messing around with 0_hello_world.c and I can't make it work,

I'm using Scoop's gcc and ffmpeg-shared packages to do this

This managed to compile with only warnings (using \ in this just for readability)

gcc -o build/hello_world 0_hello_world.c \
-lavformat -lavcodec -lswscale -lavutil \
-I"D:\Scoop\apps\ffmpeg-shared\current\include" -L"D:\Scoop\apps\ffmpeg-shared\current\lib"

This makes a 200kb exe that doesn't print out anything when ran, anything else I should try / other places I should go look for support?

couleurm commented 8 months ago

hi, update:

all I needed was to copy over the DLLs in ffmpeg-shared\current\bin over to ffmpeg-libav-tutorial\build and it worked!

also putting ffmpeg-shared\current\bin in PATH does NOT work AND supresses the following system error you get from double clicking the exe in the file explorer image