[FFmpeg-user] sendcmd and overlay

Paul B Mahol onemda at gmail.com
Sat Feb 1 22:16:14 EET 2020


On 2/1/20, Michael Koch <astroelectronic at t-online.de> wrote:
> I want to use sendcmd to set the x,y coordinates of the overlay filter.
> If I write sendcmd before overlay, I get this error message:
> Too many inputs specified for the "sendcmd" filter.
> But the two inputs are required for the overlay filter. How can this
> problem be solved?
>

Simply put it before one of inputs.

> Console output is below.
>
> Michael
>
>
> F:\Test>c:\ffmpeg\ffmpeg -i main.mov -i lp.mp4 -filter_complex "[1
> ]scale=100:100[2];[0][2]sendcmd=f=test.cmd,overlay=x='':y=''" -c:v mpeg4
> -q:v 2
> -t 8 -y out.mp4
> ffmpeg version git-2020-01-31-62d92a8 Copyright (c) 2000-2020 the FFmpeg
> develop
> ers
>    built with gcc 9.2.1 (GCC) 20200122
>    configuration: --enable-gpl --enable-version3 --enable-sdl2
> --enable-fontconfi
> g --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d
> --enable-libb
> luray --enable-libfreetype --enable-libmp3lame
> --enable-libopencore-amrnb --enab
> le-libopencore-amrwb --enable-libopenjpeg --enable-libopus
> --enable-libshine --e
> nable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame
> --enable
> -libvpx --enable-libwavpack --enable-libwebp --enable-libx264
> --enable-libx265 -
> -enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib
> --enable-gmp --enab
> le-libvidstab --enable-libvorbis --enable-libvo-amrwbenc
> --enable-libmysofa --en
> able-libspeex --enable-libxvid --enable-libaom --enable-libmfx
> --enable-ffnvcode
> c --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec
> --enable-dxva2 -
> -enable-avisynth --enable-libopenmpt --enable-amf
>    libavutil      56. 38.100 / 56. 38.100
>    libavcodec     58. 67.100 / 58. 67.100
>    libavformat    58. 37.100 / 58. 37.100
>    libavdevice    58.  9.103 / 58.  9.103
>    libavfilter     7. 72.100 /  7. 72.100
>    libswscale      5.  6.100 /  5.  6.100
>    libswresample   3.  6.100 /  3.  6.100
>    libpostproc    55.  6.100 / 55.  6.100
> [mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000120980] st: 0 edit list: 1 Missing
> key fram
> e while searching for timestamp: 3600
> [mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000120980] st: 0 edit list 1 Cannot
> find an in
> dex entry before timestamp: 3600.
> Guessed Channel Layout for Input Stream #0.1 : stereo
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'main.mov':
>    Metadata:
>      major_brand     : qt
>      minor_version   : 537986816
>      compatible_brands: qt  pana
>      creation_time   : 2019-08-29T17:38:28.000000Z
>      com.panasonic.Semi-Pro.metadata.xml: <?xml version="1.0"
> encoding="UTF-8" st
> andalone="no" ?>
>                      : <ClipMain
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-inst
> ance" xmlns="urn:schemas-Professional-Plug-in:Semi-Pro:ClipMetadata:v1.0">
>                      :   <ClipContent>
>                      :
> <GlobalClipID>060A2B340101010501010D21130000005767E053
> 00BB5534667A1060C1650131</GlobalClipID>
>                      :     <Duration>504</Duration>
>                      :     <EditUnit>1/50</EditUnit>
>                      :     <EssenceList>
>                      :       <Video>
>                      :         <Codec BitRate="150">H264_420_LongGOP</Codec>
>                      : <ActiveLine>2160</ActiveLine>
>                      : <ActivePixel>3840</ActivePixel>
>                      :         <BitDepth>8</BitDepth>
>                      :         <FrameRate>50p</FrameRate>
>                      : <TimecodeType>NonDrop</TimecodeType>
>                      : <StartTimecode>17:22:03:10</StartTimecode>
>                      :       </Video>
>                      :       <Audio>
>                      :         <Channel>2</Channel>
>                      : <SamplingRate>48000</SamplingRate>
>                      : <BitsPerSample>16</BitsPerSample>
>                      :       </Audio>
>                      :     </EssenceList>
>                      :     <ClipMetadata>
>                      :       <Rating>0</Rating>
>                      :       <Access>
>                      : <CreationDate>2019-08-29T17:38:28+02:00</CreationD
> ate>
>                      : <LastUpdateDate>2019-08-29T17:38:28+02:00</LastUpd
> ateDate>
>                      :       </Access>
>                      :       <Device>
>                      : <Manufacturer>Panasonic</Manufacturer>
>                      : <ModelName>DC-GH5S</ModelName>
>                      :       </Device>
>                      :       <Shoot>
>                      : <StartDate>2019-08-29T17:38:28+02:00</StartDate>
>                      :       </Shoot>
>                      :     </ClipMetadata>
>                      :   </ClipContent>
>                      :   <UserArea>
>                      :     <AcquisitionMetadata
> xmlns="urn:schemas-Professional-P
> lug-in:P2:CameraMetadata:v1.2">
>                      :       <CameraUnitMetadata>
>                      :         <Gamma>
>                      : <CaptureGamma>STANDARD</CaptureGamma>
>                      :         </Gamma>
>                      :         <Gamut>
>                      : <CaptureGamut>BT.709</CaptureGamut>
>                      :         </Gamut>
>                      :       </CameraUnitMetadata>
>                      :     </AcquisitionMetadata>
>                      :   </UserArea>
>                      : </ClipMain>
>                      :
>    Duration: 00:00:10.08, start: 0.000000, bitrate: 145991 kb/s
>      Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661),
> yuv420p(tv, bt709)
> , 3840x2160 [SAR 1:1 DAR 16:9], 144245 kb/s, 50 fps, 50 tbr, 180k tbn,
> 100 tbc (
> default)
>      Metadata:
>        creation_time   : 2019-08-29T17:38:28.000000Z
>        timecode        : 08:41:01:35
>      Stream #0:1(und): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz,
> stereo, s1
> 6, 1536 kb/s (default)
>      Metadata:
>        creation_time   : 2019-08-29T17:38:28.000000Z
>        timecode        : 08:41:01:35
>      Stream #0:2(und): Data: none (tmcd / 0x64636D74), 1 kb/s (default)
>      Metadata:
>        creation_time   : 2019-08-29T17:38:28.000000Z
>        timecode        : 08:41:01:35
> Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'lp.mp4':
>    Metadata:
>      major_brand     : isom
>      minor_version   : 512
>      compatible_brands: isomiso2avc1mp41
>      encoder         : Lavf58.36.100
>    Duration: 00:00:08.02, start: 0.000000, bitrate: 12308 kb/s
>      Stream #1:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
> 1920x1920
> , 12206 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
>      Metadata:
>        handler_name    : Video Handler
>      Stream #1:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz,
> stereo, flt
> p, 128 kb/s (default)
>      Metadata:
>        handler_name    : Audio Handler
> [AVFilterGraph @ 00000000073d18c0] Too many inputs specified for the
> "sendcmd" f
> ilter.
> Error initializing complex filters.
> Invalid argument
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list