测试的版本
ffmpeg -version
ffmpeg version n6.0 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 11 (Ubuntu 11.3.0-1ubuntu1~22.04)
configuration: --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --enable-nvenc --enable-nvdec --enable-cuda --enable-cuvid
libavutil 58. 2.100 / 58. 2.100
libavcodec 60. 3.100 / 60. 3.100
libavformat 60. 3.100 / 60. 3.100
libavdevice 60. 1.100 / 60. 1.100
libavfilter 9. 3.100 / 9. 3.100
libswscale 7. 1.100 / 7. 1.100
libswresample 4. 10.100 / 4. 10.100
libpostproc 57. 1.100 / 57. 1.100
无损压缩转码指令
h264
ffmpeg -i 1_1.mp4 -an -vcodec libx264 -qp 0 video_h264ll.mp4
ffmpeg -i 1_1.mp4 -an -vcodec h264 -qp 0 video_h264ll.mp4
h265
ffmpeg -i 1_1.mp4 -an -vcodec libx265 -x265-params lossless=1 video_h265llo.mp4
通过对原始文件和转码文件的切图后逐像素比较完全一致
ffmpeg -i 1_1.mp4 -f image2 output%d.png
ffmpeg -ss 1 -i video_h264ll.mp4 -vframes 1 123h4.png
ffmpeg -ss 1 -i video_h265ll.mp4 -vframes 1 123h5.png
ffmpeg -ss 1 -i video_x265ll.mp4 -vframes 1 123h5.png
更改分辨率并转码无损压缩
ffmpeg -i 1_1.mp4 -vf scale=800:640 -an -vcodec h264 -qp 0 video_800640_h264ll.mp4
ffmpeg -i 1_1.mp4 -vf scale=800:640 -an -vcodec libx265 -x265-params lossless=1 video_800640_h265ll.mp4
标签:enable,ffmpeg,转码,--,无损压缩,3.100,mp4,video From: https://www.cnblogs.com/superheasy/p/17275966.html