Recherche avancée

Médias (39)

Mot : - Tags -/audio

Autres articles (55)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip 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, par

    MediaSPIP 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 (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (10233)

  • Trying to find a way to limit the number of List that can run at one time

    14 mars 2024, par Jake

    My application has a List of Tasks. Each Task launches a FFMPEG process that requires a lot of resources on my machine. At times, this list can contain 200+ processes to FFMPEG. While processing, my memory is at 99% and everything freezes up.

    


    I need to limit the amount of processes that can run at one time. I have read a little about SemaphoreSlim ; however, I cannot wrap my mind around it's implementation.

    


    Is this a solution for this particular problem and if so, any ideas on how to implement it in my code ?

    


    Below is my code :

    


    public async System.Threading.Tasks.Task GetVideoFiles()&#xA;{            &#xA;    OpenFileDialog openFileDialog = new OpenFileDialog();&#xA;    openFileDialog.Multiselect = true;&#xA;    &#xA;    if (openFileDialog.ShowDialog() == true)&#xA;    {&#xA;        AllSplices.Clear();&#xA;        AllSplices = new ObservableCollection<splicemodel>();&#xA;        IsBusy = true;&#xA;        IsBusyMessage = "Extracting Metadata";&#xA;        IsBusyBackgroundVisible = "Visible";&#xA;        NotifyPropertyChanged(nameof(IsBusy));&#xA;        NotifyPropertyChanged(nameof(IsBusyMessage));&#xA;        NotifyPropertyChanged(nameof(IsBusyBackgroundVisible));&#xA;        metaTasks = new List>();                &#xA;        extractFramesTask = new List();&#xA;        &#xA;        foreach (string file in openFileDialog.FileNames)&#xA;        {&#xA;            FileInfo fileInfo = new FileInfo(file);&#xA;            bool canAdd = true;&#xA;            var tempFileName = fileInfo.Name;&#xA;            &#xA;            foreach (var video in AllVideos)&#xA;            {&#xA;                if (file == video.VideoPath)&#xA;                {&#xA;                    canAdd = false;&#xA;                    break;&#xA;                }&#xA;&#xA;                if (video.VideoName.Contains(tempFileName))&#xA;                {&#xA;                    video.VideoName = "_" &#x2B; video.VideoName;                            &#xA;                }                        &#xA;            }&#xA;            if (canAdd)&#xA;            {                        &#xA;                metaTasks.Add(System.Threading.Tasks.Task.Run(() => ProcessMetaData(file)));                        &#xA;            }                       &#xA;        }&#xA;        var metaDataResults = await System.Threading.Tasks.Task.WhenAll(metaTasks);              &#xA;        &#xA;        foreach (var vid in metaDataResults)&#xA;        {                    &#xA;            if(vid == null)&#xA;            {&#xA;                continue;&#xA;            }&#xA;            &#xA;            vid.IsNewVideo = true;                    &#xA;            AllVideos.Add(vid);&#xA;            &#xA;            // This list of task launches up to 200 video processing processes to FFMPEG&#xA;            extractFramesTask.Add(System.Threading.Tasks.Task.Run(() => ExtractFrames(vid)));&#xA;            &#xA;            vid.IsProgressVisible = "Visible";&#xA;            TotalDuration &#x2B;= vid.VideoDuration;&#xA;            vid.NumberOfFrames = Convert.ToInt32(vid.VideoDuration.TotalSeconds * 30);&#xA;            _ = ReportProgress(vid);&#xA;        }&#xA;       &#xA;        IsBusyMessage = "Importing Frames";&#xA;        NotifyPropertyChanged(nameof(IsBusyMessage));                              &#xA;        await System.Threading.Tasks.Task.WhenAll(extractFramesTask);              &#xA;    }&#xA;</splicemodel>

    &#xA;

  • avutil/mem : limit alignment to maximum simd align

    3 décembre 2023, par Timo Rothenpieler
    avutil/mem : limit alignment to maximum simd align
    

    FFmpeg has instances of DECLARE_ALIGNED(32, ...) in a lot of structs,
    which then end up heap-allocated.
    By declaring any variable in a struct, or tree of structs, to be 32 byte
    aligned, it allows the compiler to safely assume the entire struct
    itself is also 32 byte aligned.

    This might make the compiler emit code which straight up crashes or
    misbehaves in other ways, and at least in one instances is now
    documented to actually do (see ticket 10549 on trac).
    The issue there is that an unrelated variable in SingleChannelElement is
    declared to have an alignment of 32 bytes. So if the compiler does a copy
    in decode_cpe() with avx instructions, but ffmpeg is built with
    — disable-avx, this results in a crash, since the memory is only 16 byte
    aligned.

    Mind you, even if the compiler does not emit avx instructions, the code
    is still invalid and could misbehave. It just happens not to. Declaring
    any variable in a struct with a 32 byte alignment promises 32 byte
    alignment of the whole struct to the compiler.

    This patch limits the maximum alignment to the maximum possible simd
    alignment according to configure.
    While not perfect, it at the very least gets rid of a lot of UB, by
    matching up the maximum DECLARE_ALIGNED value with the alignment of heap
    allocations done by lavu.

    • [DH] libavutil/mem.c
    • [DH] libavutil/mem_internal.h
  • avutil/mem : limit alignment to maximum simd align

    3 décembre 2023, par Timo Rothenpieler
    avutil/mem : limit alignment to maximum simd align
    

    FFmpeg has instances of DECLARE_ALIGNED(32, ...) in a lot of structs,
    which then end up heap-allocated.
    By declaring any variable in a struct, or tree of structs, to be 32 byte
    aligned, it allows the compiler to safely assume the entire struct
    itself is also 32 byte aligned.

    This might make the compiler emit code which straight up crashes or
    misbehaves in other ways, and at least in one instances is now
    documented to actually do (see ticket 10549 on trac).
    The issue there is that an unrelated variable in SingleChannelElement is
    declared to have an alignment of 32 bytes. So if the compiler does a copy
    in decode_cpe() with avx instructions, but ffmpeg is built with
    — disable-avx, this results in a crash, since the memory is only 16 byte
    aligned.

    Mind you, even if the compiler does not emit avx instructions, the code
    is still invalid and could misbehave. It just happens not to. Declaring
    any variable in a struct with a 32 byte alignment promises 32 byte
    alignment of the whole struct to the compiler.

    This patch limits the maximum alignment to the maximum possible simd
    alignment according to configure.
    While not perfect, it at the very least gets rid of a lot of UB, by
    matching up the maximum DECLARE_ALIGNED value with the alignment of heap
    allocations done by lavu.

    • [DH] libavutil/mem.c
    • [DH] libavutil/mem_internal.h