LinuxForum.Fans
Тема

Помогите ускорить видео до 96 fps в секунду

Автор: XliN 9 сообщений 4058 просмотров
20.10.2014 12:29 · отредактировано #397301

Что то не получается. Пробовал делать вот по этой статье, но что то не канает. http://s.arboreus.com/2009/07/slow-motion-and-fast-forward-video.html

Выложу файл, может у вас получится. https://yadi.sk/i/hZEYJ-P8c9dxW Файл avi, снятый с потока видеокамеры через vlc

Мне нужно это все из консоли делать. Т.к. на сервере нет иксов.

20.10.2014 12:42 #397303

Попробуйте так [console]avidemux2_cli --load input_file.avi --fps 96 --save output_file.avi[/console]
или [console]ffmpeg -i input.avi -r 96 output.avi[/console]

20.10.2014 12:52 #397307
"baralgin" написал:
ffmpeg -i input.avi -r 96 output.avi

Не то Мне нужно что бы ролик быстрее проигрывался. Что бы потом склеить и получить эффект ускорения. Типо цветок распустился.

20.10.2014 18:15 #397340

Ни кто не работает с видео? Вроде легкая задача, но я в этом вопросе вообще профан.

20.10.2014 21:29 · отредактировано #397378

Ну вот что с этим делать?

Показать
[console][xlin@xlin-netbook ~]$ ffmpeg -i go.avi -qmax -f yuv4mpegpipe - | yuvfps -s 30:1 -r 1:1 | yuvfps -r 30:1 -c | ffmpeg -f yuv4mpegpipe -i - -qmax -y video_out.avi
ffmpeg version 2.0.5 Copyright (c) 2000-2014 the FFmpeg developers
built on Jul 1 2014 14:40:13 with gcc 4.8.2 (GCC)
configuration: --prefix=/usr --enable-shared --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include --disable-stripping --enable-postproc --enable-gpl --enable-pthreads --enable-libtheora --enable-libvorbis --disable-encoder=vorbis --enable-libvpx --enable-x11grab --enable-runtime-cpudetect --enable-libdc1394 --enable-libschroedinger --enable-librtmp --enable-libspeex --enable-libfreetype --enable-libnut --enable-libgsm --enable-libcelt --enable-libopus --disable-libopencv --enable-libopenjpeg --enable-libtwolame --enable-libxavs --enable-frei0r --enable-libmodplug --enable-libass --enable-gnutls --enable-libcdio --enable-libpulse --enable-libv4l2 --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-libx264 --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libxvid
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.100 / 55. 12.100
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 79.101 / 3. 79.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
ffmpeg version 2.0.5 Copyright (c) 2000-2014 the FFmpeg developers
built on Jul 1 2014 14:40:13 with gcc 4.8.2 (GCC)
configuration: --prefix=/usr --enable-shared --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include --disable-stripping --enable-postproc --enable-gpl --enable-pthreads --enable-libtheora --enable-libvorbis --disable-encoder=vorbis --enable-libvpx --enable-x11grab --enable-runtime-cpudetect --enable-libdc1394 --enable-libschroedinger --enable-librtmp --enable-libspeex --enable-libfreetype --enable-libnut --enable-libgsm --enable-libcelt --enable-libopus --disable-libopencv --enable-libopenjpeg --enable-libtwolame --enable-libxavs --enable-frei0r --enable-libmodplug --enable-libass --enable-gnutls --enable-libcdio --enable-libpulse --enable-libv4l2 --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-libx264 --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libxvid
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.100 / 55. 12.100
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 79.101 / 3. 79.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
[h264 @ 0x123b1c0] corrupted macroblock 62 33 (total_coeff=-1)
[h264 @ 0x123b1c0] error while decoding MB 62 33
[h264 @ 0x123b1c0] concealing 2147 DC, 2147 AC, 2147 MV errors in I frame
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'go.avi':
Metadata:
major_brand : isom
minor_version : 0
compatible_brands: mp41avc1qt
creation_time : 2014-10-20 11:57:13
encoder : vlc 2.1.5 stream output
encoder-eng : vlc 2.1.5 stream output
Duration: 00:00:58.83, start: 0.000000, bitrate: 2006 kb/s
Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuvj420p, 1280x960, 2002 kb/s, 11.85 fps, 12 tbr, 1000k tbn, 24 tbc
Metadata:
creation_time : 2014-10-20 11:57:13
handler_name : VideoHandler
[NULL @ 0x1245660] Unable to find a suitable output format for 'yuv4mpegpipe'
yuv4mpegpipe: Invalid argument
**ERROR: [yuvfps] Could'nt read YUV4MPEG header!
**ERROR: [yuvfps] Could'nt read YUV4MPEG header!
pipe:: Operation not permitted
[/console]
20.10.2014 21:55 · отредактировано #397383

А вот так не пробовали?
[console]ffmpeg -r 96 -i input.avi output.avi[/console]
p.s
man ffmpeg

-r[:stream_specifier] fps (input/output,per-stream)
Set frame rate (Hz value, fraction or abbreviation).

As an input option, ignore any timestamps stored in the file and instead generate timestamps assuming constant frame rate fps.
20.10.2014 22:12 #397390

Vlad60, странно. Норм отработало и в итоге получил то что хотел. Видео ускорилось.

Показать
[console][xlin@xlin-netbook ~]$ ffmpeg -r 96 -i go.avi output.avi
ffmpeg version 2.0.5 Copyright (c) 2000-2014 the FFmpeg developers
built on Jul 1 2014 14:40:13 with gcc 4.8.2 (GCC)
configuration: --prefix=/usr --enable-shared --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include --disable-stripping --enable-postproc --enable-gpl --enable-pthreads --enable-libtheora --enable-libvorbis --disable-encoder=vorbis --enable-libvpx --enable-x11grab --enable-runtime-cpudetect --enable-libdc1394 --enable-libschroedinger --enable-librtmp --enable-libspeex --enable-libfreetype --enable-libnut --enable-libgsm --enable-libcelt --enable-libopus --disable-libopencv --enable-libopenjpeg --enable-libtwolame --enable-libxavs --enable-frei0r --enable-libmodplug --enable-libass --enable-gnutls --enable-libcdio --enable-libpulse --enable-libv4l2 --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-libx264 --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libxvid
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.100 / 55. 12.100
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 79.101 / 3. 79.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
[h264 @ 0xf7b720] corrupted macroblock 62 33 (total_coeff=-1)
[h264 @ 0xf7b720] error while decoding MB 62 33
[h264 @ 0xf7b720] concealing 2147 DC, 2147 AC, 2147 MV errors in I frame
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'go.avi':
Metadata:
major_brand : isom
minor_version : 0
compatible_brands: mp41avc1qt
creation_time : 2014-10-20 11:57:13
encoder : vlc 2.1.5 stream output
encoder-eng : vlc 2.1.5 stream output
Duration: 00:00:58.83, start: 0.000000, bitrate: 2006 kb/s
Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuvj420p, 1280x960, 2002 kb/s, 11.85 fps, 12 tbr, 1000k tbn, 24 tbc
Metadata:
creation_time : 2014-10-20 11:57:13
handler_name : VideoHandler
Output #0, avi, to 'output.avi':
Metadata:
major_brand : isom
minor_version : 0
compatible_brands: mp41avc1qt
encoder-eng : vlc 2.1.5 stream output
ISFT : Lavf55.12.100
Stream #0:0(eng): Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 1280x960, q=2-31, 200 kb/s, 96 tbn, 96 tbc
Metadata:
creation_time : 2014-10-20 11:57:13
handler_name : VideoHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> mpeg4)
Press [q] to stop, [?] for help
[h264 @ 0x1033840] corrupted macroblock 62 33 (total_coeff=-1)
[h264 @ 0x1033840] error while decoding MB 62 33
[h264 @ 0x1033840] concealing 2147 DC, 2147 AC, 2147 MV errors in I frame
out of range intra chroma pred mode at 21 57ime=00:00:01.84 bitrate=4504.4kbits/s
[h264 @ 0x1033840] error while decoding MB 21 57
[h264 @ 0x1033840] concealing 268 DC, 268 AC, 268 MV errors in I frame
frame= 691 fps= 26 q=31.0 Lsize= 3293kB time=00:00:07.19 bitrate=3748.1kbits/s
video:3271kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.675643%[/console]
20.10.2014 22:53 #397398
"XliN" написал:
Норм отработало и в итоге получил то что хотел

Если качество видео стало хуже ,то можно так
[console] ffmpeg -r 96 -i input.avi -qscale n output.avi[/console]
n от 1 до 31 (лучше->хуже)

Войдите или зарегистрируйтесь, чтобы ответить.