Recherche avancée

Médias (91)

Autres articles (53)

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

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

    Le 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 (6699)

  • node.js ffmpeg spawn child_process unexpected data output

    5 septembre 2021, par PLNR

    
I'm rather new to backend stuff, so please excuse, if my question is trivial.
    
For an Intranet project, I want to present a video element in a webpage (React, HLS.js Player).
    
The video sources are mpeg-ts streams delivered as udp multicast.
    
A small node.js / express server should handle the ffmpeg commands, to transcode the multicast to hls to display them in a browser.
    

    
Problem is the Output :
    
The output is emitted on stderr... even the process is working as expected.
    
Here is the respective code I wrote for transcoding so far :

    


    const express = require("express");
const { spawn, exec } = require("child_process");
const process = require("process")

let ls;

const app = express();

app.get('/cam/:source', (body) => {
    const cam = body.params.source;
    console.log(cam);

    let source = "udp://239.1.1.1:4444";
    let stream = "/var/www/html/streams/tmp/cam1.m3u8"


    stream = spawn("ffmpeg", ["-re", "-i", source, "-c:v", "libx264", "-crf", "21", "-preset", "veryfast", "-c:a", "aac", "-b:a", "128k", "-ac", "2", "-f", "hls", "-hls_list_size", "5", "-hls_flags", "delete_segments", stream], {detached: true});

    stream.stdout.on("data", data => {
        console.log(`stdout: ${data}`);
    });

    stream.stderr.on("data", data => {
        console.log(`stderr: ${data}`);
    });

    stream.on("error", error => {
        console.log(`error: ${error.message}`);
    });

    stream.on("close", code => {
        console.log(`child process exited with code ${code}`);
    });
})

app.listen(5000, ()=> {
    console.log('Listening');
})


    


    This is maybe only cosmetics, but it makes me wondering.
    
Here is the terminal output :

    


    [nodemon] starting `node server.js`
Listening
camera stream reloaded
stderr: ffmpeg version 4.3.2-0+deb11u1ubuntu1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10 (Ubuntu 10.2.1-20ubuntu1)

  --shortend--


pid:  4206
stderr: frame=    8 fps=0.0 q=0.0 size=N/A time=00:00:00.46 bitrate=N/A speed=0.931x    
pid:  4206
stderr: frame=   21 fps= 21 q=26.0 size=N/A time=00:00:00.96 bitrate=N/A speed=0.95x    
pid:  4206
stderr: frame=   33 fps= 22 q=26.0 size=N/A time=00:00:01.49 bitrate=N/A speed=0.982x    
pid:  4206
stderr: frame=   46 fps= 23 q=26.0 size=N/A time=00:00:02.00 bitrate=N/A speed=0.989x    
pid:  4206
stderr: frame=   58 fps= 23 q=26.0 size=N/A time=00:00:02.49 bitrate=N/A speed=0.986x    
pid:  4206


    


    and so on...
    

    
Any helpful information would be highly appreciated !
    
Many thanks in advance

    


  • avfilter/x86/vf_blend : use unaligned movs for output

    19 janvier 2022, par Marton Balint
    avfilter/x86/vf_blend : use unaligned movs for output
    

    Fixes crashes with :

    ffmpeg -f lavfi -i allyuv=d=1 -vf tblend=difference128,pad=5000:ih:1 -f null x

    Signed-off-by : Marton Balint <cus@passwd.hu>

    • [DH] libavfilter/x86/vf_blend.asm
  • How to manipulate files by ffmpeg in Android 31 : permission denied

    17 septembre 2021, par Omid.N

    I am trying to use FFmpeg in my android app. So I want to test it if it works before moving on. I use an external library : github link
    &#xA;The code looks like this :

    &#xA;

    package net.omidn.aslanmediaconverter;&#xA;&#xA;import android.net.Uri;&#xA;import android.os.Bundle;&#xA;import android.util.Log;&#xA;import android.widget.TextView;&#xA;&#xA;import androidx.appcompat.app.AppCompatActivity;&#xA;&#xA;import com.arthenica.ffmpegkit.ExecuteCallback;&#xA;import com.arthenica.ffmpegkit.FFmpegKit;&#xA;import com.arthenica.ffmpegkit.FFmpegSession;&#xA;import com.arthenica.ffmpegkit.Session;&#xA;&#xA;import net.bramp.ffmpeg.job.FFmpegJob;&#xA;&#xA;import java.io.BufferedInputStream;&#xA;import java.io.File;&#xA;import java.io.IOException;&#xA;import java.io.InputStream;&#xA;&#xA;&#xA;public class MainActivity extends AppCompatActivity {&#xA;    &#xA;    private static final String TAG = "MainActivity";&#xA;    FFmpegJob myjob;&#xA;&#xA;    @Override&#xA;    protected void onCreate(Bundle savedInstanceState) {&#xA;&#xA;&#xA;        super.onCreate(savedInstanceState);&#xA;        setContentView(R.layout.activity_main);&#xA;&#xA;        TextView textView = (TextView) findViewById(R.id.text_view);&#xA;&#xA;&#xA;        FFmpegJob job = null;&#xA;&#xA;        File inFile = new File("/storage/emulated/0/video_2021-05-29_17-50-20.mp4");&#xA;        String inputName = Uri.fromFile(inFile).toString();&#xA;        Log.d(TAG, inputName);&#xA;        Log.d(TAG,"file exists : " &#x2B; String.valueOf(inFile.exists()));&#xA;        Log.d(TAG,"file canRead : " &#x2B; String.valueOf(inFile.canRead()));&#xA;&#xA;        FFmpegSession fFmpegSession = FFmpegKit.executeAsync("-i file:///storage/emulated/0/video_2021-05-29_17-50-20.mp4 -c:v mpeg4 file:///storage/emulated/0/out.mp4",&#xA;                new ExecuteCallback() {&#xA;                    @Override&#xA;                    public void apply(Session session) {&#xA;&#xA;                    }&#xA;                });&#xA;        try {&#xA;            Thread.sleep(5000);&#xA;        } catch (InterruptedException e) {&#xA;            e.printStackTrace();&#xA;        }&#xA;        textView.setText("" &#x2B; fFmpegSession.getState().name() &#x2B; "    " &#x2B; fFmpegSession.getOutput());&#xA;    }&#xA;&#xA;}&#xA;&#xA;

    &#xA;

    As you can see I give the files with file:/// protocol. If I don't use that the resault is the same. The three lines of Log.d(...) will print :

    &#xA;

    2021-06-03 00:58:08.869 8376-8376/net.omidn.aslanmediaconverter D/MainActivity: file:///storage/emulated/0/video_2021-05-29_17-50-20.mp4&#xA;2021-06-03 00:58:08.869 8376-8376/net.omidn.aslanmediaconverter D/MainActivity: file exists : true&#xA;2021-06-03 00:58:08.869 8376-8376/net.omidn.aslanmediaconverter D/MainActivity: file canRead : false&#xA;

    &#xA;

    The video file has read access on the storage :&#xA;The video file has read access

    &#xA;