是否可以使用ffmpeg模仿给定媒体文件的编解码器设置?

时间:2014-08-04 23:23:20

标签: video ffmpeg stream concat codec

我想连接两个mkv视频文件,一个1秒(32帧)和一个20分钟,但是较短的有不同的编码。我不想对两者进行编码,但是更短,我想从较长的流中获取编解码器设置,然后使用类似于以下的命令对它们进行连接:

ffmpeg -f concat -i list.txt -c copy output.mkv

list.txt包含:

file properly-encoded-shorter-stream.mkv
file longer-stream.mkv

音频流没有问题,两者都是未压缩的PCM wav。 我的媒体文件的详细信息(3.avi是使用avisynth / wine / virtualdub生成的,其他mkv文件是从媒体文件中获取的)

ffmpeg -i 3.avi -i 5.mkv 
ffmpeg version 2.3.1 Copyright (c) 2000-2014 the FFmpeg developers
  built on Jul 31 2014 14:53:16 with gcc 4.9.1 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --enable-avisynth --enable-avresample --enable-decoder=atrac3 --enable-decoder=atrac3p --enable-dxva2 --enable-fontconfig --enable-gnutls --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-pic --enable-postproc --enable-runtime-cpudetect --enable-shared --enable-swresample --enable-vdpau --enable-version3 --enable-x11grab
  libavutil      52. 92.100 / 52. 92.100
  libavcodec     55. 69.100 / 55. 69.100
  libavformat    55. 48.100 / 55. 48.100
  libavdevice    55. 13.102 / 55. 13.102
  libavfilter     4. 11.100 /  4. 11.100
  libavresample   1.  3.  0 /  1.  3.  0
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100
[matroska,webm @ 0x84e3100] Unknown entry 0x1A45DFA3
Guessed Channel Layout for  Input Stream #0.1 : stereo
Input #0, matroska,webm, from '3.avi':
  Metadata:
    encoder         : libebml-0.7.5 & libmatroska-0.7.7
    creation_time   : 2014-08-04 23:08:59
  Duration: 00:00:01.03, start: 0.000000, bitrate: 153515 kb/s
    Stream #0:0(eng): Video: rawvideo, bgr24, 528x400, SAR 1:1 DAR 33:25, 29.97 fps, 29.97 tbr, 1k tbn, 1k tbc (default)
    Stream #0:1(eng): Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 2 channels, s16, 1536 kb/s (default)
Guessed Channel Layout for  Input Stream #1.1 : stereo
Input #1, matroska,webm, from '5.mkv':
  Metadata:
    encoder         : libebml-0.7.5 & libmatroska-0.7.7
    creation_time   : 2014-08-04 22:45:57
  Duration: 00:06:18.45, start: 0.000000, bitrate: 3219 kb/s
    Stream #1:0(eng): Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 528x400 [SAR 1:1 DAR 33:25], 29.97 fps, 29.97 tbr, 1k tbn, 29.98 tbc (default)
    Stream #1:1(eng): Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 2 channels, s16, 1536 kb/s (default)

0 个答案:

没有答案