Recherche avancée

Médias (1)

Mot : - Tags -/biographie

Autres articles (51)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (10313)

  • 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;