vscode远程debug调试ffmpeg

ffmpeg4.4.2编译
build_ffmpeg.sh脚本

# export DISPLAY=:0
# --pkg-config="pkg-config --static" \
# export LD_LIBRARY_PATH=/home/share/prj/ffmpeg_prj/ffmpeg_build/lib:$LD_LIBRARY_PATH
# PKG_CONFIG_PATH="/home/share/prj/ffmpeg_prj/ffmpeg_build/lib/pkgconfig"
# export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/x86_64-linux-gnu/pkgconfig:/home/share/prj/ffmpeg_prj/ffmpeg_build/lib/pkgconfig
./configure --extra-libs="-lpthread -lm" \
--bindir="/home/share/prj/ffmpeg_prj/ffmpeg_build/bin6.0" \
--extra-cflags="-I/home/share/prj/ffmpeg_prj/ffmpeg_build/include" \
--extra-cflags="-I/home/share/prj/ffmpeg_prj/ffmpeg_build/include/fdk-aac" \
--extra-ldflags="-L/home/share/prj/ffmpeg_prj/ffmpeg_build/lib" \
--enable-gpl \
--enable-libfreetype \
--enable-libvorbis \
--enable-pic \
--disable-static --enable-shared \
--enable-nonfree \
--enable-libx264 \
--enable-libx265 \
--enable-libfdk-aac \
--enable-libmp3lame \
--enable-debug=3 \
--extra-cflags="-I$VPUHOST_CODE_DIR/include -g3 -O0 -w" \
--enable-sdl2 \
--enable-ffplay \
--disable-optimizations \
--disable-stripping \
--prefix="/home/share/prj/ffmpeg_prj/ffmpeg_build" \
 --ignore-tests=TESTS
  # --enable-indev=alsa \
  # --enable-outdev=alsa \

launch.json配置

{
    "version": "0.2.0",
    "configurations": [
  
      {
        "name": "C/C++ Runner: Debug Session",
        "type": "cppdbg",
        "request": "launch",
        "stopAtEntry": false,
        "externalConsole": false,
        "cwd": "/home/share/prj/ffmpeg_prj/ffmpeg",
        "program": "/home/share/prj/ffmpeg_prj/ffmpeg/ffmpeg_g",
        "MIMode": "gdb",
        "miDebuggerPath": "/usr/bin/gdb",
        "setupCommands": [
          {
            "description": "Enable pretty-printing for gdb",
            "text": "-enable-pretty-printing",
            "ignoreFailures": true
          } 
        ],
        // ffmpeg -re -i myj.mp4 -f rtsp -rtsp_transport tcp rtsp://127.0.0.1/live/test
        //ffmpeg_g -i /home/share/prj/ffmpeg_prj/myj.mp4 -c:v h264 -preset veryfast -c:a copy out.mp4
        // "args":[
        //     "-i",
        //     "/home/share/prj/ffmpeg_prj/myj.mp4",
        //     "-c:v",
        //     "h264",
        //     "-preset",
        //     "veryfast",
        //     "-c:a",
        //     "copy", 
        //     "/home/share/prj/ffmpeg_prj/out.mp4"
        // ],
        "args":[
            "-re",
            "-i",
            "/home/share/prj/ffmpeg_prj/myj.mp4",
            "-f",
            "rtsp",
            "-rtsp_transport",
            "tcp",
            "rtsp://127.0.0.1/live/test"
        ],
        "environment": [
            {"name": "LD_LIBRARY_PATH", "value": "/home/share/prj/ffmpeg_prj/ffmpeg_build/lib:"}
        ],
        "preLaunchTask": "build" //调试开始前执行的任务,一般为编译程序
      }
    ]
  }
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值