
Recherche avancée
Autres articles (79)
-
Les images
15 mai 2013 -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)
Sur d’autres sites (9214)
-
FFmpeg bug with a image that has a #ededed color
11 avril 2023, par Денис ВыхрыстюкI want to generate a video from images. When the pictures have a gray(#ededed) background then a strange error occurs, but when with other colors everything is good.


I will be grateful for any help.


I run the following commands :


./ffmpeg.exe -s 1080x1080 -framerate 1 -i ./scene0_%6d.png -crf 1 -c:v rawvideo -pix_fmt yuv420p ./result.yuv



./ffmpeg.exe -s 1080x1080 -framerate 1 -i ./result.yuv -c:v libx264 -crf 15 -preset veryslow -pix_fmt yuv420p -maxrate 900M -bufsize 12000k ./final.mp4



Result :


Error: Option framerate not found



FFmpeg version :


ffmpeg version N-110165-g9a245bdf5d-20230403 Copyright (c) 2000-2023 the FFmpeg developersbuilt with gcc 12.2.0 (crosstool-NG 1.25.0.152_89671bf)configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --disable-libmfx --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20230403 libavutil 58. 5.100 / 58. 5.100 libavcodec 60. 9.100 / 60. 9.100 libavformat 60. 4.101 / 60. 4.101 libavdevice 60. 2.100 / 60. 2.100 libavfilter 9. 5.100 / 9. 5.100 libswscale 7. 2.100 / 7. 2.100 libswresample 4. 11.100 / 4. 11.100libpostproc 57. 2.100 / 57. 2.100





I tried other colors and everything is fine. I expect that I will be able to combine the gray images to the video and that the desired color profile will be finded


-
How to get -vf to ffmpeg from powershell commandline without parsing
10 mai 2018, par TupsiI made a powershell function to recode video with some extra parameters. It basically makes a get-childitem in the directory and feeds every occurrence it finds to a foreach loop. This worked well as long as I have default values inside my function which gets fed to the ffmpeg string in the loop in case I do not provide anything on the commandline (like number of passes, audio quality etc.). Now I wanted to integrate the option to use the -vf ffmpeg filter option. My problem there is, that I usualy dont need that, so there is no sane default option I could use, so I can not have something like -vf $filteroption in my command line. So I am trying to figure out how to get that "-vf" inside the variable without powershell or ffmpeg screwing me over, because atm I get either the error of a missing - in what ffmpeg sees (I guess powershell parses this away) and when I \ escape the - I see it now in the ffmpeg line, but ffmpeg does not recognize it as single parameter.
examples which work :
&$encoder -hide_banner -i $i -c:v libvpx-vp9 -b:v 0 -crf $quality -tile-columns 6 -tile-rows 2 -threads 8 -speed 2 -frame-parallel 0 -row-mt 1 -c:a libopus -b:a $bitrate -af aformat=channel_layouts=$audio -c:s copy -auto-alt-ref 1 -lag-in-frames 25 -y $outfile;
here I provide $quality, $audio etc. with powershell parameters to the function like -quality 31 -audio stereo and it all works.
But now I need to get something like "
-vf scale=1920:-1
" or "" inside that line and that does not work with something like just this :&$encoder -hide_banner -i $i -c:v libvpx-vp9 -b:v 0 -crf $quality -tile-columns 6 -tile-rows 2 -threads 8 -speed 2 -frame-parallel 0 -row-mt 1 -c:a libopus -b:a $bitrate -af aformat=channel_layouts=$audio -c:s copy -auto-alt-ref 1 -lag-in-frames 25 -y $extra $outfile;
when I call the function with : "
RecodeVP9 -extra -vf scale=1920:-1
" powershell takes away the -, if I try it with escaping the - with - ffmpeg whines about it saying that "Unable to find a suitable output format for ’-vf’". I also tried "" and "-" with similiar results. So it seems that either powershell screws me over or ffmpeg.So to sum it up :
I need a way to get extra ffmpeg arguments WITH the parameter name itself from the powershell command line into my powershell function (like-vf scale=1920:-1
). -
ffmpeg command not interpreted correcly from cron
16 avril 2022, par Andre Lörchneron my raspberry pi I'm trying to run a script every 30 minutes that restarts a video stream. Reason is the stream is consistently running into hickups after roughly 35 minutes and stops a few minutes after.
I tried fixing the root problem without any success so far, so an easier and valid workaround is to just restart the stream.


I created a script
restart_stream.sh
that kills the previous stream and immediately starts it again.

#!/bin/bash

killall -r libcamera-vid ffmpeg
libcamera-vid -t 0 --framerate 30 --width 1280 --height 720 -b 2000000 -o - --nopreview | ffmpeg -f h264 -thread_queue_size 4096 -i - -f pulse -ar 44100 -ac 2 -acodec pcm_s16le -thread_queue_size 4096 -i default -vcodec copy -acodec aac -ab 128k -fflags genpts -fflags igndts -f fifo -fifo_format flv -map 0:v -map 1:a? -drop_pkts_on_overflow 1 -attempt_recovery 1 -recovery_wait_time 2 rtmp://a.rtmp.youtube.com/live2/<key>
</key>


cron job


*/30 7-19 * * * /bin/restart_stream.sh >/tmp/stream.log 2>&1



Running this script manually from the ssh console works perfectly fine but once I run it from cron it fails with the following error


[1:41:01.657471459] [2138] INFO RPI raspberrypi.cpp:1326 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unic>
[1:41:01.658232799] [2136] INFO Camera camera.cpp:1028 configuring streams: (0) 1280x720-YUV420
[1:41:01.659060988] [2138] INFO RPI raspberrypi.cpp:747 Sensor: /base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor >
[1:41:01.698525343] [2145] INFO IPARPI raspberrypi.cpp:626 Request ctrl: Saturation = 1.000000
[1:41:01.698798789] [2145] INFO IPARPI raspberrypi.cpp:626 Request ctrl: Contrast = 1.000000
[1:41:01.698840990] [2145] INFO IPARPI raspberrypi.cpp:626 Request ctrl: Brightness = 0.000000
[1:41:01.698877617] [2145] INFO IPARPI raspberrypi.cpp:626 Request ctrl: AwbMode = 0
[1:41:01.698910745] [2145] INFO IPARPI raspberrypi.cpp:626 Request ctrl: Sharpness = 1.000000
[1:41:01.698947187] [2145] INFO IPARPI raspberrypi.cpp:626 Request ctrl: ExposureValue = 0.000000
[1:41:01.698983203] [2145] INFO IPARPI raspberrypi.cpp:626 Request ctrl: AeExposureMode = 0
[1:41:01.699014646] [2145] INFO IPARPI raspberrypi.cpp:626 Request ctrl: FrameDurationLimits = [ 33333, 33333 ]
[1:41:01.699050903] [2145] INFO IPARPI raspberrypi.cpp:626 Request ctrl: AeMeteringMode = 0
[1:41:01.699082938] [2145] INFO IPARPI raspberrypi.cpp:626 Request ctrl: NoiseReductionMode = 1
ffmpeg version 4.3.3-0+rpt2+deb11u1 Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 10 (Raspbian 10.2.1-6+rpi1)
 configuration: --prefix=/usr --extra-version=0+rpt2+deb11u1 --toolchain=hardened --incdir=/usr/include/arm-linux-gn>
 WARNING: library configuration mismatch
 avutil configuration: --prefix=/usr --extra-version=0+rpt2+deb11u1 --toolchain=hardened --incdir=/usr/include/>
 avcodec configuration: --prefix=/usr --extra-version=0+rpt2+deb11u1 --toolchain=hardened --incdir=/usr/include/>
 avformat configuration: --prefix=/usr --extra-version=0+rpt2+deb11u1 --toolchain=hardened --incdir=/usr/include/>
 avdevice configuration: --prefix=/usr --extra-version=0+rpt2+deb11u1 --toolchain=hardened --incdir=/usr/include/>
 avfilter configuration: --prefix=/usr --extra-version=0+rpt2+deb11u1 --toolchain=hardened --incdir=/usr/include/>
 avresample configuration: --prefix=/usr --extra-version=0+rpt2+deb11u1 --toolchain=hardened --incdir=/usr/include/>
 swscale configuration: --prefix=/usr --extra-version=0+rpt2+deb11u1 --toolchain=hardened --incdir=/usr/include/>
 swresample configuration: --prefix=/usr --extra-version=0+rpt2+deb11u1 --toolchain=hardened --incdir=/usr/include/>
 postproc configuration: --prefix=/usr --extra-version=0+rpt2+deb11u1 --toolchain=hardened --incdir=/usr/include/>
 libavutil 56. 51.100 / 56. 51.100
 libavcodec 58. 91.100 / 58. 91.100
 libavformat 58. 45.100 / 58. 45.100
 libavdevice 58. 10.100 / 58. 10.100
 libavfilter 7. 85.100 / 7. 85.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 7.100 / 5. 7.100
 libswresample 3. 7.100 / 3. 7.100
 libpostproc 55. 7.100 / 55. 7.100
Input #0, h264, from 'pipe:':
 Duration: N/A, bitrate: N/A
 Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720, 30 fps, 30 tbr, 1200k tbn, 60 tbc
default: No such process



It seems to interpret the command differently and not treat
default
within the ffmpeg call as a parameter.