
Recherche avancée
Autres articles (81)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
Sur d’autres sites (7595)
-
How to apply multiple filters on a frame by AVFilterGraph of FFMPEG in c++
26 juillet 2022, par hameed abbasiI'm trying to do a "crop" and then "eq" filter on an AVFrame but seems i don't understand AVFiltergraph syntax. here is the code :


AVFrame *FFmpegDecoder::cropFrame(AVFrame *frame, int left, int top, int right, int bottom) {
AVFilterContext *buffersink_ctx;
AVFilterContext *buffersrc_ctx;
AVFilterGraph *filter_graph = avfilter_graph_alloc();
AVFrame *f = av_frame_alloc();
AVFilterInOut *inputs = NULL, *outputs = NULL;
char args[512];
int ret;
auto out_w = frame->width - left - right;
auto out_h = frame->height - top - bottom;
snprintf(args, sizeof(args),
 "buffer=video_size=%dx%d:pix_fmt=%d:time_base=1/1:pixel_aspect=0/1[src];"
 "[src]crop=x=%d:y=%d:out_w=%d:out_h=%d[cropped];"
 "[cropped]eq=brightness=0.06:saturation=2:contrast=1[out];"
 "[out]buffersink",
 frame->width, frame->height, frame->format,
 left, top, out_w, out_h);
ret = avfilter_graph_parse2(filter_graph, args, &inputs, &outputs);
if (ret < 0) return NULL;
assert(inputs == NULL && outputs == NULL);
ret = avfilter_graph_config(filter_graph, NULL);
if (ret < 0) return NULL;

buffersrc_ctx = avfilter_graph_get_filter(filter_graph, "Parsed_buffer_0");
buffersink_ctx = avfilter_graph_get_filter(filter_graph, "Parsed_buffersink_2");
assert(buffersrc_ctx != NULL);
assert(buffersink_ctx != NULL);

av_frame_ref(f, frame);
ret = av_buffersrc_add_frame(buffersrc_ctx, f);
if (ret < 0) return NULL;
ret = av_buffersink_get_frame(buffersink_ctx, f);
if (ret < 0) return NULL;

avfilter_graph_free(&filter_graph);

return f;



}


In addition, i've tried this :


"buffer=video_size=%dx%d:pix_fmt=%d:time_base=1/1:pixel_aspect=0/1[src] ;"


"[src]crop=x=%d:y=%d:out_w=%d:out_h=%d,eq=brightness=0.06:saturation=2:contrast=1[out] ;"


"[out]buffersink"


but no luck.
Thanks in advance.


-
ffmpeg install fail OSX 10.7.2
3 mars 2012, par egermanoCan you help me ?
I try to install a ffmpeg using a brew, but i can't.
It seems like the dependencies was successfully installed.
I am using a Mac OSX 10.7.2 and the XCode 4.2.1.
I couldn't install ffmpeg.
I've tried :
brew install ffmpeg
brew install --use-clang ffmpeg
brew install --use-clang --HEAD ffmpegAnd they've all failed.
This is the result log.
$ brew install --use-clang ffmpeg
==> Downloading http://ffmpeg.org/releases/ffmpeg-0.9.1.tar.bz2
File already downloaded in /Users/brunogermano/Library/Caches/Homebrew
==> ./configure --prefix=/usr/local/Cellar/ffmpeg/0.9.1 --enable-shared --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-libfreetype --cc=/usr/bi
ERROR: libmp3lame >= 3.98.3 not found
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
==> Exit Status: 1
http://github.com/mxcl/homebrew/blob/master/Library/Formula/ffmpeg.rb#L61
==> Environment
HOMEBREW_VERSION: 0.8.1
HEAD: 44213dfb4861c1307fdc4ae41e139404f0e1ffb1
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
Hardware: dual-core 64-bit penryn
OS X: 10.7.2
Kernel Architecture: x86_64
Ruby: 1.8.7-249
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode: 4.2.1
GCC-4.0: N/A
GCC-4.2: N/A
LLVM: build 2336
Clang: 3.0 build 211
MacPorts or Fink? false
X11 installed? true
==> Build Flags
"--use-clang" was specified
CC: /usr/bin/clang
CXX: /usr/bin/clang++ => /usr/bin/clang
LD: /usr/bin/clang
CFLAGS: -O3 -w -pipe -march=native
CXXFLAGS: -O3 -w -pipe -march=native
CPPFLAGS: -I/usr/X11/include
LDFLAGS: -L/usr/X11/lib
MAKEFLAGS: -j2
Error: Failed executing: ./configure --prefix=/usr/local/Cellar/ffmpeg/0.9.1 --enable-shared --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-libfreetype --cc=/usr/bin/clang --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libxvid --disable-ffplay
These existing issues may help you:
https://github.com/mxcl/homebrew/issues/8456
https://github.com/mxcl/homebrew/issues/8815
https://github.com/mxcl/homebrew/issues/9399
Otherwise, please report the bug:
https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue
We saved the configure log, please gist it if you report the issue:
~/Library/Logs/Homebrew/config.logThis is the brew doctor log :
$ brew doctor
Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libavcodec.52.108.0.dylib
/usr/local/lib/libavcore.0.16.1.dylib
/usr/local/lib/libavdevice.52.2.3.dylib
/usr/local/lib/libavfilter.1.74.0.dylib
/usr/local/lib/libavformat.52.93.0.dylib
/usr/local/lib/libavutil.50.36.0.dylib
/usr/local/lib/libfaad.2.0.0.dylib
/usr/local/lib/libguide.dylib
/usr/local/lib/libmp3lame.0.0.0.dylib
/usr/local/lib/libswscale.0.12.0.dylib
Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected static libraries:
/usr/local/lib/libavcodec.a
/usr/local/lib/libavcore.a
/usr/local/lib/libavdevice.a
/usr/local/lib/libavfilter.a
/usr/local/lib/libavformat.a
/usr/local/lib/libavutil.a
/usr/local/lib/libfaad.a
/usr/local/lib/libmp4ff.a
/usr/local/lib/libswscale.a
Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .pc files:
/usr/local/lib/pkgconfig/libavcodec.pc
/usr/local/lib/pkgconfig/libavcore.pc
/usr/local/lib/pkgconfig/libavdevice.pc
/usr/local/lib/pkgconfig/libavfilter.pc
/usr/local/lib/pkgconfig/libavformat.pc
/usr/local/lib/pkgconfig/libavutil.pc
/usr/local/lib/pkgconfig/libswscale.pc
Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .la files:
/usr/local/lib/libfaad.la
/usr/local/lib/libmp3lame.la
We couldn't detect gcc 4.2.x. Some formulae require this compiler.
NOTE: Versions of XCode newer than 4.2 don't include gcc 4.2.x.
==> /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. This is an issue if you eg. brew installed Python.
Consider editing your .bashrc to put:
/usr/local/bin
ahead of /usr/bin in your PATH.
Some brews install binaries to sbin instead of bin, but Homebrew's
sbin was not found in your path.
Consider editing your .bashrc to add:
/usr/local/sbin
to the PATH variable.
Some "config" scripts were found in your path, but not in system or Homebrew folders.
`./configure` scripts often look for *-config scripts to determine if software packages
are installed, and what additional flags to use when compiling and linking.
Having additional scripts in your path can confuse software installed via Homebrew if
the config script overrides a system or Homebrew provided script of the same name.
/Library/Frameworks/Python.framework/Versions/Current/bin
python-config python2.5-configAnyone can help me ?
-
ffmpeg try to open output file but fail [closed]
5 juillet, par Lyhourt TeIn my Windows 11, I use this code to use ffmpeg to convert video from one type to another type. The code is simple, it just loops and finds the target file extension and runs ffmpeg to convert the video
This code used to work just fine, but now it's not working anymore. I think it maybe because of the Windows 11 security update.


import os
import subprocess

def convert_ts_to_mp4(folder_path):
 # Ensure the folder exists
 if not os.path.isdir(folder_path):
 print(f"Folder '{folder_path}' does not exist.")
 return
 
 # Loop through files in the folder
 for filename in os.listdir(folder_path):
 if filename.endswith(".ts"): # Check if the file is a .ts file
 print("read file:", filename)
 ts_file = os.path.join(folder_path, filename)
 mp4_file = os.path.join(folder_path, filename.replace(".ts", ".mp4"))
 
 print("ts file:", ts_file)
 print("mp4 file:", mp4_file)
 
 # Run ffmpeg command
 command = ["ffmpeg", "-i", ts_file, mp4_file]
 subprocess.run(command, check=True)
 print(f"Converted: {filename} -> {os.path.basename(mp4_file)}")

if __name__ == "__main__":
 folder_path = os.path.dirname(os.path.abspath(__file__)) # Change this to your actual folder path
 convert_ts_to_mp4(folder_path)



The error :


Input #0, mpegts, from 'C:\Users\chhor\Downloads\Video\script\python-script-for-automation\1.ts':
 Duration: 00:44:25.20, start: 1.440000, bitrate: 3095 kb/s
 Program 1
 Metadata:
 service_name : Service01
 service_provider: FFmpeg
 Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1920x872 [SAR 959:960 DAR 959:436], 25 fps, 25 tbr, 90k tbn, start 1.480000
 Stream #0:1[0x101](und): Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 130 kb/s, start 1.440000
[out#0/mp4 @ 0000014f60d66d80] Error opening output C:\Users\chhor\Downloads\Video\script\python-script-for-automation\new.mp4: No such file or directory
Error opening output file C:\Users\chhor\Downloads\Video\script\python-script-for-automation\new.mp4.
Error opening output files: No such file or directory
Traceback (most recent call last):
 File "C:\Users\chhor\Downloads\Video\script\python-script-for-automation\ts.py", line 27, in <module>
 convert_ts_to_mp4(folder_path)
 File "C:\Users\chhor\Downloads\Video\script\python-script-for-automation\ts.py", line 22, in convert_ts_to_mp4
 subprocess.run(command, check=True)
 File "C:\ProgramData\anaconda3\Lib\subprocess.py", line 571, in run
 raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ffmpeg', '-i', 'C:\\Users\\chhor\\Downloads\\Video\\script\\python-script-for-automation\\1.ts', 'C:\\Users\\chhor\\Downloads\\Video\\script\\python-script-for-automation\\new.mp4']' returned non-zero exit status 4294967294.
</module>