[FFmpeg-user] How to drop every Nth frame?

Andrey Aleksandrovich andrey.aleksandrovich at googlemail.com
Tue Sep 24 16:05:45 CEST 2013


After?

$ ffmpeg -y -r 372 -i mark.avi -i pcm.wav -c:v ffvhuff -aspect 4:3
-filter:v select=mod'(n,\372)',\crop=in_w-20::11:,\scale=320:240 -r
371 -c:a copy all.avi
ffmpeg version 1.2.3 Copyright (c) 2000-2013 the FFmpeg developers
  built on Sep 21 2013 15:25:21 with gcc 4.6.3 (Gentoo Hardened 4.6.3
p1.13, pie-0.5.2)
  configuration: --prefix=/usr --libdir=/usr/lib64
--shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared
--cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++
--ar=x86_64-pc-linux-gnu-ar --optflags='-O2 -pipe -march=native'
--extra-cflags='-O2 -pipe -march=native' --extra-cxxflags='-O2 -pipe
-march=native' --disable-static --enable-gpl --enable-postproc
--enable-avfilter --enable-avresample --disable-stripping
--enable-version3 --disable-indev=v4l2 --disable-indev=oss
--disable-indev=jack --disable-outdev=oss --enable-version3
--enable-bzlib --disable-runtime-cpudetect --disable-debug
--disable-doc --disable-gnutls --enable-hardcoded-tables
--enable-iconv --disable-network --disable-openssl --enable-ffplay
--disable-vaapi --enable-vdpau --enable-zlib --disable-libvo-aacenc
--enable-libvo-amrwbenc --enable-libmp3lame --disable-libfdk-aac
--disable-libaacplus --disable-libfaac --enable-libtheora
--disable-libtwolame --enable-libx264 --enable-libxvid
--disable-libcdio --disable-libiec61883 --disabl  libavutil      52.
18.100 / 52. 18.100
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.104 / 54. 63.104
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 42.103 /  3. 42.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Input #0, avi, from 'mark.avi':
  Duration: 01:33:34.40, start: 0.000000, bitrate: 9758 kb/s
    Stream #0:0: Video: ffvhuff (FFVH / 0x48564646), yuv420p, 320x240,
20 tbr, 20 tbn, 20 tbc
[wav @ 0x1948856110] max_analyze_duration 5000000 reached at 5013333
microseconds
Guessed Channel Layout for  Input Stream #1.0 : stereo
Input #1, wav, from 'pcm.wav':
  Metadata:
    encoder         : Lavf54.63.104 (libsndfile-1.0.25)
  Duration: 01:33:20.07, bitrate: 1536 kb/s
    Stream #1:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz,
stereo, s16, 1536 kb/s
[Parsed_select_0 @ 0x19488dcdf0] [Eval @ 0x394f13946c0] Missing ')' or
too many args in 'mod(n'
[Parsed_select_0 @ 0x19488dcdf0] Error while parsing expression 'mod(n'
[AVFilterGraph @ 0x194885d030] Error initializing filter 'select' with
args 'mod(n'
Error opening filters!
$



On 9/23/13, Paul B Mahol <onemda at gmail.com> wrote:
> On 9/23/13, Andrey Aleksandrovich <andrey.aleksandrovich at googlemail.com>
> wrote:
>> I also try:
>> -filter:v select=mod'(n,372)',crop=in_w-20::11:,scale=320:240
>> but it's the same
>>
>> [Parsed_select_0 @ 0x543d35fc90] [Eval @ 0x3bd5b30b370] Missing ')' or
>> too many args in 'mod(n'
>> [Parsed_select_0 @ 0x543d35fc90] Error while parsing expression 'mod(n'
>> [AVFilterGraph @ 0x543d2dfed0] Error initializing filter 'select' with
>> args 'mod(n'
>
> You need to add '\' after every ',' in expressions.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list