
Recherche avancée
Autres articles (27)
-
Taille des images et des logos définissables
9 février 2011, parDans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...) -
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)
Sur d’autres sites (2864)
-
FFMpeg C++ encoder fails with hardware acceleration quick sync intel
28 août 2022, par tealsI am trying to debug an issue I have with a simple C++ encoder using FFMmpeg. The following code below works correctly on these other hardware acceleration systems/platforms :


- 

- Mac/VideoToolbox,
- Cuda/NVEnc
- Raspberry pi/h264_v4l2m2m.








It fails on intel quick sync at
avcodec_open2
. I'm using Ubuntu 22.04. I built FFMpeg from source with the Intel Media SDK installed and configured. I verified that the QuickSync install works. I also have a corresponding decoder implementation that works correctly using intel quick sync. So I know everything properly installed. I am also running this on an 11th Gen Intel CPU.

[hevc_qsv @ 0x564b0d34f0c0] Low power mode is unsupported (This sometimes shows up)
[hevc_qsv @ 0x563691234000] some encoding parameters are not supported by the QSV runtime. Please double check the input parameters.
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height



This is the only error that I get and I haven't found any helpful resources. I tried playing around with different parameters but nothing seems to work. Any help or insight would be extremely helpful.


bool VideoEncoder::create() {
 char const* outfile = filePath.c_str();

 // open output format context
 int ret = avformat_alloc_output_context2(&ofctx, nullptr, nullptr, outfile);
 if (ret < 0) {
 std::cerr << "fail to avformat_alloc_output_context2(" << outfile << "): ret=" << ret;
 return false;
 }

 // create new video stream
 const AVCodec* codec = avcodec_find_encoder_by_name(encoderName.c_str());
 vstrm = avformat_new_stream(ofctx, codec);
 if (!vstrm) {
 std::cerr << "fail to avformat_new_stream";
 return false;
 }

 // open video encoder
 cctx = avcodec_alloc_context3(codec);
 if (!vstrm) {
 std::cerr << "fail to avcodec_alloc_context3";
 return false;
 }
 const AVRational dst_fps = {fps, 1};
 cctx->width = width;
 cctx->height = height;
 if(pixel_format != AV_PIX_FMT_NONE) {
 cctx->pix_fmt = pixel_format;
 }
 else {
 cctx->pix_fmt = codec->pix_fmts[0];
 }
 cctx->time_base = av_inv_q(dst_fps);
 cctx->framerate = dst_fps;
 cctx->bit_rate = bitrate * 1000000;


 AVDictionary* options = nullptr;
 if(gpu_id >= 0) {
 av_dict_set_int(&options, "gpu", gpu_id, 0);
 }

 
 if (ofctx->oformat->flags & AVFMT_GLOBALHEADER)
 cctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
 ret = avcodec_open2(cctx, codec, &options);
 if (ret < 0) {
 std::cerr << "fail to avcodec_open2: ret=" << ret;
 return false;
 }
 avcodec_parameters_from_context(vstrm->codecpar, cctx);

 //For mac/quicktime we need to add hvc1 tag.
 if (encoderName.find("hevc") != std::string::npos) {
 vstrm->codecpar->codec_tag = MKTAG('h', 'v', 'c', '1');
 }

 /*
 std::cout
 << "outfile: " << outfile << "\n"
 << "format: " << ofctx->oformat->name << "\n"
 << "vcodec: " << codec->name << "\n"
 << "size: " << width << 'x' << height << "\n"
 << "fps: " << av_q2d(cctx->framerate) << "\n"
 << "pixfmt: " << av_get_pix_fmt_name(cctx->pix_fmt) << "\n"
 << std::flush;*/

 // initialize sample scaler
 swsCtx = sws_getContext(
 width, height, AV_PIX_FMT_BGR24,
 width, height, cctx->pix_fmt,
 SWS_BILINEAR, nullptr, nullptr, nullptr);
 if (!swsCtx) {
 std::cerr << "fail to sws_getContext";
 return false;
 }

 // allocate frame buffer for encoding
 frame = av_frame_alloc();
 frame->width = width;
 frame->height = height;
 frame->format = static_cast<int>(cctx->pix_fmt);
 ret = av_frame_get_buffer(frame, 32);
 if (ret < 0) {
 std::cerr << "fail to av_frame_get_buffer: ret=" << ret;
 return false;
 }

 // allocate packet to retrive encoded frame
 pkt = av_packet_alloc();
 // open output IO context
 ret = avio_open2(&ofctx->pb, outfile, AVIO_FLAG_WRITE, nullptr, nullptr);
 if (ret < 0) {
 std::cerr << "fail to avio_open2: ret=" << ret;
 return false;
 }

 // write media container header (if any)
 ret = avformat_write_header(ofctx, nullptr);
 if (ret < 0) {
 std::cerr << "fail to avformat_write_header: ret=" << ret;
 return false;
 }

 return true;
}
</int>


-
Hello. I'd like to play a video on my app on android, I tried with videoplayer, it works but doesn't load the video simply open theUI but not thevideo
26 octobre 2022, par AbdulI'd like to play a video on my app on android, I tried with videoplayer, it works but doesn't load the video ( simply open the UI but not the video).


I found out i may need ffpyplayer so I changed buildozer requirements :
requirements = python3,kivy, android,ffpyplayer


but buildozer failed to build apk when i added ffpyplayer and ffmpeg in buildozer.spec file in requirement.


[DEBUG]: If you think configure made a mistake, make sure you are using the latest
[DEBUG]: version from Git. If the latest version fails, report the problem to the
[DEBUG]: ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
[DEBUG]: Include the log file "ffbuild/config.log" produced by configure as this will help
[DEBUG]: solve the problem.
Exception in thread background thread for pid 77802:
Traceback (most recent call last):
 File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
 self.run()
 File "/usr/lib/python3.7/threading.py", line 870, in run
 self._target(*self._args, **self._kwargs)
 File "/usr/local/lib/python3.7/dist-packages/sh.py", line 1641, in wrap
 fn(*rgs, **kwargs)
 File "/usr/local/lib/python3.7/dist-packages/sh.py", line 2569, in background_thread
 handle_exit_code(exit_code)
 File "/usr/local/lib/python3.7/dist-packages/sh.py", line 2269, in fn
 return self.command.handle_command_exit_code(exit_code)
 File "/usr/local/lib/python3.7/dist-packages/sh.py", line 869, in handle_command_exit_code
 raise exc
sh.ErrorReturnCode_1: 

 RAN: /content/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/ffmpeg/armeabi-v7a__ndk_target_21/ffmpeg/configure --disable-everything --enable-openssl --enable-nonfree --enable-protocol=https,tls_openssl --enable-gpl --enable-libx264 --enable-libshine --enable-libvpx --enable-parsers --enable-decoders --enable-encoders --enable-muxers --enable-demuxers --disable-symver --disable-programs --disable-doc --enable-filter=aresample,resample,crop,adelay,volume,scale --enable-protocol=file,http,hls,udp,tcp --enable-small --enable-hwaccels --enable-pic --disable-static --disable-debug --enable-shared --target-os=android --enable-cross-compile --cross-prefix=armv7a-linux-androideabi21- --arch=arm --strip=/root/.buildozer/android/platform/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip --sysroot=/root/.buildozer/android/platform/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/sysroot --enable-neon --prefix=/content/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/ffmpeg/armeabi-v7a__ndk_target_21/ffmpeg

 STDOUT:
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
armv7a-linux-androideabi21-clang is unable to create an executable file.
C compiler test failed.

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 "ffbuild/config.log" produced by configure as this will help
solve the problem.


 STDERR:


Traceback (most recent call last):
 File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
 "__main__", mod_spec)
 File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
 exec(code, run_globals)
 File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1297, in <module>
 main()
 File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
 ToolchainCL()
 File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 730, in __init__
 getattr(self, command)(args)
 File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 153, in wrapper_func
 build_dist_from_args(ctx, dist, args)
 File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 215, in build_dist_from_args
 args, "ignore_setup_py", False
 File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 505, in build_recipes
 recipe.build_arch(arch)
 File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/ffmpeg/__init__.py", line 143, in build_arch
 shprint(configure, *flags, _env=env)
 File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 167, in shprint
 for line in output:
 File "/usr/local/lib/python3.7/dist-packages/sh.py", line 915, in next
 self.wait()
 File "/usr/local/lib/python3.7/dist-packages/sh.py", line 845, in wait
 self.handle_command_exit_code(exit_code)
 File "/usr/local/lib/python3.7/dist-packages/sh.py", line 869, in handle_command_exit_code
 raise exc
sh.ErrorReturnCode_1: 

 RAN: /content/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/ffmpeg/armeabi-v7a__ndk_target_21/ffmpeg/configure --disable-everything --enable-openssl --enable-nonfree --enable-protocol=https,tls_openssl --enable-gpl --enable-libx264 --enable-libshine --enable-libvpx --enable-parsers --enable-decoders --enable-encoders --enable-muxers --enable-demuxers --disable-symver --disable-programs --disable-doc --enable-filter=aresample,resample,crop,adelay,volume,scale --enable-protocol=file,http,hls,udp,tcp --enable-small --enable-hwaccels --enable-pic --disable-static --disable-debug --enable-shared --target-os=android --enable-cross-compile --cross-prefix=armv7a-linux-androideabi21- --arch=arm --strip=/root/.buildozer/android/platform/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip --sysroot=/root/.buildozer/android/platform/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/sysroot --enable-neon --prefix=/content/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/ffmpeg/armeabi-v7a__ndk_target_21/ffmpeg

 STDOUT:
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
armv7a-linux-androideabi21-clang is unable to create an executable file.
C compiler test failed.

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 "ffbuild/config.log" produced by configure as this will help
solve the problem.


 STDERR:

# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,ffpyplayer,kivy,openssl,certifi,android,pytube,plyer,pyjnius,kivmob,jnius,future,libshine,libx264,ffpyplayer_codecs,Pillow,liblzma,opencv,requests,urllib3,chardet,idna,youtube_search --arch armeabi-v7a --copy-libs --color=always --storage-dir="/content/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21 --ignore-setup-py --debug
# ENVIRONMENT:
# NV_LIBCUBLAS_DEV_VERSION = '11.4.1.1043-1'
# NV_CUDA_COMPAT_PACKAGE = 'cuda-compat-11-2'
# NV_CUDNN_PACKAGE_DEV = 'libcudnn8-dev=8.1.1.33-1+cuda11.2'
# PYDEVD_USE_FRAME_EVAL = 'NO'
# LD_LIBRARY_PATH = '/usr/local/nvidia/lib:/usr/local/nvidia/lib64'
# NV_LIBNCCL_DEV_PACKAGE = 'libnccl-dev=2.8.4-1+cuda11.2'
# TCLLIBPATH = '/usr/share/tcltk/tcllib1.19'
# CLOUDSDK_PYTHON = 'python3'
# LANG = 'en_US.UTF-8'
# NV_LIBNPP_DEV_PACKAGE = 'libnpp-dev-11-2=11.3.2.152-1'
# ENABLE_DIRECTORYPREFETCHER = '1'
# HOSTNAME = '875ade0bb031'
# OLDPWD = '/'
# CLOUDSDK_CONFIG = '/content/.config'
# USE_AUTH_EPHEM = '1'
# NV_LIBNPP_VERSION = '11.3.2.152-1'
# NV_NVPROF_DEV_PACKAGE = 'cuda-nvprof-11-2=11.2.152-1'
# NVIDIA_VISIBLE_DEVICES = 'all'
# NV_NVPROF_VERSION = '11.2.152-1'
# NV_LIBCUSPARSE_VERSION = '11.4.1.1152-1'
# DATALAB_SETTINGS_OVERRIDES = '{"kernelManagerProxyPort":6000,"kernelManagerProxyHost":"172.28.0.3","jupyterArgs":["--ip=172.28.0.2"],"debugAdapterMultiplexerPath":"/usr/local/bin/dap_multiplexer","enableLsp":true}'
# NV_LIBCUBLAS_DEV_PACKAGE = 'libcublas-dev-11-2=11.4.1.1043-1'
# ENV = '/root/.bashrc'
# PAGER = 'cat'
# NCCL_VERSION = '2.8.4-1'
# TF_FORCE_GPU_ALLOW_GROWTH = 'true'
# JPY_PARENT_PID = '60'
# NO_GCE_CHECK = 'False'
# PWD = '/content'
# NVARCH = 'x86_64'
# NV_LIBCUSPARSE_DEV_VERSION = '11.4.1.1152-1'
# HOME = '/root'
# KMP_LISTEN_PORT = '6000'
# LAST_FORCED_REBUILD = '20221021'
# CLICOLOR = '1'
# NV_LIBNCCL_PACKAGE_VERSION = '2.8.4-1'
# NV_LIBNCCL_PACKAGE = 'libnccl2=2.8.4-1+cuda11.2'
# DEBIAN_FRONTEND = 'noninteractive'
# NV_LIBNCCL_DEV_PACKAGE_NAME = 'libnccl-dev'
# NV_CUDA_LIB_VERSION = '11.2.2-1'
# NV_LIBNPP_PACKAGE = 'libnpp-11-2=11.3.2.152-1'
# NV_LIBNCCL_PACKAGE_NAME = 'libnccl2'
# LIBRARY_PATH = '/usr/local/cuda/lib64/stubs'
# NV_NVTX_VERSION = '11.2.152-1'
# NV_LIBCUBLAS_VERSION = '11.4.1.1043-1'
# NV_LIBCUBLAS_PACKAGE = 'libcublas-11-2=11.4.1.1043-1'
# GCE_METADATA_TIMEOUT = '3'
# NV_CUDNN_VERSION = '8.1.1.33'
# VM_GCE_METADATA_HOST = '169.254.169.254'
# NV_CUDA_CUDART_DEV_VERSION = '11.2.152-1'
# KMP_TARGET_PORT = '9000'
# GLIBCPP_FORCE_NEW = '1'
# TBE_CREDS_ADDR = '172.28.0.1:8008'
# TERM = 'xterm-color'
# SHELL = '/bin/bash'
# GCS_READ_CACHE_BLOCK_SIZE_MB = '16'
# NV_NVML_DEV_VERSION = '11.2.152-1'
# PYTHONWARNINGS = 'ignore:::pip._internal.cli.base_command'
# MPLBACKEND = 'module://ipykernel.pylab.backend_inline'
# CUDA_VERSION = '11.2.2'
# NV_LIBCUBLAS_PACKAGE_NAME = 'libcublas-11-2'
# NVIDIA_DRIVER_CAPABILITIES = 'compute,utility'
# TBE_RUNTIME_ADDR = '172.28.0.1:8011'
# SHLVL = '1'
# PYTHONPATH = '/env/python'
# NV_LIBCUBLAS_DEV_PACKAGE_NAME = 'libcublas-dev-11-2'
# NVIDIA_REQUIRE_CUDA = ('cuda>=11.2 brand=tesla,driver>=418,driver<419 '
 'brand=tesla,driver>=450,driver<451')
# NV_LIBNPP_DEV_VERSION = '11.3.2.152-1'
# TBE_EPHEM_CREDS_ADDR = '172.28.0.1:8009'
# NV_CUDA_CUDART_VERSION = '11.2.152-1'
# NV_CUDNN_PACKAGE_NAME = 'libcudnn8'
# GLIBCXX_FORCE_NEW = '1'
# PATH = '/root/.buildozer/android/platform/apache-ant-1.9.4/bin:/opt/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/tools/node/bin:/tools/google-cloud-sdk/bin'
# NV_LIBNCCL_DEV_PACKAGE_VERSION = '2.8.4-1'
# LD_PRELOAD = '/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4'
# NV_CUDNN_PACKAGE = 'libcudnn8=8.1.1.33-1+cuda11.2'
# GIT_PAGER = 'cat'
# _ = '/usr/local/bin/buildozer'
# PACKAGES_PATH = '/root/.buildozer/android/packages'
# ANDROIDSDK = '/root/.buildozer/android/platform/android-sdk'
# ANDROIDNDK = '/root/.buildozer/android/platform/android-ndk-r23b'
# ANDROIDAPI = '30'
# ANDROIDMINAPI = '21'
# 
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
</module>


kindly help me anyone would be very appreciate thank you.


-
Revision 29747 : On incrémente la version du plugin
8 juillet 2009, par kent1@… — LogOn incrémente la version du plugin