
Recherche avancée
Autres articles (47)
-
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 -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (10757)
-
AddictedCS SoundFingerprinting FFmpeg.AutoGen System.NullReferenceException
16 novembre 2023, par J DHow can I troubleshoot below issue ? Seems to be a class override of FFmpeg.


I am attempting to use AddictedCS SoundFingerprinting (https://github.com/AddictedCS/soundfingerprinting).
https://github.com/Ruslan-B/FFmpeg.AutoGen


After downloading the packages with nuget, I downloaded & compiled from source to debug :


For some reason FFmpeg.AutoGen.Abstractions keep crashing.
Visual Studio 2022, project set to X64


The exception :


FFmpeg.AutoGen.Abstractions
Code line 2906 :


public static AVFormatContext avformat_alloc_context() => vectors.avformat_alloc_context() ;*


System.NullReferenceException
 HResult=0x80004003
 Message=Object reference not set to an instance of an object
 Source=FFmpeg.AutoGen.Abstractions
 StackTrace:
 at FFmpeg.AutoGen.Abstractions.ffmpeg.avformat_alloc_context() in C:\FFmpeg.AutoGen-master\FFmpeg.AutoGen.Abstractions\generated\ffmpeg.functions.facade.g.cs:line 2906



ffmpeg.exe as recommended on the correct location


C:\fingerPrint\ConsoleApp1\ConsoleApp1\bin\x64\Debug\FFmpeg\bin\x64>ffmpeg.exe ffmpeg version 4.4.1-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers built with gcc 11.2.0 (Rev1, Built by MSYS2 project)


Sourcecode



using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SoundFingerprinting;
using SoundFingerprinting.Builder;
using SoundFingerprinting.Emy;
using FFmpeg.AutoGen.Bindings.DynamicallyLoaded;
using System.IO;

namespace ConsoleApp1
{
 internal class Program
 {
 private readonly IFingerprintCommandBuilder fingerprintCommandBuilder = new FingerprintCommandBuilder();
 static async Task Main(string[] args)
 {
 var current = Environment.CurrentDirectory;
 var probe = Path.Combine("FFmpeg", "bin", Environment.Is64BitProcess ? "x64" : "x86");
 var ffmpegBinaryPath = Path.Combine(current, probe);
 Console.WriteLine(Environment.CurrentDirectory);
 Console.WriteLine($"FFmpeg binaries found in: {ffmpegBinaryPath}");
 DynamicallyLoadedBindings.LibrariesPath = ffmpegBinaryPath;
 
 var audioService = new FFmpegAudioService();
 var hashedFingerprints = await FingerprintCommandBuilder.Instance
 .BuildFingerprintCommand()
 .From("c:\\temp\\chopin_short2.wav")
 .UsingServices(audioService)
 .Hash();
 }
 }
}




Where do I need to look next ? Doesn't this work with a console C# project ?


-
Problem with Linking FFMPEG Libraries in Visual Studio on Windows 10 [closed]
14 mars 2024, par Dentricky73I'm facing an issue while trying to link FFMPEG libraries in Visual Studio on a Windows 10 OS. Specifically, Visual Studio seems to locate the headers correctly, but encounters difficulties in finding the associated libraries. Initially, I attempted to compile the FFMPEG SDK myself, but encountered problems with the library extensions, which ended with a Linux .o file instead of a Windows .lib. Subsequently, I downloaded a prebuilt version from here, but I'm still encountering errors.


In Visual Studio 2022, I've configured the following settings :




Property > Configuration Properties > C/C++ > General > Additional Include Directories
C :\cmder\c++SDK\ffmpeg\include






Property > Configuration Properties > Linker > General > Additional Library Directories
C :\cmder\c++SDK\ffmpeg\lib






Property > Configuration Properties > Linker > Input > Additional Dependencies
avcodec.lib, avdevice.lib, avfilter.lib, avformat.lib, avutil.lib, postproc.lib, swresample.lib, swscale.lib




Despite these configurations, Visual Studio fails to locate the FFMPEG libraries during the linking process. Could someone please provide guidance on how to resolve this issue and correctly link the FFMPEG libraries in Visual Studio on Windows ? Any help or insights would be greatly appreciated.


Specific Issues Encountered :


During the compilation and linking process in Visual Studio 2022, I encountered the following errors :


Error 1 : A value of type "const AVCodec *" cannot be used to initialize an entity of type "AVCodec *".
Error 2 : Identifier "av_free_packet" is undefined.
Error 3 : Class "AVStream" has no member "codec".
Error 4 : Class "AVFrame" has no member "owner".
Despite configuring the project settings to include the correct include directories and library dependencies, these errors persist.


Why Previous Attempts Didn't Meet My Needs :


My previous attempts to resolve these issues were unsuccessful because I couldn't pinpoint the root cause of the compilation and linking errors. While I ensured that the include directories and library dependencies were correctly configured in Visual Studio, the errors persisted, indicating that there may be underlying issues with the setup or compatibility between the FFMPEG SDK and Visual Studio environment.


-
Exception thrown at 0x00007FFC0B57BCEF (swscale-6.dll) in App.exe : 0xC0000005 : Access violation reading location 0xFFFFFFFFFFFFFFFF
9 novembre 2023, par JIUN-YUTrying to play a video using FFmpeg on visual studio 2022 on windows 10.
Exception is thrown at sws_scale in the code. Don't know why this is occurred.
It is worth noting that this error sometimes occurs when reading the camera and sometimes it does not.


here is my code


bool CalibrationPanel::video_reader_read_frame(VReaderState* state, cv::Mat cvimg)
{
 // Unpack members of state
 auto& width = state->width;
 auto& height = state->height;
 auto& av_format_ctx = state->av_format_ctx;
 auto& av_codec_ctx = state->av_codec_ctx;
 auto& video_stream_index = state->video_stream_index;
 auto& av_frame = state->av_frame;
 auto& av_packet = state->av_packet;
 auto& sws_scaler_ctx = state->sws_scaler_ctx;


 // Decode one frame
 int response;
 while (av_read_frame(av_format_ctx, av_packet) >= 0)
 {
 if (av_packet->stream_index != video_stream_index)
 {
 av_packet_unref(av_packet);
 continue;
 }

 response = avcodec_send_packet(av_codec_ctx, av_packet);
 if (response < 0)
 {
 char errStr[256] = {0};
 av_strerror(response, errStr, sizeof(errStr));
 printf("Failed to decode packet: %s\n", errStr);
 return false;
 }

 response = avcodec_receive_frame(av_codec_ctx, av_frame);
 if (response == AVERROR(EAGAIN) || response == AVERROR_EOF)
 {
 av_packet_unref(av_packet);
 continue;
 }
 else if (response < 0)
 {
 char errStr[256] = {0};
 av_strerror(response, errStr, sizeof(errStr));
 printf("Failed to decode packet: %s\n", errStr);
 return false;
 }

 av_packet_unref(av_packet);
 break;
 }
 int64_t* pts = &ppts;
 *pts = av_frame->pts;

 // Set up sws scaler
 if (!sws_scaler_ctx)
 {
 sws_scaler_ctx = sws_getContext(width, height, av_codec_ctx->pix_fmt,
 width, height, AV_PIX_FMT_BGR24,
 SWS_BILINEAR, NULL, NULL, NULL);
 if (!sws_scaler_ctx)
 {
 printf("Couldn't initialize sw scaler\n");
 return false;
 }
 }


 // Creating an image space to hold YUV images
 AVFrame* frameYUV = av_frame_alloc();
 auto* out_buffer = (unsigned char*)av_malloc(av_image_get_buffer_size(AV_PIX_FMT_BGR24, width, height, 1));
 av_image_fill_arrays(frameYUV->data, frameYUV->linesize, (const uint8_t*)out_buffer, AV_PIX_FMT_BGR24, width, height, 1);

 uint8_t* dest[4] = {cvimg.data, NULL, NULL, NULL};
 sws_scale(sws_scaler_ctx, av_frame->data, av_frame->linesize, 0, av_frame->height, dest, frameYUV->linesize);

 return true;
}



fixed this bug, so it's not luck that makes the camera turn on every time.