Recherche avancée

Médias (91)

Autres articles (3)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Selection of projects using MediaSPIP

    2 mai 2011, par

    The examples below are representative elements of MediaSPIP specific uses for specific projects.
    MediaSPIP farm @ Infini
    The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

Sur d’autres sites (1720)

  • Execute my PowerShell script does not work via my C# application

    15 février 2024, par Nixir

    I'm currently working on IP cameras for my job, but I'm just starting out because I've never done anything like this before.
The aim is very simple, to start recording a specific camera via a user action, and to stop the same camera via another user action.
To achieve this, I looked for several solutions and finally decided to use FFMPEG and two Powershell scripts.

    


    The first starts recording using FFMPEG and stores the process PID in a .txt file.

    


    StartRec.ps1

    


    #Paramètres de la caméra IP
$cameraIP = $args[0]
$port = $args[1]
$username = $args[2]
$password = $args[3]

$ipfile = ${cameraIP} -replace "\.", ""
$namefile = "video_"+$ipfile+"_"+(Get-Date -Format "ddMMyyyy_HHmmss") + ".mp4"
$namepidfile = "PID_"+$ipfile+".txt"

# URL du flux vidéo de la caméra (exemple générique, adaptez-le à votre caméra)
$videoStreamUrl = "rtsp://${username}:${password}@${cameraIP}:${port}/videoMain"

# Répertoire de sortie pour la vidéo enregistrée
$outputDirectory = "C:\OutputDirectory"

# Chemin complet du fichier de sortie (nom de fichier avec horodatage actuel)
$outputFile = Join-Path $outputDirectory (${namefile})

# Commande FFmpeg pour enregistrer le flux vidéo en arrière-plan
$ffmpegCommand = "ffmpeg -rtsp_transport tcp -i `"$videoStreamUrl`" -c:v copy `"$outputFile`"" 

# Démarrer FFmpeg en arrière-plan
$process = Start-Process -FilePath "cmd.exe" -ArgumentList "/c $ffmpegCommand" -PassThru

$cheminFichier = Join-Path $outputDirectory $namepidfile

if (-not (Test-Path $cheminFichier)) {
    # Le fichier n'existe pas, créer le fichier
    New-Item -ItemType File -Path $cheminFichier -Force
    Write-Host "Fichier créé : $cheminFichier"
} else {
    Write-Host "Le fichier existe déjà : $cheminFichier"
}

Start-Sleep -Seconds 5

$processId = Get-WmiObject Win32_Process -Filter "Name='ffmpeg.exe'" | Select-Object -ExpandProperty ProcessId

# Enregistrez le PID dans un fichier
$process.Id | Out-File $cheminFichier

Write-Host "Enregistrement démarré. PID du processus : $($processId)"


    


    The second reads the contents of this .txt file, stores it in a variable as a PID and stops the process via its Id, then closes the command window associated with this process (which tells the camera that the recording is finished).

    


    StoptRec.ps1

    


    $cameraIP = $args[0]
$ipfile = ${cameraIP} -replace "\.", ""
$namepidfile = "PID_"+$ipfile+".txt"
$outputDirectory = "C:\OutputDirectory"
$cheminFichier = Join-Path $outputDirectory $namepidfile

$pidcontent = Get-Content $cheminFichier -Raw 
if (-not $pidContent) {
    Write-Host "Erreur : Le fichier PID est vide. Assurez-vous que l'enregistrement est démarré."
    exit
}

$processId  = $pidContent.Trim() -as [int]

if (-not $processId) {
    Write-Host "Erreur : Impossible de convertir le contenu du fichier PID en entier."
    exit
}

Get-Process -Id $processId

Stop-Process -Id $processId -PassThru | Foreach-Object { $_.CloseMainWindow() }

Write-Host "Enregistrement arrêté pour le processus PID $processId"
Start-Sleep -Seconds 15


    


    The problem is that they work, except in one case that I'll explain :
First, I tried to run them via PowerShell, the recording starts up and the script works as expected, as does the shutdown. My final file is usable.
I then performed C# actions in my Controller, which calls and executes these scripts :

    


    The action that calls StartRec.ps1

    


            public void startRecordingCam1(string ipAddress)
        {
            string ps1File = @"C:\OutputDirectory\StartRec.ps1";
            string cameraIP = "Camera IP Adress";
            string port = "88";
            string username = "Username";
            string password = "Password";

            Process process = Process.Start(new ProcessStartInfo
            {
                FileName = "powershell.exe",
                Arguments = $"-NoProfile -ExecutionPolicy Bypass -File \"{ps1File}\" \"{cameraIP}\" \"{port}\" \"{username}\" \"{password}\"",
                UseShellExecute = false,
                RedirectStandardInput = true
                //CreateNoWindow = true
            });
        }


    


    The action that calls StopRec.ps1

    


           public void stopRecording(string ipAddress)
        {
            string ps1File = @"C:\Projet Valentin\CameraTest\StopRec_Csharp.ps1";
            string cameraIP = "10.0.1.10";

            ProcessStartInfo startInfo = new ProcessStartInfo()
            {
                FileName = "powershell.exe",
                Arguments = $"-NoProfile -ExecutionPolicy ByPass -File \"{ps1File}\" \"{cameraIP}\" ",
                UseShellExecute = true
            };
            Process.Start(startInfo);
        }


    


    When I run the two scripts via these actions, StartRec.ps1 works well, but StopRec.ps1 doesn't work completely : the process is stopped, but the command window isn't closed, so camera recording continues (despite the end of the process).
As both scripts worked perfectly when launched with Powershell, but not with the C# application, I tried several combinations of "Start-Stop" with "PowerShell/C#".

    


    If I run StartRec.PS1 with the C# application and StopRec.PS1 with PowerShell, it works.
If I run StartRec.PS1 with PowerShell and StopRec.PS1 with the C# application, it works.
If I run StartRec.PS1 with PowerShell and StopRec.PS1 with PowerShell, it works.
The only case that doesn't work is when I run both via the C# application

    


    One thing I can add that I discovered while debugging is that this :
Stop-Process -Id $processId -PassThru | Foreach-Object { $_.CloseMainWindow() }

    


    Returns false in the only case where it doesn't work, and true in all other cases

    


    That's all the details I can give you, thanks for your help !

    


  • fate/mov : use framecrc for the remaining avif/heic tests

    3 mars 2024, par James Almer
    fate/mov : use framecrc for the remaining avif/heic tests
    

    Put them in sync with the other tests.

    Signed-off-by : James Almer <jamrial@gmail.com>

    • [DH] tests/fate/mov.mak
    • [DH] tests/ref/fate/mov-avif-demux-still-image-1-item
    • [DH] tests/ref/fate/mov-avif-demux-still-image-multiple-items
    • [DH] tests/ref/fate/mov-heic-demux-still-image-1-item
    • [DH] tests/ref/fate/mov-heic-demux-still-image-multiple-items
  • Introducing the Matomo Connector for Looker Studio (Formerly Google Data Studio)

    26 janvier 2024, par Erin — Community

    Explore Matomo data like never before with the official Matomo Connector for Looker Studio. Matomo users can now securely display accurate web analytics data in Looker Studio for free.

    Connect Matomo to Looker Studio (formerly known as Google Data Studio) in a few clicks and start building dashboards instantly. Get access to a range of data visualisation capabilities and chart types in Looker Studio’s easy-to-use interface. 

    Leave behind manual, error-prone spreadsheet entries and disparate data. With the Matomo Connector for Looker Studio, you get unified, automated reporting and interactive dashboards for faster insights and smoother collaboration.

    What sets the official Matomo Connector for Looker Studio apart ?

    Our open-source connector puts security first by providing a reliable connection without relying on third-party intermediaries. It’s free, with no hidden charges, and no limits on the number of users or Matomo instances. Connect as many instances as you need. 

    Plus, our Support team is here anytime you need help.

    Matomo Connector for Looker Studio setting up

    Who is this connector made for ?

    The Matomo Connector for Looker Studio is a good fit for institutions and corporations using Looker Studio, NGOs handling multiple entities, marketing agencies with various clients, and small to medium-sized businesses with advanced data practices.

    When is this connector not the best fit ?

    If you prioritise privacy and compliance, this might not be the right fit. The Looker Studio app operates on Google servers, and while we don’t log or store any data, privacy considerations should be carefully evaluated. Transferring data, especially visitor data, to external platforms can have privacy implications.

    Getting started

    Check out our documentation for an easy setup.

    To help, we’ve also created a template report so you can visualise your Matomo data instantly.

    Here’s how to get started :

    1. Visit the demo template report in Looker Studio
    2. Click the more options button then Make a copy
    More option in Looker Studio
    1. Click Create data source within the New Data Source dropdown.
    Connecting Matomo to Looker Studio
    1. Connect your Matomo (Full Connection Guide)
    2. Select the API > Main Metrics report
    3. Click Connect and then Add to Report
    4. Click Copy Report to finalise

    For additional support, visit our Matomo Looker Studio forum or reach out to our Looker Studio support team via email at support-lookerstudio@matomo.org