
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (62)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...) -
Les statuts des instances de mutualisation
13 mars 2010, parPour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)
Sur d’autres sites (8815)
-
ErrorCode 1 while merging 2 videos
10 janvier 2023, par Stéphane de LucaI am trying to merge two videos but have an error code 1.


My command is as follows :


final command =
 '-y $commandPaths -filter_complex \'[0:0][1:0]concat=n=${paths.length}:v=1:a=0[out]\' -map \'[out]\' $outputPath';



I see the following error :




I/flutter (17343) : Stream specifier ':0' in filtergraph description [0:0][1:0]concat=n=2:v=1:a=0[out] matches no streams.




Not easy to understand what caused this as I am not familiar with the lib.


I saw in a so that someone had the issue caused by the tw videos not having the same size.


The logs are as follows :


I/flutter (17343): Duration: 2.9345
I/flutter (17343): /data/user/0/com.example.shokaze/cache/PXL_20230104_041034414.TS.mp4 exists?: true
I/flutter (17343): Duration: 3.0677
I/flutter (17343): /data/user/0/com.example.shokaze/cache/PXL_20230104_041054379.TS.mp4 exists?: true
I/flutter (17343): Output duration; 6.0022


I/flutter (17343): About to executing: -y -i /data/user/0/com.example.shokaze/cache/PXL_20230104_041034414.TS.mp4 -i /data/user/0/com.example.shokaze/cache/PXL_20230104_041054379.TS.mp4 -filter_complex '[0:0][1:0]concat=n=2:v=1:a=0[out]' -map '[out]' /data/user/0/com.example.shokaze/app_flutter/output.mp4



I/flutter (17343): ffmpeg version n5.1.2
I/flutter (17343): Copyright (c) 2000-2022 the FFmpeg developers
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): built with Android (7155654, based on r399163b1) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)
I/flutter (17343): 
I/flutter (17343): configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/ffmpeg-kit/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --target-os=android --enable-neon --enable-asm --enable-inline-asm --ar=aarch64-linux-android-ar --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang++ --ranlib=aarch64-linux-android-ranlib --strip=aarch64-linux-android-strip --nm=aarch64-linux-android-nm --extra-libs='-L/home/taner/Projects/ffmpeg-kit/prebuilt/android-arm64/cpu-features/lib -lndk_compat' --disable-autodetect --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --disable-static --enable-shared --enable-pthreads --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disab
I/flutter (17343): 
I/flutter (17343): libavutil 57. 28.100 / 57. 28.100
I/flutter (17343): 
I/flutter (17343): libavcodec 59. 37.100 / 59. 37.100
I/flutter (17343): 
I/flutter (17343): libavformat 59. 27.100 / 59. 27.100
I/flutter (17343): 
I/flutter (17343): libavdevice 59. 7.100 / 59. 7.100
I/flutter (17343): 
I/flutter (17343): libavfilter 8. 44.100 / 8. 44.100
I/flutter (17343): 
I/flutter (17343): libswscale 6. 7.100 / 6. 7.100
I/flutter (17343): 
I/flutter (17343): libswresample 4. 7.100 / 4. 7.100
I/flutter (17343): 
I/flutter (17343): Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/data/user/0/com.example.shokaze/cache/PXL_20230104_041034414.TS.mp4':
I/flutter (17343): 
I/flutter (17343): Metadata:
I/flutter (17343): 
I/flutter (17343): major_brand : 
I/flutter (17343): isom
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): minor_version : 
I/flutter (17343): 131072
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): compatible_brands: 
I/flutter (17343): isomiso2mp41
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): creation_time : 
I/flutter (17343): 2023-01-04T04:10:38.000000Z
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): location : 
I/flutter (17343): +48.8638+2.4376/
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): location-eng : 
I/flutter (17343): +48.8638+2.4376/
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): com.android.capture.fps: 
I/flutter (17343): 30.000000
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Duration: 
I/flutter (17343): 00:00:02.93
I/flutter (17343): , start: 
I/flutter (17343): 0.000000
I/flutter (17343): , bitrate: 
I/flutter (17343): 19691 kb/s
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Stream #0:0
I/flutter (17343): [0x1]
I/flutter (17343): (eng)
I/flutter (17343): : Data: none (mett / 0x7474656D), 53 kb/s
I/flutter (17343): (default)
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Metadata:
I/flutter (17343): 
I/flutter (17343): creation_time : 
I/flutter (17343): 2023-01-04T04:10:38.000000Z
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): handler_name : 
I/flutter (17343): MetaHandle
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Stream #0:1
I/flutter (17343): [0x2]
I/flutter (17343): (eng)
I/flutter (17343): : Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 191 kb/s
I/flutter (17343): (default)
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Metadata:
I/flutter (17343): 
I/flutter (17343): creation_time : 
I/flutter (17343): 2023-01-04T04:10:38.000000Z
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): handler_name : 
I/flutter (17343): SoundHandle
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): vendor_id : 
I/flutter (17343): [0][0][0][0]
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Stream #0:2
I/flutter (17343): [0x3]
I/flutter (17343): (eng)
I/flutter (17343): : Video: hevc (hvc1 / 0x31637668), yuvj420p(pc, bt709), 1920x1080, 19436 kb/s
I/flutter (17343): , SAR 1:1 DAR 16:9
I/flutter (17343): , 
I/flutter (17343): 29.99 fps, 
I/flutter (17343): 30 tbr, 
I/flutter (17343): 90k tbn
I/flutter (17343): (default)
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Metadata:
I/flutter (17343): 
I/flutter (17343): creation_time : 
I/flutter (17343): 2023-01-04T04:10:38.000000Z
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): handler_name : 
I/flutter (17343): VideoHandle
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): vendor_id : 
I/flutter (17343): [0][0][0][0]
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Stream #0:3
I/flutter (17343): [0x4]
I/flutter (17343): (eng)
I/flutter (17343): : Data: none (mett / 0x7474656D)
I/flutter (17343): (default)
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Metadata:
I/flutter (17343): 
I/flutter (17343): creation_time : 
I/flutter (17343): 2023-01-04T04:10:38.000000Z
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): handler_name : 
I/flutter (17343): MetaHandle
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/data/user/0/com.example.shokaze/cache/PXL_20230104_041054379.TS.mp4':
I/flutter (17343): 
I/flutter (17343): Metadata:
I/flutter (17343): 
I/flutter (17343): major_brand : 
I/flutter (17343): isom
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): minor_version : 
I/flutter (17343): 131072
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): compatible_brands: 
I/flutter (17343): isomiso2mp41
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): creation_time : 
I/flutter (17343): 2023-01-04T04:10:58.000000Z
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): location : 
I/flutter (17343): +48.8638+2.4376/
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): location-eng : 
I/flutter (17343): +48.8638+2.4376/
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): com.android.capture.fps: 
I/flutter (17343): 30.000000
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Duration: 
I/flutter (17343): 00:00:03.07
I/flutter (17343): , start: 
I/flutter (17343): 0.000000
I/flutter (17343): , bitrate: 
I/flutter (17343): 20104 kb/s
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Stream #1:0
I/flutter (17343): [0x1]
I/flutter (17343): (eng)
I/flutter (17343): : Data: none (mett / 0x7474656D), 54 kb/s
I/flutter (17343): (default)
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Metadata:
I/flutter (17343): 
I/flutter (17343): creation_time : 
I/flutter (17343): 2023-01-04T04:10:58.000000Z
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): handler_name : 
I/flutter (17343): MetaHandle
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Stream #1:1
I/flutter (17343): [0x2]
I/flutter (17343): (eng)
I/flutter (17343): : Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 191 kb/s
I/flutter (17343): (default)
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Metadata:
I/flutter (17343): 
I/flutter (17343): creation_time : 
I/flutter (17343): 2023-01-04T04:10:58.000000Z
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): handler_name : 
I/flutter (17343): SoundHandle
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): vendor_id : 
I/flutter (17343): [0][0][0][0]
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Stream #1:2
I/flutter (17343): [0x3]
I/flutter (17343): (eng)
I/flutter (17343): : Video: hevc (hvc1 / 0x31637668), yuvj420p(pc, bt709), 1920x1080, 19848 kb/s
I/flutter (17343): , SAR 1:1 DAR 16:9
I/flutter (17343): , 
I/flutter (17343): 29.99 fps, 
I/flutter (17343): 30 tbr, 
I/flutter (17343): 90k tbn
I/flutter (17343): (default)
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Metadata:
I/flutter (17343): 
I/flutter (17343): creation_time : 
I/flutter (17343): 2023-01-04T04:10:58.000000Z
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): handler_name : 
I/flutter (17343): VideoHandle
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): vendor_id : 
I/flutter (17343): [0][0][0][0]
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Side data:
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): displaymatrix: rotation of -90.00 degrees
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Stream #1:3
I/flutter (17343): [0x4]
I/flutter (17343): (eng)
I/flutter (17343): : Data: none (mett / 0x7474656D)
I/flutter (17343): (default)
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Metadata:
I/flutter (17343): 
I/flutter (17343): creation_time : 
I/flutter (17343): 2023-01-04T04:10:58.000000Z
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): handler_name : 
I/flutter (17343): MetaHandle
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Stream specifier ':0' in filtergraph description [0:0][1:0]concat=n=2:v=1:a=0[out] matches no streams.
I/flutter (17343): 
I/flutter (17343): executing: -y -i /data/user/0/com.example.shokaze/cache/PXL_20230104_041034414.TS.mp4 -i /data/user/0/com.example.shokaze/cache/PXL_20230104_041054379.TS.mp4 -filter_complex '[0:0][1:0]concat=n=2:v=1:a=0[out]' -map '[out]' /data/user/0/com.example.shokaze/app_flutter/output.mp4
I/flutter (17343): error 1



Therefore I tried to add a resize in the command without success as follows :.


final command =
 '$commandPaths -filter_complex \'[0:v]scale=1920:1080[0:a] [1:v]scale=1920:1080[1:a] concat=n=${paths.length}:v=1:a=1[v][a]\' -map \'[v]\' -map \'[a]\' $outputPath';




This time the logs say :




I/flutter (17343) : [AVFilterGraph @ 0xb4000074ea6265f0] No output pad can be associated to link label '1:v'.




The logs are as follows :


I/flutter (17343): Duration: 2.9345
I/flutter (17343): /data/user/0/com.example.shokaze/cache/PXL_20230104_041034414.TS.mp4 exists?: true
I/flutter (17343): Duration: 3.0677
I/flutter (17343): /data/user/0/com.example.shokaze/cache/PXL_20230104_041054379.TS.mp4 exists?: true
I/flutter (17343): Output duration; 6.0022
I/flutter (17343): About to executing: -i /data/user/0/com.example.shokaze/cache/PXL_20230104_041034414.TS.mp4 -i /data/user/0/com.example.shokaze/cache/PXL_20230104_041054379.TS.mp4 -filter_complex '[0:v]scale=1920:1080[0:a] [1:v]scale=1920:1080[1:a] concat=n=2:v=1:a=1[v][a]' -map '[v]' -map '[a]' /data/user/0/com.example.shokaze/app_flutter/output.mp4
I/flutter (17343): ffmpeg version n5.1.2
I/flutter (17343): Copyright (c) 2000-2022 the FFmpeg developers
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): built with Android (7155654, based on r399163b1) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)
I/flutter (17343): 
I/flutter (17343): configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/ffmpeg-kit/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --target-os=android --enable-neon --enable-asm --enable-inline-asm --ar=aarch64-linux-android-ar --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang++ --ranlib=aarch64-linux-android-ranlib --strip=aarch64-linux-android-strip --nm=aarch64-linux-android-nm --extra-libs='-L/home/taner/Projects/ffmpeg-kit/prebuilt/android-arm64/cpu-features/lib -lndk_compat' --disable-autodetect --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --disable-static --enable-shared --enable-pthreads --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disab
I/flutter (17343): 
I/flutter (17343): libavutil 57. 28.100 / 57. 28.100
I/flutter (17343): 
I/flutter (17343): libavcodec 59. 37.100 / 59. 37.100
I/flutter (17343): 
I/flutter (17343): libavformat 59. 27.100 / 59. 27.100
I/flutter (17343): 
I/flutter (17343): libavdevice 59. 7.100 / 59. 7.100
I/flutter (17343): 
I/flutter (17343): libavfilter 8. 44.100 / 8. 44.100
I/flutter (17343): 
I/flutter (17343): libswscale 6. 7.100 / 6. 7.100
I/flutter (17343): 
I/flutter (17343): libswresample 4. 7.100 / 4. 7.100
I/flutter (17343): 
I/flutter (17343): Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/data/user/0/com.example.shokaze/cache/PXL_20230104_041034414.TS.mp4':
I/flutter (17343): 
I/flutter (17343): Metadata:
I/flutter (17343): 
I/flutter (17343): major_brand : 
I/flutter (17343): isom
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): minor_version : 
I/flutter (17343): 131072
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): compatible_brands: 
I/flutter (17343): isomiso2mp41
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): creation_time : 
I/flutter (17343): 2023-01-04T04:10:38.000000Z
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): location : 
I/flutter (17343): +48.8638+2.4376/
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): location-eng : 
I/flutter (17343): +48.8638+2.4376/
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): com.android.capture.fps: 
I/flutter (17343): 30.000000
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Duration: 
I/flutter (17343): 00:00:02.93
I/flutter (17343): , start: 
I/flutter (17343): 0.000000
I/flutter (17343): , bitrate: 
I/flutter (17343): 19691 kb/s
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Stream #0:0
I/flutter (17343): [0x1]
I/flutter (17343): (eng)
I/flutter (17343): : Data: none (mett / 0x7474656D), 53 kb/s
I/flutter (17343): (default)
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Metadata:
I/flutter (17343): 
I/flutter (17343): creation_time : 
I/flutter (17343): 2023-01-04T04:10:38.000000Z
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): handler_name : 
I/flutter (17343): MetaHandle
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Stream #0:1
I/flutter (17343): [0x2]
I/flutter (17343): (eng)
I/flutter (17343): : Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 191 kb/s
I/flutter (17343): (default)
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Metadata:
I/flutter (17343): 
I/flutter (17343): creation_time : 
I/flutter (17343): 2023-01-04T04:10:38.000000Z
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): handler_name : 
I/flutter (17343): SoundHandle
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): vendor_id : 
I/flutter (17343): [0][0][0][0]
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Stream #0:2
I/flutter (17343): [0x3]
I/flutter (17343): (eng)
I/flutter (17343): : Video: hevc (hvc1 / 0x31637668), yuvj420p(pc, bt709), 1920x1080, 19436 kb/s
I/flutter (17343): , SAR 1:1 DAR 16:9
I/flutter (17343): , 
I/flutter (17343): 29.99 fps, 
I/flutter (17343): 30 tbr, 
I/flutter (17343): 90k tbn
I/flutter (17343): (default)
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Metadata:
I/flutter (17343): 
I/flutter (17343): creation_time : 
I/flutter (17343): 2023-01-04T04:10:38.000000Z
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): handler_name : 
I/flutter (17343): VideoHandle
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): vendor_id : 
I/flutter (17343): [0][0][0][0]
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Stream #0:3
I/flutter (17343): [0x4]
I/flutter (17343): (eng)
I/flutter (17343): : Data: none (mett / 0x7474656D)
I/flutter (17343): (default)
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Metadata:
I/flutter (17343): 
I/flutter (17343): creation_time : 
I/flutter (17343): 2023-01-04T04:10:38.000000Z
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): handler_name : 
I/flutter (17343): MetaHandle
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/data/user/0/com.example.shokaze/cache/PXL_20230104_041054379.TS.mp4':
I/flutter (17343): 
I/flutter (17343): Metadata:
I/flutter (17343): 
I/flutter (17343): major_brand : 
I/flutter (17343): isom
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): minor_version : 
I/flutter (17343): 131072
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): compatible_brands: 
I/flutter (17343): isomiso2mp41
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): creation_time : 
I/flutter (17343): 2023-01-04T04:10:58.000000Z
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): location : 
I/flutter (17343): +48.8638+2.4376/
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): location-eng : 
I/flutter (17343): +48.8638+2.4376/
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): com.android.capture.fps: 
I/flutter (17343): 30.000000
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Duration: 
I/flutter (17343): 00:00:03.07
I/flutter (17343): , start: 
I/flutter (17343): 0.000000
I/flutter (17343): , bitrate: 
I/flutter (17343): 20104 kb/s
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Stream #1:0
I/flutter (17343): [0x1]
I/flutter (17343): (eng)
I/flutter (17343): : Data: none (mett / 0x7474656D), 54 kb/s
I/flutter (17343): (default)
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Metadata:
I/flutter (17343): 
I/flutter (17343): creation_time : 
I/flutter (17343): 2023-01-04T04:10:58.000000Z
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): handler_name : 
I/flutter (17343): MetaHandle
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Stream #1:1
I/flutter (17343): [0x2]
I/flutter (17343): (eng)
I/flutter (17343): : Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 191 kb/s
I/flutter (17343): (default)
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Metadata:
I/flutter (17343): 
I/flutter (17343): creation_time : 
I/flutter (17343): 2023-01-04T04:10:58.000000Z
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): handler_name : 
I/flutter (17343): SoundHandle
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): vendor_id : 
I/flutter (17343): [0][0][0][0]
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Stream #1:2
I/flutter (17343): [0x3]
I/flutter (17343): (eng)
I/flutter (17343): : Video: hevc (hvc1 / 0x31637668), yuvj420p(pc, bt709), 1920x1080, 19848 kb/s
I/flutter (17343): , SAR 1:1 DAR 16:9
I/flutter (17343): , 
I/flutter (17343): 29.99 fps, 
I/flutter (17343): 30 tbr, 
I/flutter (17343): 90k tbn
I/flutter (17343): (default)
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Metadata:
I/flutter (17343): 
I/flutter (17343): creation_time : 
I/flutter (17343): 2023-01-04T04:10:58.000000Z
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): handler_name : 
I/flutter (17343): VideoHandle
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): vendor_id : 
I/flutter (17343): [0][0][0][0]
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Side data:
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): displaymatrix: rotation of -90.00 degrees
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Stream #1:3
I/flutter (17343): [0x4]
I/flutter (17343): (eng)
I/flutter (17343): : Data: none (mett / 0x7474656D)
I/flutter (17343): (default)
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): Metadata:
I/flutter (17343): 
I/flutter (17343): creation_time : 
I/flutter (17343): 2023-01-04T04:10:58.000000Z
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): handler_name : 
I/flutter (17343): MetaHandle
I/flutter (17343): 
I/flutter (17343): 
I/flutter (17343): [AVFilterGraph @ 0xb4000074ea6265f0] No output pad can be associated to link label '1:v'.
I/flutter (17343): 
I/flutter (17343): Error initializing complex filters.
I/flutter (17343): 
I/flutter (17343): Invalid argument
I/flutter (17343): 
I/flutter (17343): Conversion failed!
I/flutter (17343): 
I/flutter (17343): executing: -i /data/user/0/com.example.shokaze/cache/PXL_20230104_041034414.TS.mp4 -i /data/user/0/com.example.shokaze/cache/PXL_20230104_041054379.TS.mp4 -filter_complex '[0:v]scale=1920:1080[0:a] [1:v]scale=1920:1080[1:a] concat=n=2:v=1:a=1[v][a]' -map '[v]' -map '[a]' /data/user/0/com.example.shokaze/app_flutter/output.mp4
I/flutter (17343): error 1



-
HOW TO APPLY TRANSITION EFFECTS IN FFMPEG ? [closed]
8 janvier 2023, par SMARTI have 7 videos with audio, i tried to apply transition effects on these files, written code in python for this , i got error .


python code :
import subprocess as sp


def runffmpeg(cmd):
 try:
 pipe = sp.Popen(cmd, stdout=sp.PIPE, stderr=sp.STDOUT,
 universal_newlines=True)
 
 ffmpeg_output, _ = pipe.communicate()
 
 print(ffmpeg_output)
 return (ffmpeg_output)
 
 except sp.CalledProcessError as err:
 print("FFmpeg stdout output on error:\n" + err.output)
 
 def get_duration(fn):
 cmd = (
 f"ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 {fn}")
 
 cmd1 = (
 f"ffprobe -v error -of flat=s_ -select_streams 1 -show_entries stream=duration -of default=noprint_wrappers=1:nokey=1 {fn}")
 try:
 pipe = sp.Popen(cmd, stdout=sp.PIPE, stderr=sp.STDOUT,
 universal_newlines=True)
 
 viddur, _ = pipe.communicate()
 
 print(viddur)
 
 pipe = sp.Popen(cmd1, stdout=sp.PIPE, stderr=sp.STDOUT,
 universal_newlines=True)
 
 auddur, _ = pipe.communicate()
 
 try:
 auddur = float(auddur.strip())
 except:
 auddur = 0
 
 print(auddur)
 
 # if (len(auddur) == 0):
 # auddur = 0
 
 return float(viddur.strip()), (auddur)
 
 except sp.CalledProcessError as err:
 print("FFmpeg stdout output on error:\n" + err.output)
 
 
 def trans(clips, effects, out="trans.mp4"):
 filtc = " [v1][v2]xfade=wipedown:duration=1:offset=4[x1];"
 i = 0
 fcv = ""
 fca = ""
 d1 = 0
 af = ""
 dur = []
 aud = []
 inp = ""
 j = 0
 print(len(clips))
 
 for x in clips:
 print(x[0])
 inp = (inp + " -i " + x)
 
 print(effects[0])
 print(x)
 
 v, a = get_duration(fn=x)
 dur.append(v)
 
 k = 0
 for x in dur:
 
 if (k == 0):
 fca = (fca + f"[{k}:a]adelay=0|0 [a{k+1}];")
 else:
 fca = (fca + f"[{k}:a]adelay={d1}|{d1} [a{k+1}];")
 aud.append(f"[a{k+1}]")
 k = (k+1)
 d1 = (d1+((x*1000)+3.5))
 
 d1 = 0
 for x in efects:
 for v in range(0, j+1, +1):
 d1 = (d1 + dur[v])
 d1 = (d1-((v+1)*3.5))
 # [0:a]adelay=0|0 [a1];
 if (i > 1):
 
 try:
 fcv = (
 fcv+f"[x{(i)}][{(i)}:v]xfade={x}:duration=3:offset={d1} [x{(i+1)}];")
 except:
 pass
 else:
 print("j = %d" % j)
 fcv = (
 fcv+f"[{(i)}:v][{(i+1)}:v]xfade={x}:duration=3:offset={d1} [x{(i+1)}];")
 
 j = (j+1)
 i = (i+1)
 
 for a in aud:
 af = (af+a)
 af = (af+f"amix=inputs={len(aud)} [faud]")
 
 inp = (inp+" -filter_complex \"")
 cmd = (
 f"ffmpeg {inp} {fcv} {fca} {af} \" -pix_fmt yuv420p -map \"[x{i}]\" -map \"[faud]\" -y {out}")
 
 print(cmd)
 
 try:
 pipe = sp.Popen(cmd, stdout=sp.PIPE, stderr=sp.STDOUT,
 universal_newlines=True)
 
 ffmpeg_output, _ = pipe.communicate()
 
 print(ffmpeg_output)
 
 except sp.CalledProcessError as err:
 print("FFmpeg stdout output on error:\n" + err.output)
 
 



these functions creates ffmpeg code like :
ffmpeg -i out1.mp4 -i out2.mp4 -i out3.mp4 -i out4.mp4 -i out5.mp4 -i out6.mp4 -i out7.mp4 -filter_complex " [0:v][1:v]xfade=wipedown:duration=3:offset=6.006009000000001 [x1] ;[1:v][2:v]xfade=dissolve:duration=3:offset=14.030023 [x2] ;[x2][2:v]xfade=pixelize:duration=3:offset=20.572042000000003 [x3] ;[x3][3:v]xfade=vuslice:duration=3:offset=21.621068000000008 [x4] ;[x4][4:v]xfade=radial:duration=3:offset=14.188099000000015 [x5] ;[x5][5:v]xfade=vertopen:duration=3:offset=-5.737862999999978 [x6] ; [0:a]adelay=0|0 [a1] ;[1:a]adelay=9509.509|9509.509 [a2] ;[2:a]adelay=18531.014000000003|18531.014000000003 [a3] ;[3:a]adelay=27552.519000000004|27552.519000000004 [a4] ;[4:a]adelay=36063.026000000005|36063.026000000005 [a5] ;[5:a]adelay=45084.531|45084.531 [a6] ;[6:a]adelay=53595.038|53595.038 [a7] ; [a1][a2][a3][a4][a5][a6][a7]amix=inputs=7 [faud] " -pix_fmt yuv420p -map "[x6]" -map "[faud]" -y trans.mp4


this ffmpeg command generates error :


ffmpeg version 2022-12-25-git-eeb280f351-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 12.1.0 (Rev2, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
 libavutil 57. 43.100 / 57. 43.100
 libavcodec 59. 55.103 / 59. 55.103
 libavformat 59. 34.102 / 59. 34.102
 libavdevice 59. 8.101 / 59. 8.101
 libavfilter 8. 53.100 / 8. 53.100
 libswscale 6. 8.112 / 6. 8.112
 libswresample 4. 9.100 / 4. 9.100
 libpostproc 56. 7.100 / 56. 7.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out1.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf59.34.102
 Duration: 00:00:09.51, start: 0.000000, bitrate: 1358 kb/s
 Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt470bg/unknown/unknown, progressive), 1080x1920, 1303 kb/s, 26.94 fps, 25 tbr, 1000k tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 encoder : Lavc59.55.103 libx264
 Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 51 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
 Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'out2.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf59.34.102
 Duration: 00:00:09.02, start: 0.000000, bitrate: 1060 kb/s
 Stream #1:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt470bg/unknown/unknown, progressive), 1080x1920, 1007 kb/s, 26.73 fps, 25 tbr, 1000k tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 encoder : Lavc59.55.103 libx264
 Stream #1:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 47 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
 Input #2, mov,mp4,m4a,3gp,3g2,mj2, from 'out3.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf59.34.102
 Duration: 00:00:09.02, start: 0.000000, bitrate: 1228 kb/s
 Stream #2:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt470bg/unknown/unknown, progressive), 1080x1920, 1178 kb/s, 26.73 fps, 25 tbr, 1000k tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 encoder : Lavc59.55.103 libx264
 Stream #2:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 46 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
 Input #3, mov,mp4,m4a,3gp,3g2,mj2, from 'out4.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf59.34.102
 Duration: 00:00:08.51, start: 0.000000, bitrate: 987 kb/s
 Stream #3:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt470bg/unknown/unknown, progressive), 1080x1920, 938 kb/s, 26.57 fps, 25 tbr, 1000k tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 encoder : Lavc59.55.103 libx264
 Stream #3:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 43 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
 Input #4, mov,mp4,m4a,3gp,3g2,mj2, from 'out5.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf59.34.102
 Duration: 00:00:09.02, start: 0.000000, bitrate: 1221 kb/s
 Stream #4:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt470bg/unknown/unknown, progressive), 1080x1920, 1170 kb/s, 26.73 fps, 25 tbr, 1000k tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 encoder : Lavc59.55.103 libx264
 Stream #4:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 47 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
 Input #5, mov,mp4,m4a,3gp,3g2,mj2, from 'out6.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf59.34.102
 Duration: 00:00:08.51, start: 0.000000, bitrate: 1073 kb/s
 Stream #5:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt470bg/unknown/unknown, progressive), 1080x1920, 1027 kb/s, 26.57 fps, 25 tbr, 1000k tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 encoder : Lavc59.55.103 libx264
 Stream #5:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 41 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
 Input #6, mov,mp4,m4a,3gp,3g2,mj2, from 'out7.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf59.34.102
 Duration: 00:00:09.02, start: 0.000000, bitrate: 757 kb/s
 Stream #6:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt470bg/unknown/unknown, progressive), 1080x1920, 705 kb/s, 26.73 fps, 25 tbr, 1000k tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 encoder : Lavc59.55.103 libx264
 Stream #6:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 46 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
 Filter xfade:default has an unconnected output



Filter xfade:default has an unconnected output , what does it mean ?


in adelay area , getting -ve nos , what to do ?


#useage :


vc = ["C1.mp4", "C2.mp4", "C3.mp4", "C4.mp4", "C5.mp4", "C6.mp4", "C7.mp4"]


i = 1
 gc = []
 for x in vc:
 gc.append(f"out{i}.mp4")
 i = (i+1)
 
 print(gc)
 
 trans(clips=gc, effects=efects)



system details :
windows 10 64 bits
python 3.9 64 bits


-
FFmpeg stdout emits more frames than it should
29 décembre 2022, par distanteI am running this command to get two images per second from an rtsp stream :


const ffmpeg = spawn(this.ffmpeg, [
 // Set the frame rate of the input video to 2 frames per second
 '-r',
 '2',
 // Specify that the RTSP stream should use TCP as the transport protocol
 '-rtsp_transport',
 'tcp',
 // Set the input source to the RTSP stream specified by the `rtspUrl` variable
 '-i',
 rtspUrl,
 // Set the video filter to only output two frames per second (final video)
 '-vf',
 'fps=2',
 // Set the output format to "image2pipe," which specifies that the output should be written to stdout as a series of images in a pipe
 '-f',
 'image2pipe',
 // Overwrite any existing output file without prompting for confirmation
 '-y',
 // Set the output destination to stdout
 '-',
 ]);




I am subscribing to the stdout and saving each emit into a file (just for testing, I need to process the data later)


let i = 0;
 from(ffmpeg.stdout)
 .pipe(
 concatMap((data) => {
 i++
 return writeFile(`file_${i}`, data).then(() => i);
 }),
 )
 .subscribe((i) => {
 this.imageLogger.log(`file_${i} saved`);
 });



The thing is, I am getting a lot more than 2 images per second :


i | [Nest] 431 - 12/28/2022, 1:16:09 PM LOG [Image Logger] stderr: ffmpeg version 5.0.1-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2022 the FFmpeg developers
api | built with gcc 8 (Debian 8.3.0-6)
api | configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
api | libavutil 57. 17.100 / 57. 17.100
api | libavcodec 59. 18.100 / 59. 18.100
api | libavformat 59. 16.100 / 59. 16.100
api | libavdevice 59. 4.100 / 59. 4.100
api | libavfilter 8. 24.100 / 8. 24.100
api | libswscale 6. 4.100 / 6. 4.100
api | libswresample 4. 3.100 / 4. 3.100
api | libpostproc 56. 3.100 / 56. 3.100
api | configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
api | libavutil 57. 17.100 / 57. 17.100
api | libavcodec 59. 18.100 / 59. 18.100
api | libavformat 59. 16.100 / 59. 16.100
api | libavdevice 59. 4.100 / 59. 4.100
api | libavfilter 8. 24.100 / 8. 24.100
api | libswscale 6. 4.100 / 6. 4.100
api | libswresample 4. 3.100 / 4. 3.100
api | libpostproc 56. 3.100 / 56. 3.100
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] stderr: Guessed Channel Layout for Input Stream #0.1 : mono
api | Input #0, rtsp, from 'rtsp://user:password@192.68.45.54:554/stream2':
api | Metadata:
api | title : Session streamed by "TP-LINK RTSP Server"
api | comment : stream2
api | Duration: N/A, start: 0.000000, bitrate: N/A
api | Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 640x360, 15 fps, 28.58 tbr, 90k tbn
api | Stream #0:1: Audio: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s
api |
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] stderr: Stream mapping:
api | Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
api | Press [q] to stop, [?] for help
api |
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] stderr: Output #0, image2pipe, to 'pipe:':
api | Metadata:
api | title : Session streamed by "TP-LINK RTSP Server"
api | comment : stream2
api | encoder : Lavf59.16.100
api | Stream #0:0: Video: mjpeg, yuvj420p(pc, bt709, progressive), 640x360, q=2-31, 200 kb/s, 2 fps, 2 tbn
api |
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] stderr: Metadata:
api | encoder : Lavc59.18.100 mjpeg
api | Side data:
api | cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] stderr: frame= 1 fps=0.0 q=5.0 size= 23kB time=00:00:00.50 bitrate= 383.9kbits/s speed=59.4x
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_1.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_2.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_3.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_4.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_5.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_6.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_7.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_8.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_9.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_10.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_11.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_12.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_13.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_14.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_15.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_16.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_17.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_18.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_19.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_20.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_21.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_22.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_23.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_24.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_25.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_26.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] stderr: frame= 27 fps=0.0 q=16.0 size= 559kB time=00:00:13.50 bitrate= 339.3kbits/s speed=25.3x
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_27.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_28.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_29.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_30.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_31.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:12 PM LOG [Image Logger] file_32.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:13 PM LOG [Image Logger] file_33.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:13 PM LOG [Image Logger] stderr: frame= 34 fps= 33 q=16.6 size= 632kB time=00:00:17.00 bitrate= 304.6kbits/s speed=16.3x
api | [Nest] 431 - 12/28/2022, 1:16:13 PM LOG [Image Logger] file_34.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:13 PM LOG [Image Logger] file_35.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:13 PM LOG [Image Logger] file_36.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:13 PM LOG [Image Logger] file_37.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:13 PM LOG [Image Logger] file_38.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:13 PM LOG [Image Logger] file_39.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:13 PM LOG [Image Logger] file_40.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:13 PM LOG [Image Logger] file_41.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:13 PM LOG [Image Logger] stderr: frame= 41 fps= 26 q=16.5 size= 705kB time=00:00:20.50 bitrate= 281.7kbits/s speed=13.2x
api | [Nest] 431 - 12/28/2022, 1:16:13 PM LOG [Image Logger] file_42.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:13 PM LOG [Image Logger] file_43.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:13 PM LOG [Image Logger] file_44.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:13 PM LOG [Image Logger] file_45.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:13 PM LOG [Image Logger] file_46.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:14 PM LOG [Image Logger] file_47.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:14 PM LOG [Image Logger] file_48.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:14 PM LOG [Image Logger] stderr: frame= 48 fps= 23 q=16.4 size= 779kB time=00:00:24.00 bitrate= 265.9kbits/s speed=11.6x
api | [Nest] 431 - 12/28/2022, 1:16:14 PM LOG [Image Logger] file_49.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:14 PM LOG [Image Logger] file_50.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:14 PM LOG [Image Logger] file_51.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:14 PM LOG [Image Logger] file_52.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:14 PM LOG [Image Logger] file_53.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:14 PM LOG [Image Logger] file_54.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:14 PM LOG [Image Logger] file_55.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:14 PM LOG [Image Logger] stderr: frame= 56 fps= 22 q=16.1 size= 865kB time=00:00:28.00 bitrate= 253.0kbits/s speed=10.9x
api | [Nest] 431 - 12/28/2022, 1:16:14 PM LOG [Image Logger] file_56.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:14 PM LOG [Image Logger] file_57.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:14 PM LOG [Image Logger] file_58.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:14 PM LOG [Image Logger] file_59.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:14 PM LOG [Image Logger] file_60.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:15 PM LOG [Image Logger] file_61.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:15 PM LOG [Image Logger] file_62.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:15 PM LOG [Image Logger] file_63.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:15 PM LOG [Image Logger] stderr: frame= 63 fps= 20 q=15.5 size= 939kB time=00:00:31.50 bitrate= 244.3kbits/s speed=10.2x
api | [Nest] 431 - 12/28/2022, 1:16:15 PM LOG [Image Logger] file_64.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:15 PM LOG [Image Logger] file_65.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:15 PM LOG [Image Logger] file_66.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:15 PM LOG [Image Logger] file_67.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:15 PM LOG [Image Logger] file_68.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:15 PM LOG [Image Logger] file_69.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:15 PM LOG [Image Logger] file_70.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:15 PM LOG [Image Logger] stderr: frame= 70 fps= 19 q=15.4 size= 1017kB time=00:00:35.00 bitrate= 238.0kbits/s speed= 9.7x
api | [Nest] 431 - 12/28/2022, 1:16:15 PM LOG [Image Logger] file_71.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:15 PM LOG [Image Logger] file_72.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:15 PM LOG [Image Logger] file_73.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:15 PM LOG [Image Logger] file_74.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:15 PM LOG [Image Logger] file_75.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:16 PM LOG [Image Logger] file_76.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:16 PM LOG [Image Logger] file_77.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:16 PM LOG [Image Logger] stderr: frame= 78 fps= 19 q=15.1 size= 1106kB time=00:00:39.00 bitrate= 232.4kbits/s speed=9.48x
api | [Nest] 431 - 12/28/2022, 1:16:16 PM LOG [Image Logger] file_78.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:16 PM LOG [Image Logger] file_79.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:16 PM LOG [Image Logger] file_80.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:16 PM LOG [Image Logger] file_81.jpg saved
api | [Nest] 431 - 12/28/2022, 1:16:16 PM LOG [Image Logger] file_82.jpg saved



Am I missing some part ? why I do not only get 2 stdout events pro second ?


Edit :


ffmpeg version 5.0.1-static
node : 18.12.1


Edit 2 :


When I run this command on the terminal :


ffmpeg -r 2 -rtsp_transport tcp -i "rtsp://user:password@192.68.45.54:554/stream2" -vf fps=2 -timecode 00:00:00:00 test.mp4



The generated video has a frame rate of 2 but it looks like it is in slow motion. Since the source video has also a timer, I see how it takes something like 12 "frames" to go from one second to another.


This is the output :


fmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
 built with Apple clang version 14.0.0 (clang-1400.0.29.202)
 configuration: --prefix=/usr/local/Cellar/ffmpeg/5.1.2_1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
 libavutil 57. 28.100 / 57. 28.100
 libavcodec 59. 37.100 / 59. 37.100
 libavformat 59. 27.100 / 59. 27.100
 libavdevice 59. 7.100 / 59. 7.100
 libavfilter 8. 44.100 / 8. 44.100
 libswscale 6. 7.100 / 6. 7.100
 libswresample 4. 7.100 / 4. 7.100
 libpostproc 56. 6.100 / 56. 6.100
Input #0, rtsp, from 'rtsp://user:password@192.68.45.54:554/stream2':
 Metadata:
 title : Session streamed by "TP-LINK RTSP Server"
 comment : stream2
 Duration: N/A, start: 0.000000, bitrate: N/A
 Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 640x360, 15 fps, 28.58 tbr, 90k tbn
 Stream #0:1: Audio: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s
File 'test.mp4' already exists. Overwrite? [y/N] y
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
 Stream #0:1 -> #0:1 (pcm_alaw (native) -> aac (native))
Press [q] to stop, [?] for help
[aac @ 0x7fa79fb061c0] Too many bits 8832.000000 > 6144 per frame requested, clamping to max
[libx264 @ 0x7fa79fb04e00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fa79fb04e00] profile High, level 2.2, 4:2:0, 8-bit
[libx264 @ 0x7fa79fb04e00] 264 - core 164 r3095 baee400 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=11 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=2 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[mp4 @ 0x7fa78f104780] Using non-standard frame rate 2/1
 Last message repeated 1 times
Output #0, mp4, to 'test.mp4':
 Metadata:
 title : Session streamed by "TP-LINK RTSP Server"
 comment : stream2
 timecode : 00:00:00:00
 encoder : Lavf59.27.100
 Stream #0:0: Video: h264 (avc1 / 0x31637661), yuvj420p(pc, bt709, progressive), 640x360, q=2-31, 2 fps, 16384 tbn
 Metadata:
 encoder : Lavc59.37.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
 Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 8000 Hz, mono, fltp, 48 kb/s
 Metadata:
 encoder : Lavc59.37.100 aac
frame= 186 fps= 28 q=20.0 size= 256kB time=00:01:04.00 bitrate= 32.8kbits/s speed=9.58x

[q] command received. Exiting.

frame= 190 fps= 27 q=-1.0 Lsize= 749kB time=00:01:33.50 bitrate= 65.6kbits/s speed=13.2x
video:708kB audio:35kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.836704%
[libx264 @ 0x7fa79fb04e00] frame I:1 Avg QP:10.13 size: 45352
[libx264 @ 0x7fa79fb04e00] frame P:74 Avg QP:12.27 size: 7161
[libx264 @ 0x7fa79fb04e00] frame B:115 Avg QP:22.28 size: 1294
[libx264 @ 0x7fa79fb04e00] consecutive B-frames: 14.7% 9.5% 12.6% 63.2%
[libx264 @ 0x7fa79fb04e00] mb I I16..4: 15.0% 14.0% 71.0%
[libx264 @ 0x7fa79fb04e00] mb P I16..4: 0.6% 1.5% 2.4% P16..4: 20.4% 4.9% 5.9% 0.0% 0.0% skip:64.3%
[libx264 @ 0x7fa79fb04e00] mb B I16..4: 0.0% 0.1% 0.3% B16..8: 15.9% 2.4% 1.5% direct: 0.9% skip:78.9% L0:45.5% L1:48.6% BI: 5.9%
[libx264 @ 0x7fa79fb04e00] 8x8 transform intra:27.4% inter:64.7%
[libx264 @ 0x7fa79fb04e00] coded y,uvDC,uvAC intra: 81.7% 60.2% 46.5% inter: 9.4% 4.2% 1.5%
[libx264 @ 0x7fa79fb04e00] i16 v,h,dc,p: 44% 10% 19% 27%
[libx264 @ 0x7fa79fb04e00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 52% 14% 13% 3% 2% 3% 3% 5% 4%
[libx264 @ 0x7fa79fb04e00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 35% 18% 13% 6% 5% 6% 5% 6% 7%
[libx264 @ 0x7fa79fb04e00] i8c dc,h,v,p: 45% 18% 27% 9%
[libx264 @ 0x7fa79fb04e00] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7fa79fb04e00] ref P L0: 78.9% 7.6% 11.4% 2.1%
[libx264 @ 0x7fa79fb04e00] ref B L0: 90.8% 8.0% 1.2%
[libx264 @ 0x7fa79fb04e00] ref B L1: 97.0% 3.0%
[libx264 @ 0x7fa79fb04e00] kb/s:60.98
[aac @ 0x7fa79fb061c0] Qavg: 64944.246