Recherche avancée

Médias (91)

Autres articles (41)

  • 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 (9734)

  • Why does my ffmpeg command fails from python subprocess ? [closed]

    23 mars 2024, par haggi krey

    I want to concat two movies with ffmpeg. In the shell I can execute this :
\\programs\2d\ffmpeg\inst\ffmpeg.bat -y -i "concat:C:/daten/movieA.ts1|C:/daten/movieB.ts2" -c copy -bsf:a aac_adtstoasc C:/daten/movieConcat.mov and it works fine. If I try to call it from a python subprocess :

    


    import subprocess
cmd = [r"\\programs\2d\ffmpeg\inst\ffmpeg.bat", "-i", '"concat:C:/daten/movieA.ts1|C:/daten/movieB.ts2"', "-c", "copy", "-bsf:a aac_adtstoasc", "C:/daten/movieConcat.mov"]
result = subprocess.run(cmd, shell=True, capture_output=True, text=True)
if result.returncode > 0:
    print("create concat failed")
print(result.stdout)
print(result.stderr)


    


    I get this error :

    


    Trailing option(s) found in the command: may be ignored.
[in#0 @ 00000222c056a1c0] Error opening input: Invalid argument
Error opening input file "concat:C:/daten/movieA.ts1|C:/daten/movieB.ts2".
Error opening input files: Invalid argument


    


    I have no idea what's wrong with my call and I'd appreciate any hints.

    


  • Getting the total samples of an audio file using ffmpeg.exe in C#

    12 juillet 2023, par hello world

    I'm currently working on a C# project where I need to determine the total number of samples in an audio file using ffmpeg.exe. I've been attempting to achieve this by executing the ffmpeg.exe command within my C# code and parsing the output, but I haven't been successful so far.

    


    Here's the code I've tried :

    


    using System;
using System.Diagnostics;

public class AudioUtils
{
    public static int GetTotalSamples(string audioFilePath)
    {
        string ffmpegPath = "path/to/ffmpeg.exe"; // Path to ffmpeg.exe

        Process process = new Process();
        ProcessStartInfo startInfo = new ProcessStartInfo
        {
            FileName = ffmpegPath,
            Arguments = $"-i \"{audioFilePath}\" -af \"volumedetect\" -vn -sn -dn -f null /dev/null 2>&1",
            RedirectStandardOutput = true,
            RedirectStandardError = true,
            UseShellExecute = false,
            CreateNoWindow = true
        };

        process.StartInfo = startInfo;
        process.Start();

        string output = process.StandardError.ReadToEnd();
        process.WaitForExit();

        int totalSamples = 0;
        // Parsing logic to extract total samples from output goes here...

        return totalSamples;
    }
}


    


    I suspect there might be an issue with the command or the parsing logic in the code snippet above. Could someone please guide me on how to correctly execute ffmpeg.exe and extract the total number of samples from the output in C# ? Any insights, alternative approaches, or modifications to the code would be greatly appreciated. Thank you in advance for your assistance !

    


  • How can i make the dashjs player respect the stream window from ffmpeg ?

    7 mars 2021, par Octavia Kitsune

    I created the following command to i run on the serverside turn a source url into a cmaf dash stream :

    


    ffmpeg -loglevel error -re -i SOURCEURL -c copy -f dash -dash_segment_type mp4 -remove_at_exit 1 -seg_duration 2 -target_latency 1 -frag_type duration -frag_duration 0.1 -window_size 10 -extra_window_size 3 -streaming 1 -ldash 1 -use_template 1 -use_timeline 0 -index_correction 1 -tune zerolatency -fflags "+nobuffer+flush_packets" -format_options "movflags=cmaf" -adaptation_sets "id=0,streams=0 id=1,streams=1" -utc_timing_url "http://time.akamai.com/?iso&ms" stream/main.mpd


    


    And on the clientside i run a dashjs player with the following configuration :

    


      const video = document.getElementById('video')
  const player = dashjs.MediaPlayer().create()

  player.initialize(video, false, true)
  player.updateSettings({
    streaming: {
      stallThreshold: 0.05,
      lowLatencyEnabled: true,
      liveDelay: 1,
      liveCatchup: {
        minDrift: 1,
        playbackRate: 0.3,
        mode: 'liveCatchupModeDefault'
      },
      abr: {
        useDefaultABRRules: true,
        ABRStrategy: 'abrLoLP',
        fetchThroughputCalculationMode:
          'abrFetchThroughputCalculationMoofParsing'
      }
    }
  })


    


    My problem is, that dashjs loads a few segements and then tries to grab segments that error with a 404. It seems the segments it asks for fall out ot the window the stream defines.

    


    So i wonder how i can align my dashjs with my stream configuration so that it does respect the window defined by the stream, to basically simulate a livestream from any kind of videosource ?