Vídeos lado a lado com taxa de quadros mais rápida

0

Consegui combinar dois vídeos em um único vídeo com uma sobreposição lado a lado e consegui aumentar a taxa de quadros de um filme, mas não consigo descobrir como fazer os dois. Eu tentei o seguinte.

ffmpeg -i gp1.mp4 -i gp2.mp4 -filter_complex "[0:v]setpts=0.077*(PTS-STARTPTS),    pad=iw*2:ih[bg]; [1:v]setpts=0.077*(PTS-STARTPTS)[fg]; [bg][fg]overlay=W-w-10:0:shortest=1[out]" -map "[out]" -map 0:a -c:v libx264 -crf 19 output2.avi

Meu problema é que o output2.avi tem todos os frames acelerados, mas o final do tempo comprimido reproduz o último quadro para o que seria a duração da versão não acelerada.

o vídeo normal acelerado leva 20 minutos de reprodução e dá 3 min no arquivo de saída.

lado a lado, dê 3 minutos de vídeo disparado e 17 minutos do último quadro no arquivo de saída.

 C:\Users\scottt\Videos\R103>ffmpeg -i GOPR0004.MP4 -i GP010004.MP4 -filter_compl
ex "[0:v]setpts=0.077*(PTS-STARTPTS), pad=iw*2:ih[bg]; [1:v]setpts=0.077*(PTS-ST
ARTPTS)[fg]; [bg][fg]overlay=W-w-10:0:shortest=1[out]" -map "[out]" -map 0:a -c:
v libx264 -crf 19  output2.avi
ffmpeg version N-63146-g09cd228 Copyright (c) 2000-2014 the FFmpeg developers
  built on May 14 2014 22:09:22 with gcc 4.8.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
e --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-
libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libope
njpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsox
r --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab -
-enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-
libxvid --enable-decklink --enable-zlib
  libavutil      52. 83.100 / 52. 83.100
  libavcodec     55. 61.101 / 55. 61.101
  libavformat    55. 37.102 / 55. 37.102
  libavdevice    55. 13.101 / 55. 13.101
  libavfilter     4.  5.100 /  4.  5.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'GOPR0004.MP4':
  Metadata:
    major_brand     : avc1
    minor_version   : 0
    compatible_brands: avc1isom
    creation_time   : 2014-04-15 15:32:32
  Duration: 00:19:53.73, start: 0.000000, bitrate: 15120 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuvj420p(pc, bt709
), 1280x720 [SAR 1:1 DAR 16:9], 14985 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94
 tbc (default)
    Metadata:
      creation_time   : 2014-04-15 15:32:32
      handler_name    :  GoPro AVC
      encoder         : GoPro AVC encoder
      timecode        : 15:31:36:03
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 12
7 kb/s (default)
    Metadata:
      creation_time   : 2014-04-15 15:32:32
      handler_name    :  GoPro AAC
      timecode        : 15:31:36:03
    Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
      creation_time   : 2014-04-15 15:32:32
      timecode        : 15:31:36:03
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'GP010004.MP4':
  Metadata:
    major_brand     : avc1
    minor_version   : 0
    compatible_brands: avc1isom
    creation_time   : 2014-04-15 15:52:27
  Duration: 00:19:53.73, start: 0.000000, bitrate: 15119 kb/s
    Stream #1:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuvj420p(pc, bt709
), 1280x720 [SAR 1:1 DAR 16:9], 14983 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94
 tbc (default)
    Metadata:
      creation_time   : 2014-04-15 15:52:27
      handler_name    :  GoPro AVC
      encoder         : GoPro AVC encoder
      timecode        : 15:51:28:27
    Stream #1:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 12
7 kb/s (default)
    Metadata:
      creation_time   : 2014-04-15 15:52:27
      handler_name    :  GoPro AAC
      timecode        : 15:51:28:27
    Stream #1:2(eng): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
      creation_time   : 2014-04-15 15:52:27
      timecode        : 15:51:28:27
[swscaler @ 0000000002a95fe0] deprecated pixel format used, make sure you did se
t range correctly
[swscaler @ 00000000052429e0] deprecated pixel format used, make sure you did se
t range correctly
[libx264 @ 0000000002bfe620] using SAR=1/1
[libx264 @ 0000000002bfe620] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
AVX
[libx264 @ 0000000002bfe620] profile High, level 4.0
Output #0, avi, to 'output2.avi':
  Metadata:
    major_brand     : avc1
    minor_version   : 0
    compatible_brands: avc1isom
    ISFT            : Lavf55.37.102
    Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv420p, 2560x720 [S
AR 1:1 DAR 32:9], q=-1--1, 29.97 tbn, 29.97 tbc (default)
    Stream #0:1(eng): Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 48000 Hz, s
tereo, fltp (default)
    Metadata:
      creation_time   : 2014-04-15 15:32:32
      handler_name    :  GoPro AAC
      timecode        : 15:31:36:03
Stream mapping:
  Stream #0:0 (h264) -> setpts (graph 0)
  Stream #1:0 (h264) -> setpts (graph 0)
  overlay (graph 0) -> Stream #0:0 (libx264)
  Stream #0:1 -> #0:1 (aac -> libmp3lame)
Press [q] to stop, [?] for help
frame=    4 fps=0.0 q=0.0 size=      10kB time=00:00:01.34 bitrate=  59.5kbits/s
frame=    7 fps=7.0 q=0.0 size=      10kB time=00:00:02.66 bitrate=  30.0kbits/s
frame=   10 fps=6.6 q=0.0 size=      10kB time=00:00:03.96 bitrate=  20.2kbits/s
frame=   13 fps=6.5 q=0.0 size=      10kB time=00:00:05.30 bitrate=  15.1kbits/s
frame=   16 fps=6.4 q=0.0 size=      10kB time=00:00:06.62 bitrate=  12.1kbits/s
frame=   19 fps=6.3 q=0.0 size=      10kB time=00:00:07.96 bitrate=  10.0kbits/s
frame=   22 fps=6.3 q=0.0 size=      10kB time=00:00:09.31 bitrate=   8.6kbits/s
frame=   25 fps=6.2 q=0.0 size=      20kB time=00:00:10.65 bitrate=  15.7kbits/s
frame=   28 fps=6.2 q=0.0 size=      41kB time=00:00:11.95 bitrate=  28.2kbits/s
frame=   31 fps=6.2 q=0.0 size=      62kB time=00:00:13.27 bitrate=  38.4kbits/s
frame=   34 fps=6.2 q=0.0 size=      84kB time=00:00:14.61 bitrate=  46.9kbits/s
frame=   37 fps=6.1 q=0.0 size=     105kB time=00:00:15.93 bitrate=  53.8kbits/s
frame=   40 fps=6.1 q=0.0 size=     126kB time=00:00:17.25 bitrate=  59.7kbits/s
frame=   43 fps=6.1 q=0.0 size=     146kB time=00:00:18.50 bitrate=  64.5kbits/s
frame=   46 fps=6.1 q=0.0 size=     166kB time=00:00:19.75 bitrate=  68.7kbits/s
frame=   49 fps=6.1 q=0.0 size=     186kB time=00:00:21.02 bitrate=  72.4kbits/s
frame=   52 fps=6.1 q=0.0 size=     205kB time=00:00:22.24 bitrate=  75.6kbits/s
frame=   55 fps=6.1 q=0.0 size=     224kB time=00:00:23.42 bitrate=  78.4kbits/s
frame=   57 fps=6.0 q=25.0 size=     420kB time=00:00:24.55 bitrate= 140.2kbits/
frame=   60 fps=6.0 q=25.0 size=     570kB time=00:00:25.77 bitrate= 181.2kbits/
frame=   63 fps=6.0 q=25.0 size=     679kB time=00:00:26.97 bitrate= 206.2kbits/
frame=   66 fps=6.0 q=25.0 size=     782kB time=00:00:28.22 bitrate= 226.9kbits/
frame=   68 fps=5.9 q=25.0 size=     871kB time=00:00:29.42 bitrate= 242.4kbits/
frame=   71 fps=5.9 q=25.0 size=    1009kB time=00:00:30.60 bitrate= 270.1kbits/
frame=   74 fps=5.9 q=25.0 size=    1111kB time=00:00:31.80 bitrate= 286.3kbits/
frame=   77 fps=5.9 q=25.0 size=    1212kB time=00:00:33.02 bitrate= 300.7kbits/
frame=   79 fps=5.8 q=25.0 size=    1296kB time=00:00:34.20 bitrate= 310.5kbits/
frame=   82 fps=5.8 q=25.0 size=    1398kB time=00:00:35.37 bitrate= 323.7kbits/
frame=   85 fps=5.8 q=25.0 size=    1494kB time=00:00:36.57 bitrate= 334.5kbits/
frame=   88 fps=5.8 q=25.0 size=    1593kB time=00:00:37.80 bitrate= 345.3kbits/
frame=   90 fps=5.8 q=25.0 size=    1675kB time=00:00:38.90 bitrate= 352.6kbits/
frame=   93 fps=5.8 q=25.0 size=    1770kB time=00:00:40.08 bitrate= 361.8kbits/
frame=   96 fps=5.8 q=25.0 size=    1871kB time=00:00:41.25 bitrate= 371.5kbits/
frame=   98 fps=5.7 q=25.0 size=    1919kB time=00:00:42.43 bitrate= 370.4kbits/
frame=  101 fps=5.7 q=25.0 size=    2014kB time=00:00:43.63 bitrate= 378.1kbits/
frame=  104 fps=5.7 q=25.0 size=    2109kB time=00:00:44.83 bitrate= 385.5kbits/
frame=  104 fps=5.1 q=25.0 size=    2109kB time=00:00:44.83 bitrate= 385.5kbits/
frame=  107 fps=5.1 q=25.0 size=    2200kB time=00:00:45.98 bitrate= 392.0kbits/
frame=  109 fps=5.1 q=25.0 size=    2283kB time=00:00:47.20 bitrate= 396.2kbits/
frame=  112 fps=5.1 q=25.0 size=    2377kB time=00:00:48.45 bitrate= 401.8kbits/
frame=  115 fps=5.2 q=25.0 size=    2466kB time=00:00:49.58 bitrate= 407.5kbits/
frame=  115 fps=4.5 q=25.0 size=    2467kB time=00:00:49.60 bitrate= 407.3kbits/
frame=  118 fps=4.5 q=25.0 size=    2555kB time=00:00:50.76 bitrate= 412.3kbits/
frame=  120 fps=4.5 q=25.0 size=    2599kB time=00:00:51.93 bitrate= 409.9kbits/
frame=  123 fps=4.5 q=25.0 size=    2687kB time=00:00:53.18 bitrate= 413.9kbits/
frame=  126 fps=4.6 q=25.0 size=    2775kB time=00:00:54.43 bitrate= 417.6kbits/
frame=  129 fps=4.6 q=25.0 size=    2864kB time=00:00:55.58 bitrate= 422.1kbits/
frame=  132 fps=4.6 q=25.0 size=    2949kB time=00:00:56.78 bitrate= 425.4kbits/
frame=  134 fps=4.6 q=25.0 size=    2997kB time=00:00:58.03 bitrate= 423.1kbits/
frame=  137 fps=4.6 q=25.0 size=    3087kB time=00:00:59.18 bitrate= 427.3kbits/
frame=  140 fps=4.6 q=25.0 size=    3180kB time=00:01:00.38 bitrate= 431.4kbits/
frame=  143 fps=4.7 q=25.0 size=    3268kB time=00:01:01.58 bitrate= 434.7kbits/
frame=  145 fps=4.7 q=25.0 size=    3354kB time=00:01:02.76 bitrate= 437.7kbits/
frame=  147 fps=4.5 q=-1.0 Lsize=    5009kB time=00:01:03.52 bitrate= 645.9kbits
/s dup=0 drop=1748
video:3941kB audio:993kB subtitle:0kB other streams:0kB global headers:0kB muxin
g overhead: 1.527102%
[libx264 @ 0000000002bfe620] frame I:1     Avg QP:19.46  size:182228
[libx264 @ 0000000002bfe620] frame P:56    Avg QP:19.48  size: 45589
[libx264 @ 0000000002bfe620] frame B:90    Avg QP:21.55  size: 14448
[libx264 @ 0000000002bfe620] consecutive B-frames:  1.4% 35.4% 46.9% 16.3%
[libx264 @ 0000000002bfe620] mb I  I16..4: 11.8% 55.4% 32.8%
[libx264 @ 0000000002bfe620] mb P  I16..4:  0.6%  2.1%  0.4%  P16..4: 42.8% 17.4
% 15.1%  0.0%  0.0%    skip:21.5%
[libx264 @ 0000000002bfe620] mb B  I16..4:  0.0%  0.6%  0.1%  B16..8: 37.8%  3.7
%  0.8%  direct: 2.9%  skip:54.0%  L0:45.0% L1:51.7% BI: 3.3%
[libx264 @ 0000000002bfe620] 8x8 transform intra:66.7% inter:58.5%
[libx264 @ 0000000002bfe620] coded y,uvDC,uvAC intra: 76.2% 74.7% 41.5% inter: 2
1.5% 22.6% 2.2%
[libx264 @ 0000000002bfe620] i16 v,h,dc,p: 24% 18% 26% 32%
[libx264 @ 0000000002bfe620] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 14% 33%  5% 10%
 6% 10%  5%  7%
[libx264 @ 0000000002bfe620] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 18% 20%  6% 10%
 6%  9%  5%  7%
[libx264 @ 0000000002bfe620] i8c dc,h,v,p: 57% 21% 15%  7%
[libx264 @ 0000000002bfe620] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0000000002bfe620] ref P L0: 49.4% 10.2% 27.2% 13.2%
[libx264 @ 0000000002bfe620] ref B L0: 57.6% 35.7%  6.7%
[libx264 @ 0000000002bfe620] ref B L1: 87.7% 12.3%
[libx264 @ 0000000002bfe620] kb/s:6581.96
    Received signal 2: terminating.  
    
por user2632203 19.05.2014 / 16:34

1 resposta

0

Resolvido o problema Eu não estava aumentando a velocidade de reprodução do áudio. removendo o -map 0: um comando Eu recebo o vídeo sobreposto acelerado até a hora correta, mas sem áudio. Se eu quisesse ter áudio, eu teria comandos casdade atempo até conseguir uma velocidade de reprodução igual ao do vídeo, pois o máximo que vai subir é de 2,0 por um passo

    
por 21.05.2014 / 21:41

Tags