LINUX.ORG.RU

Решил записать грозу в Slow Motion

 


0

1

https://yadi.sk/d/6KLR2YqcZkUnj - вот кадры, из 45 Мб файлов png получается видео 604 Кб. Как кодирую:

ffmpeg -start_number 0000 -i 'frame%4d.png' -s 1920x1080 -vcodec libxvid -qscale 8 -me_method full -mbd rd -flags +gmc+qpel+mv4 -trellis 1 -threads 0 Гроза.mp4

Получается нормально, но слишком быстро. Вот бы сделать 5 или 10 кадров в секунду... Что дописать? Пишу "-r 10" - а он всё равно делает 30 кадров в секунду, скипнув 2/3 картинок.

Без параметра:

Stream mapping:
  Stream #0:0 -> #0:0 (png -> libxvid)
  Stream #1:0 -> #0:1 (flac -> libmp3lame)
Press [q] to stop, [?] for help
frame=    2 fps=0.0 q=8.0 size=       0kB time=00:00:00.08 bitrate=   4.4kbits/s
frame=    4 fps=3.0 q=8.0 size=      77kB time=00:00:00.23 bitrate=2667.9kbits/s
frame=    6 fps=3.2 q=8.0 size=     126kB time=00:00:00.24 bitrate=4304.1kbits/s
frame=    7 fps=2.8 q=8.0 size=     126kB time=00:00:00.28 bitrate=3692.2kbits/s
frame=    9 fps=2.7 q=8.0 size=     163kB time=00:00:00.36 bitrate=3703.0kbits/s
frame=    9 fps=2.3 q=8.0 size=     163kB time=00:00:00.36 bitrate=3703.0kbits/s
frame=   17 fps=3.7 q=8.0 size=     373kB time=00:00:00.68 bitrate=4491.8kbits/s
frame=   23 fps=4.2 q=8.0 size=     386kB time=00:00:00.92 bitrate=3438.8kbits/s
frame=   27 fps=4.6 q=8.0 Lsize=     608kB time=00:00:01.08 bitrate=4613.4kbits/s
video:603kB audio:3kB subtitle:0 data:0 global headers:0kB muxing overhead 0.327981%

С параметром:

Stream mapping:
  Stream #0:0 -> #0:0 (png -> libxvid)
Press [q] to stop, [?] for help
frame=    3 fps=0.0 q=8.0 size=      59kB time=00:00:00.60 bitrate= 800.1kbits/s
frame=    4 fps=3.3 q=8.0 size=      76kB time=00:00:00.80 bitrate= 781.3kbits/s
frame=    7 fps=3.8 q=8.0 size=     152kB time=00:00:01.40 bitrate= 892.1kbits/s
frame=    8 fps=3.9 q=8.0 Lsize=     179kB time=00:00:01.60 bitrate= 915.6kbits/s dup=0 drop=19
video:178kB audio:0kB subtitle:0 data:0 global headers:0kB muxing overhead 0.497764%
★★★★★

Последнее исправление: ZenitharChampion (всего исправлений: 1)

Ман скоростная камера

anonymous
()
valkeru@valkeru-desktop:~$ ffmpeg
ffmpeg: команда не найдена

О_о Я в шоке. А avconv что-то не хочет...

valkeru@valkeru-desktop:~/Рабочий стол/Гроза$ avconv -r 10 -i frame*.png -s 1920x1080 -vcodec libxvid -qscale 8 -me_method full -mbd rd -flags +gmc+qpel+mv4 -trellis 1 -threads 0 Гроза.mp4  
avconv version 9.16-6:9.16-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav developers
  built on Aug 10 2014 18:16:02 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
Input #0, image2, from 'frame0000.png':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: png, rgb24, 1920x1080, 25 tbn
Output #0, image2, to 'frame0001.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #0.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #1, image2, to 'frame0002.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #1.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #2, image2, to 'frame0003.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #2.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #3, image2, to 'frame0004.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #3.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #4, image2, to 'frame0005.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #4.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #5, image2, to 'frame0006.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #5.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #6, image2, to 'frame0007.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #6.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #7, image2, to 'frame0008.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #7.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #8, image2, to 'frame0009.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #8.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #9, image2, to 'frame0010.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #9.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #10, image2, to 'frame0011.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #10.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #11, image2, to 'frame0012.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #11.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #12, image2, to 'frame0013.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #12.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #13, image2, to 'frame0014.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #13.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #14, image2, to 'frame0015.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #14.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #15, image2, to 'frame0016.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #15.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #16, image2, to 'frame0017.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #16.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #17, image2, to 'frame0018.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #17.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #18, image2, to 'frame0019.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #18.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #19, image2, to 'frame0020.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #19.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #20, image2, to 'frame0021.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #20.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #21, image2, to 'frame0022.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #21.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #22, image2, to 'frame0023.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #22.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #23, image2, to 'frame0024.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #23.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #24, image2, to 'frame0025.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #24.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #25, image2, to 'frame0026.png':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #25.0: Video: png, rgb24, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Output #26, mp4, to 'Гроза.mp4':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #26.0: Video: libxvid (hq), yuv420p, 1920x1080, q=2-31, 200 kb/s, 10 tbn, 10 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (png -> png)
  Stream #0:0 -> #1:0 (png -> png)
  Stream #0:0 -> #2:0 (png -> png)
  Stream #0:0 -> #3:0 (png -> png)
  Stream #0:0 -> #4:0 (png -> png)
  Stream #0:0 -> #5:0 (png -> png)
  Stream #0:0 -> #6:0 (png -> png)
  Stream #0:0 -> #7:0 (png -> png)
  Stream #0:0 -> #8:0 (png -> png)
  Stream #0:0 -> #9:0 (png -> png)
  Stream #0:0 -> #10:0 (png -> png)
  Stream #0:0 -> #11:0 (png -> png)
  Stream #0:0 -> #12:0 (png -> png)
  Stream #0:0 -> #13:0 (png -> png)
  Stream #0:0 -> #14:0 (png -> png)
  Stream #0:0 -> #15:0 (png -> png)
  Stream #0:0 -> #16:0 (png -> png)
  Stream #0:0 -> #17:0 (png -> png)
  Stream #0:0 -> #18:0 (png -> png)
  Stream #0:0 -> #19:0 (png -> png)
  Stream #0:0 -> #20:0 (png -> png)
  Stream #0:0 -> #21:0 (png -> png)
  Stream #0:0 -> #22:0 (png -> png)
  Stream #0:0 -> #23:0 (png -> png)
  Stream #0:0 -> #24:0 (png -> png)
  Stream #0:0 -> #25:0 (png -> png)
  Stream #0:0 -> #26:0 (png -> libxvid)
Press ctrl-c to stop encoding
[libxvid @ 0x1b576e0] Invalid pixel aspect ratio 0/1
Video encoding failed

Valkeru ★★★★
()
Последнее исправление: Valkeru (всего исправлений: 2)
Ответ на: комментарий от Valkeru

Скачайте статический ffmpeg, avconv уже давно значительно отстает от него.

ValdikSS ★★★★★
()

поставь -r 10 и перед -i и после

thesame ★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.