linux 入门(七)-ffmpeg使用

linux 入门(七)

1: 安装ffmpeg

ubuntu下安装ffmpeg:

sudo apt-get install ffmpeg

2: ffmpeg --help

ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developersbuilt with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-sharedlibavutil      56. 31.100 / 56. 31.100libavcodec     58. 54.100 / 58. 54.100libavformat    58. 29.100 / 58. 29.100libavdevice    58.  8.100 / 58.  8.100libavfilter     7. 57.100 /  7. 57.100libavresample   4.  0.  0 /  4.  0.  0libswscale      5.  5.100 /  5.  5.100libswresample   3.  5.100 /  3.  5.100libpostproc    55.  5.100 / 55.  5.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...Getting help:-h      -- print basic options-h long -- print more options-h full -- print all options (including all format and codec specific options, very long)-h type=name -- print all options for the named decoder/encoder/demuxer/muxer/filter/bsfSee man ffmpeg for detailed description of the options.Print help / information / capabilities:
-L                  show license
-h topic            show help
-? topic            show help
-help topic         show help
--help topic        show help
-version            show version
-buildconf          show build configuration
-formats            show available formats
-muxers             show available muxers
-demuxers           show available demuxers
-devices            show available devices
-codecs             show available codecs
-decoders           show available decoders
-encoders           show available encoders
-bsfs               show available bit stream filters
-protocols          show available protocols
-filters            show available filters
-pix_fmts           show available pixel formats
-layouts            show standard channel layouts
-sample_fmts        show available audio sample formats
-colors             show available color names
-sources device     list sources of the input device
-sinks device       list sinks of the output device
-hwaccels           show available HW acceleration methodsGlobal options (affect whole program instead of just one file:
-loglevel loglevel  set logging level
-v loglevel         set logging level
-report             generate a report
-max_alloc bytes    set maximum size of a single allocated block
-y                  overwrite output files
-n                  never overwrite output files
-ignore_unknown     Ignore unknown stream types
-filter_threads     number of non-complex filter threads
-filter_complex_threads  number of threads for -filter_complex
-stats              print progress report during encoding
-max_error_rate maximum error rate  ratio of errors (0.0: no errors, 1.0: 100% errors) above which ffmpeg returns an error instead of success.
-bits_per_raw_sample number  set the number of bits per raw sample
-vol volume         change audio volume (256=normal)Per-file main options:
-f fmt              force format
-c codec            codec name
-codec codec        codec name
-pre preset         preset name
-map_metadata outfile[,metadata]:infile[,metadata]  set metadata information of outfile from infile
-t duration         record or transcode "duration" seconds of audio/video
-to time_stop       record or transcode stop time
-fs limit_size      set the limit file size in bytes
-ss time_off        set the start time offset
-sseof time_off     set the start time offset relative to EOF
-seek_timestamp     enable/disable seeking by timestamp with -ss
-timestamp time     set the recording timestamp ('now' to set the current time)
-metadata string=string  add metadata
-program title=string:st=number...  add program with specified streams
-target type        specify target file type ("vcd", "svcd", "dvd", "dv" or "dv50" with optional prefixes "pal-", "ntsc-" or "film-")
-apad               audio pad
-frames number      set the number of frames to output
-filter filter_graph  set stream filtergraph
-filter_script filename  read stream filtergraph description from a file
-reinit_filter      reinit filtergraph on input parameter changes
-discard            discard
-disposition        dispositionVideo options:
-vframes number     set the number of video frames to output
-r rate             set frame rate (Hz value, fraction or abbreviation)
-s size             set frame size (WxH or abbreviation)
-aspect aspect      set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)
-bits_per_raw_sample number  set the number of bits per raw sample
-vn                 disable video
-vcodec codec       force video codec ('copy' to copy stream)
-timecode hh:mm:ss[:;.]ff  set initial TimeCode value.
-pass n             select the pass number (1 to 3)
-vf filter_graph    set video filters
-ab bitrate         audio bitrate (please use -b:a)
-b bitrate          video bitrate (please use -b:v)
-dn                 disable dataAudio options:
-aframes number     set the number of audio frames to output
-aq quality         set audio quality (codec-specific)
-ar rate            set audio sampling rate (in Hz)
-ac channels        set number of audio channels
-an                 disable audio
-acodec codec       force audio codec ('copy' to copy stream)
-vol volume         change audio volume (256=normal)
-af filter_graph    set audio filtersSubtitle options:
-s size             set frame size (WxH or abbreviation)
-sn                 disable subtitle
-scodec codec       force subtitle codec ('copy' to copy stream)
-stag fourcc/tag    force subtitle tag/fourcc
-fix_sub_duration   fix subtitles duration
-canvas_size size   set canvas size (WxH or abbreviation)
-spre preset        set the subtitle options to the indicated preset

3: 转码

转码视频格式只需要执行下面的命令即可:

ffmpeg -i share_5eb7ba669e87b5ab48d50107a249a1c1.mp4 test1.avi

输出如下:

ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developersbuilt with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-sharedlibavutil      56. 31.100 / 56. 31.100libavcodec     58. 54.100 / 58. 54.100libavformat    58. 29.100 / 58. 29.100libavdevice    58.  8.100 / 58.  8.100libavfilter     7. 57.100 /  7. 57.100libavresample   4.  0.  0 /  4.  0.  0libswscale      5.  5.100 /  5.  5.100libswresample   3.  5.100 /  3.  5.100libpostproc    55.  5.100 / 55.  5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'share_5eb7ba669e87b5ab48d50107a249a1c1.mp4':Metadata:major_brand     : isomminor_version   : 512compatible_brands: isomiso2avc1mp41comment         : vid:v0300fg10000cl7lp5bc77ubt3j4km1gencoder         : Lavf58.76.100Duration: 00:00:15.30, start: 0.000000, bitrate: 1676 kb/sStream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 720x1280 [SAR 1:1 DAR 9:16], 1543 kb/s, 54.28 fps, 60 tbr, 15360 tbn, 120 tbc (default)Metadata:handler_name    : VideoHandlerStream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)Metadata:handler_name    : SoundHandler
Stream mapping:Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))Stream #0:1 -> #0:1 (aac (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, avi, to 'test1.avi':Metadata:major_brand     : isomminor_version   : 512compatible_brands: isomiso2avc1mp41ICMT            : vid:v0300fg10000cl7lp5bc77ubt3j4km1gISFT            : Lavf58.29.100Stream #0:0(und): Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 720x1280 [SAR 1:1 DAR 9:16], q=2-31, 200 kb/s, 60 fps, 60 tbn, 60 tbc (default)Metadata:handler_name    : VideoHandlerencoder         : Lavc58.54.100 mpeg4Side data:cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1Stream #0:1(und): Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 44100 Hz, stereo, fltp (default)Metadata:handler_name    : SoundHandlerencoder         : Lavc58.54.100 libmp3lame
frame=  826 fps=514 q=31.0 Lsize=    3354kB time=00:00:15.30 bitrate=1795.0kbits/s speed=9.53x    
video:3069kB audio:240kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.374900%

4: 视频压缩

  1. 指定尺寸

    ffmpeg -i share_5eb7ba669e87b5ab48d50107a249a1c1.mp4 -s 720x360 test1.mp4
    

    原视频1280x720, 大小3.3m, 修改后720x360 ,大小1.5M.

  2. 修改帧率

    ffmpeg -i share_5eb7ba669e87b5ab48d50107a249a1c1.mp4 -r 20  test5.mp4
    

    原视频帧率60, 大小3.3M. 修改帧率为20后, 大小为2.9M

  3. 限定视频大小

    ffmpeg -i share_5eb7ba669e87b5ab48d50107a249a1c1.mp4 -fs 1MB  test6.mp4
    

    该命令会限制输出文件的大小为1MB.

    但是-fs参数并不会保证输出的文件在1MB. 它只是告诉ffmpeg在输出文件到达1MB后停止输出.

    并且, 如果该命令会导致输出视频的长度发生变化,比如之前是16s的视频, 输出只有3s.

5: 视频裁剪

ffmpeg -i share_5eb7ba669e87b5ab48d50107a249a1c1.mp4 -ss 00:00:10 -to 00:00:13 -c copy test7.mp4
  1. “-ss” 参数表示开始裁剪的时间,
  2. “-to” 参数表示裁剪到的时间
  3. “-c copy” 表示复制原始视频的编码格式。

6: 合并视频

将两个视频直接拼接:

创建mp4.txt文件 ,写入需要拼接的视频的路径.如:

file 'share_5eb7ba669e87b5ab48d50107a249a1c1.mp4'
file 'test1.mp4'

执行命令:

ffmpeg -f concat -i mp4.txt -c copy test8.mp4

如果某一个视频有问题,如:无法播放或者文件不存在. 则输出如下:

ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developersbuilt with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-sharedlibavutil      56. 31.100 / 56. 31.100libavcodec     58. 54.100 / 58. 54.100libavformat    58. 29.100 / 58. 29.100libavdevice    58.  8.100 / 58.  8.100libavfilter     7. 57.100 /  7. 57.100libavresample   4.  0.  0 /  4.  0.  0libswscale      5.  5.100 /  5.  5.100libswresample   3.  5.100 /  3.  5.100libpostproc    55.  5.100 / 55.  5.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55964a0ff340] Auto-inserting h264_mp4toannexb bitstream filter
Input #0, concat, from 'mp4.txt':Duration: N/A, start: -0.046440, bitrate: 1671 kb/sStream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 720x1280 [SAR 1:1 DAR 9:16], 1543 kb/s, 54.28 fps, 60 tbr, 15360 tbn, 120 tbcMetadata:handler_name    : VideoHandlerStream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/sMetadata:handler_name    : SoundHandler
Output #0, mp4, to 'test8.mp4':Metadata:encoder         : Lavf58.29.100Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 720x1280 [SAR 1:1 DAR 9:16], q=2-31, 1543 kb/s, 54.28 fps, 60 tbr, 15360 tbn, 15360 tbcMetadata:handler_name    : VideoHandlerStream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/sMetadata:handler_name    : SoundHandler
Stream mapping:Stream #0:0 -> #0:0 (copy)Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55964a118200] moov atom not found
[concat @ 0x55964a0f56c0] Impossible to open 'test1.mp4'
mp4.txt: Invalid data found when processing input
frame=  826 fps=0.0 q=-1.0 Lsize=    3131kB time=00:00:15.32 bitrate=1673.6kbits/s speed=1.23e+03x    
video:2867kB audio:240kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.780092%

此时仍然可以生成视频,只是只有第一个视频, 第二个未拼接成功.

第二种情况:

两个视频的帧率,分辨率, 编解码器不同.

虽然可以成功拼接,但是效果却差强人意:

ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developersbuilt with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-sharedlibavutil      56. 31.100 / 56. 31.100libavcodec     58. 54.100 / 58. 54.100libavformat    58. 29.100 / 58. 29.100libavdevice    58.  8.100 / 58.  8.100libavfilter     7. 57.100 /  7. 57.100libavresample   4.  0.  0 /  4.  0.  0libswscale      5.  5.100 /  5.  5.100libswresample   3.  5.100 /  3.  5.100libpostproc    55.  5.100 / 55.  5.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55acf6064340] Auto-inserting h264_mp4toannexb bitstream filter
Input #0, concat, from 'mp4.txt':Duration: N/A, start: -0.046440, bitrate: 1671 kb/sStream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 720x1280 [SAR 1:1 DAR 9:16], 1543 kb/s, 54.28 fps, 60 tbr, 15360 tbn, 120 tbcMetadata:handler_name    : VideoHandlerStream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/sMetadata:handler_name    : SoundHandler
Output #0, mp4, to 'test8.mp4':Metadata:encoder         : Lavf58.29.100Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 720x1280 [SAR 1:1 DAR 9:16], q=2-31, 1543 kb/s, 54.28 fps, 60 tbr, 15360 tbn, 15360 tbcMetadata:handler_name    : VideoHandlerStream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/sMetadata:handler_name    : SoundHandler
Stream mapping:Stream #0:0 -> #0:0 (copy)Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55acf607d200] Auto-inserting h264_mp4toannexb bitstream filter
[mp4 @ 0x55acf609df40] Non-monotonous DTS in output stream 0:1; previous: 675840, current: 124565; changing to 675841. This may result in incorrect timestamps in the output file.
[mp4 @ 0x55acf609df40] Non-monotonous DTS in output stream 0:1; previous: 675841, current: 125589; changing to 675842. This may result in incorrect timestamps in the output file.
[mp4 @ 0x55acf609df40] Non-monotonous DTS in output stream 0:1; previous: 675842, current: 126613; changing to 675843. This may result in incorrect timestamps in the output file.
[mp4 @ 0x55acf609df40] Non-monotonous DTS in output stream 0:1; previous: 675843, current: 127637; changing to 675844. This may result in incorrect timestamps in the output file.
[mp4 @ 0x55acf609df40] Non-monotonous DTS in output stream 0:1; previous: 675844, current: 128661; changing to 675845. This may result in incorrect timestamps in the output file.
[mp4 @ 0x55acf609df40] Non-monotonous DTS in output stream 0:1; previous: 675845, current: 129685; changing to 675846. This may result in incorrect timestamps in the output file.
[mp4 @ 0x55acf609df40] Non-monotonous DTS in output stream 0:1; previous: 675846, current: 130709; changing to 675847. This may result in incorrect timestamps in the output file.
[mp4 @ 0x55acf609df40] Non-monotonous DTS in output stream 0:1; previous: 675847, current: 131733; changing to 675848. This may result in incorrect timestamps in the output file.
[mp4 @ 0x55acf609df40] Non-monotonous DTS in output stream 0:1; previous: 675848, current: 132757; changing to 675849. This may result in incorrect timestamps in the output file.
[mp4 @ 0x55acf609df40] Non-monotonous DTS in output stream 0:1; previous: 675849, current: 133781; changing to 675850. This may result in incorrect timestamps in the output file.
[mp4 @ 0x55acf609df40] Non-monotonous DTS in output stream 0:1; previous: 675850, current: 134805; changing to 675851. This may result in incorrect timestamps in the output file.
[mp4 @ 0x55acf609df40] Non-monotonous DTS in output stream 0:1; previous: 675851, current: 135829; changing to 675852. This may result in incorrect timestamps in the output file.
[mp4 @ 0x55acf609df40] Non-monotonous DTS in output stream 0:1; previous: 675852, current: 136853; changing to 675853. This may result in incorrect timestamps in the output file.
[mp4 @ 0x55acf609df40] Non-monotonous DTS in output stream 0:1; previous: 675853, current: 137877; changing to 675854. This may result in incorrect timestamps in the output file.
[mp4 @ 0x55acf609df40] Non-monotonous DTS in output stream 0:1; previous: 675854, current: 138901; changing to 675855. This may result in incorrect timestamps in the output file.
[mp4 @ 0x55acf609df40] Non-monotonous DTS in output stream 0:1; previous: 675855, current: 139925; changing to 675856. This may result in incorrect timestamps in the output file.
[mp4 @ 0x55acf609df40] Non-monotonous DTS in output stream 0:1; previous: 675856, current: 140949; changing to 675857. This may result in incorrect timestamps in the output file.
[mp4 @ 0x55acf609df40] Non-monotonous DTS in output stream 0:1; previous: 675857, current: 141973; changing to 675858. This may result in incorrect timestamps in the output file.
[mp4 @ 0x55acf609df40] Non-monotonous DTS in output stream 0:1; previous: 675858, current: 142997; changing to 675859. This may result in incorrect timestamps in the output file.
[mp4 @ 0x55acf609df40] Non-monotonous DTS in output stream 0:1; previous: 675859, current: 144021; changing to 675860. This may result in incorrect timestamps in the output file.
frame=  903 fps=0.0 q=-1.0 Lsize=    3219kB time=00:01:44.78 bitrate= 251.7kbits/s speed=4.89e+03x    
video:2951kB audio:244kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.774971%

生成的视频时长与 两个视频拼接的长度不一致.

我们直接将相同的两个视频拼接,此时:

file 'share_5eb7ba669e87b5ab48d50107a249a1c1.mp4'
file 'share_5eb7ba669e87b5ab48d50107a249a1c1.mp4'

最终可以拼接成功.

如果需要解决这个问题,则需要我们使用ffmpeg的其他选项进行转码和调整,保证两个视频的格式统一后,进行拼接.

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/744403.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

淘宝npm老域名已下线,请尽快更换!请尽快配置新域名https://npmmirror.com

原淘宝npm域名即将停止解析,请切换至新域名 npmmirror.com http://npm.taobao.org和 http://registry.npm.taobao.org 将在 2022.06.30 号正式下线和停止 DNS 解析。 新域名为 npmmirror.com, 相关服务域名切换规则请参考: http://npm.taobao.org >…

运放的基础知识

运算放大器(Operational Amplifier,简称运放)是一种直流耦合、差模(差动模式)输入的高增益电压放大器,通常具有单端输出。它能产生一个相对于输入端电势差大数十万倍的输出电势(对地而言&#x…

2.18 校招 实习 内推 面经

绿*泡*泡VX: neituijunsir 交流*裙 ,内推/实习/校招汇总表格 1、自动驾驶一周资讯 - 李想回应“年终奖有点大”;智界升级为奇瑞独立事业部;小鹏汽车春节累计智驾总里程公布 自动驾驶一周资讯 - 李想回应“年终奖有点大”&…

[2023年]-hadoop面试真题(三)

(上海) 什么是HDFS?(上海) 描述一下HDFS的主要特性?(上海) 你能解释一下HDFS的架构吗?(上海) 在HDFS中,什么是NameNode和DataNode?(上海) HDFS是如何处理数据的复制和故障恢复的?(上海) 描述一下HDFS的存储…

Allegro许可合规性检查

在数字化经济的时代,软件已经成为企业运营的关键要素。然而,随着企业业务的不断发展和软件使用的日益普及,软件许可的合规性问题也日益凸显。如何确保软件的合规使用,避免因违规行为而产生的风险和损失,是企业面临的挑…

IP地址被泄露了有什么安全隐患吗

在数字时代,IP地址是我们在线身份的关键,它不仅仅是网络中的一个地址标识,更是我们数字安全的门户。黑客对IP地址的兴趣不止于其代表的数字串——它们是进入个人和企业数据宝库的钥匙。那么,当黑客得知我们的IP地址时,…

IAP上位机开发

IAP上位机开发 串口类型和串口名 由于使用到的串口类型和串口名都是系统自带的,我们所能做的只是将电脑中可用的串口搜索出来,并且在上位机上面显示出来供我们使用。因此,我们是没办法自己编辑串口名和串口类型来使用的。因此在设置这两个功…

无需编程技能:Python爬虫与数据可视化毕业论文代写服务

引言 作为一名在软件技术领域深耕多年的专业人士,我不仅在软件开发和项目部署方面积累了丰富的实践经验,更以卓越的技术实力获得了🏅30项软件著作权证书的殊荣。这些成就不仅是对我的技术专长的肯定,也是对我的创新精神和专业承诺…

四川古力未来科技抖音小店:行业标杆的崛起与未来展望

在当下这个数字化、网络化的时代,电商行业正以前所未有的速度迅猛发展。四川古力未来科技有限公司,凭借其敏锐的市场洞察力和创新精神,成功在抖音小店平台上崭露头角,成为行业内的佼佼者。今天,我们就来一起探讨四川古…

如何写一个react自定义的hooks?

使用过useState,也使用过ahook的useSetState,我们知道useState和useSetState左边赋值的第一个参数是接收初始值的变量和设置变量的方法,这里左边用的是数组解构实现的。所以,这里我们想一下,如何自定义一个hooks&#…

北京调研公司揭秘:问卷调查6大秘籍,让你领先对手一步!

民安智库作为一家专业的第三方市场调研公司,我们经常会遇到客户需要开展问卷调查的情况。为了帮助客户更好地进行问卷调查,我们总结出了以下6大秘籍: 1.明确调查目的和受众群体 在进行问卷调查之前,一定要明确调查的目的和受众群…

【学习总结】Python transformers TrainingArguments 重要参数说明

代码: from transformers import TrainingArgumentstraining_args TrainingArguments(output_dirmodel_dir,per_device_train_batch_size16,num_train_epochs5,logging_steps100)TrainingArguments 类在以下代码里: /xxx/anaconda/envs/your_env/lib/…

Navicat16安装时报错记录

1.安装过程中一定要断网 2.安装好后,先不要直接打开客户端,应该先打开激活破解软件,如下: 选择HOSTS--》再Patch-->是,然后生成注册码,打开客户端正常执行即可

从“断亲”到“自我养育”,看年轻一代消费变迁丨小红书热点

一、不爱走亲戚,年轻人“断亲潮”来袭 今年春节期间,关于“农村出现以家庭为单位的断亲”的话题登上热搜。小红书等社交媒体平台上,也涌现出许多“回怼亲戚”的短视频,娱乐性调侃亦或是“阴阳怪气”地攻击,内容背后是当…

全局Ceph节点宕机处理

在极端情况下,如数据中心断电,造成 Ceph 存储集群全局宕机,可以按照本节所示流程进行 Ceph 集群上电恢复操作。 4.1 手动上电执行步骤 如为 Ceph 集群上电,monitor server 应最先上电;集群上电前确认使用 Ceph 之前端…

IIS上部署.netcore WebApi项目及swagger

.netcore项目一般是直接双击exe文件,运行服务,今天有个需求,需要把.netcore项目运行在IIS上,遇到了一个小坑,在这里记录一下。 安装IIS,怎么部署站点,这些过于简单就不细说了,不知道…

C++:继承与派生

为什么会有继承这样的语法呢??试想这样一个场景:假设我们这个App需要去获取不同类型用户的数据,并进行分类,那么就需要我们去写对应不同的类,比如说学生、老师、军人、公司职工…………每个类都需要有名字、…

品牌方如何借热点做话题?媒介盒子分享

每时每刻都有热点,品牌方总想着借热点来做话题营销,然而有些热点能让品牌有效曝光,有些热点稍不注意就会让品牌产生负面舆论,今天媒介盒子就来和大家好好聊聊:品牌方如何借热点做话题。 一、 热点选择 品牌方可以通过…

猿区 Node.js 版本控制工具介绍

Node.js 版本控制工具:nvm、n 和 fnm 如果你是一位刚开始学习 Node.js 的初学者,你可能已经注意到 Node.js 有多个版本。不同的项目可能需要不同的 Node.js 版本,而在本地环境中同时安装和管理这些版本可能会变得复杂。幸运的是,…

域内令牌窃取

前言 有这样一种场景,拿到了一台主机权限,是本地管理员,同时在这台主机上登录的是域管成员,这时我们可以通过dump lsass或通过 Kerberos TGT ,但是这是非常容易被edr命中的。 本文就通过令牌窃取进行研究&#xff0c…