Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt and ffmpeg in Linux



  • Hi!
    I put Debian 10, it already has ffmpeg.
    Please tell me how to connect ffmpeg to the Qt project.
    Here's what the terminal gives you about the library

    dpkg -L ffmpeg
    /.
    /usr
    /usr/bin
    /usr/bin/ffmpeg
    /usr/bin/ffplay
    /usr/bin/ffprobe
    /usr/bin/qt-faststart
    /usr/share
    /usr/share/doc
    /usr/share/doc/ffmpeg
    /usr/share/doc/ffmpeg/RELEASE_NOTES
    /usr/share/doc/ffmpeg/changelog.Debian.gz
    /usr/share/doc/ffmpeg/changelog.gz
    /usr/share/doc/ffmpeg/copyright
    /usr/share/ffmpeg
    /usr/share/ffmpeg/ffprobe.xsd
    /usr/share/ffmpeg/libvpx-1080p.ffpreset
    /usr/share/ffmpeg/libvpx-1080p50_60.ffpreset
    /usr/share/ffmpeg/libvpx-360p.ffpreset
    /usr/share/ffmpeg/libvpx-720p.ffpreset
    /usr/share/ffmpeg/libvpx-720p50_60.ffpreset
    /usr/share/lintian
    /usr/share/lintian/overrides
    /usr/share/lintian/overrides/ffmpeg
    /usr/share/man
    /usr/share/man/man1
    /usr/share/man/man1/ffmpeg-all.1.gz
    /usr/share/man/man1/ffmpeg-bitstream-filters.1.gz
    /usr/share/man/man1/ffmpeg-codecs.1.gz
    /usr/share/man/man1/ffmpeg-devices.1.gz
    /usr/share/man/man1/ffmpeg-filters.1.gz
    /usr/share/man/man1/ffmpeg-formats.1.gz
    /usr/share/man/man1/ffmpeg-protocols.1.gz
    /usr/share/man/man1/ffmpeg-resampler.1.gz
    /usr/share/man/man1/ffmpeg-scaler.1.gz
    /usr/share/man/man1/ffmpeg-utils.1.gz
    /usr/share/man/man1/ffmpeg.1.gz
    /usr/share/man/man1/ffplay-all.1.gz
    /usr/share/man/man1/ffplay.1.gz
    /usr/share/man/man1/ffprobe-all.1.gz
    /usr/share/man/man1/ffprobe.1.gz
    /usr/share/man/man1/qt-faststart.1.gz
    

  • Lifetime Qt Champion

    Hi
    In what way "connect" ?

    This is just the executable and seems to have no libs to link to your app.

    You can run it with QProcess if you wish.

    Please give more details on what you try to do.

    https://www.salatino.org/wp/using-ffmpeg-in-c-with-qt-creator/



  • I want to process images and sound, and work with videos. I looked at an example. But I haven't:

    #include <libavutil/opt.h>
    #include <libavcodec/avcodec.h>
    

  • Qt Champions 2019

    @Mikeeeeee said in Qt and ffmpeg in Linux:

    But I haven't

    I guess you did not install the ffmpeg dev packages?


  • Lifetime Qt Champion

    @Mikeeeeee
    Hi
    So you want to link it toyour own app ?

    I think you need to do
    sudo apt-get install libavcodec-dev
    or similar to get the headers.



  • This post is deleted!


  • This post is deleted!


  • I install the library installed:

    sudo apt-get install libavcodec-dev
    apt-get install libavformat-dev
    apt-get install libswscale-dev
    

    and in .pro:

    
    INCLUDEPATH += /usr/include/x86_64-linux-gnu/libavcodec
    
    LIBS += -lavformat  -lavcodec -lavutil -lz  -lswscale -lavutil -lm -llzma -lswresample
    

    and now work


Log in to reply