Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (51)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

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

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (7075)

  • FFmpeg error parsing stats_file option when called from Python

    12 août 2022, par user3311005

    I can run this command on the CMD console :

    


    ffmpeg -i image_output\cbar_240_rec.bmp -i test_images\cbar_240.bmp -lavfi psnr=stats_file=cbar_240_rec_psnr.csv -f null -


    


    Running this command from Python is giving me an error.

    


      cmd = f'ffmpeg -i image_output\cbar_240_rec.bmp -i test_images\cbar_240.bmp -lavfi psnr=stats_file=test_images\cbar_240_rec.csv -f null -'
  retcode = subprocess.call( cmd, shell=True )


    


    Gives me an error parsing the stats_file. Here's the last part of the print output.

    


    [psnr @ 000001ca992e90c0] Unable to parse option value "extronbuildsburbank_pure3_adam_dev_4381simrivieraimage_outputcbar_240_rec.csv"
[psnr @ 000001ca992e90c0] [Eval @ 000000825e9febc0] Undefined constant or missing '(' in 'extronbuildsburbank_pure3_adam_dev_4381simrivieraimage_outputcbar_240_rec.csv'
[psnr @ 000001ca992e90c0] Unable to parse option value "extronbuildsburbank_pure3_adam_dev_4381simrivieraimage_outputcbar_240_rec.csv"
[psnr @ 000001ca992e90c0] Error setting option stats_version to value extronbuildsburbank_pure3_adam_dev_4381simrivieraimage_outputcbar_240_rec.csv.
[Parsed_psnr_0 @ 000001ca992e8fc0] Error applying options to the filter.
[AVFilterGraph @ 000001ca98dcde80] Error initializing filter 'psnr' with args 'stats_file=C:extronbuildsburbank_pure3_adam_dev_4381simrivieraimage_outputcbar_240_rec.csv'
Error initializing complex filters.
Invalid argument


    


  • ProcessBuilder is not called when trying to start a process

    15 juin 2022, par xnok

    I am trying to understand more about the ffmpeg usage in JavaCV for android studio and for said task I am trying to use ProcessBuilder. I tried writting a simple program to debug the pb.start(); Although, I am not getting a response. What I did was to start a default/empty activity and pasted the following program :

    


    package com.example.myapplication;

import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AppCompatActivity;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;

import org.bytedeco.javacpp.Loader;

import android.os.Build;
import android.os.Bundle;
import android.util.Log;

public class MainActivity extends AppCompatActivity {
    static final int cols = 192;
    static final int rows = 108;
    static final String ffmpeg = Loader.load(org.bytedeco.ffmpeg.ffmpeg.class);
    static final String rtmp_url = "test.flv";
    static final String[] command = {ffmpeg,
            "-y",
            "-f", "rawvideo",
            "-vcodec", "rawvideo",
            "-pix_fmt", "bgr24",
            "-s", (Integer.toString(cols) + "x" + Integer.toString(rows)),
            "-r", "10",
            "-i", "pipe:",
            "-c:v", "libx264",
            "-pix_fmt", "yuv420p",
            "-preset", "ultrafast",
            "-f", "flv",
            rtmp_url};
    @RequiresApi(api = Build.VERSION_CODES.O)
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        new Thread(t1).start();

    }
    private static Runnable t1 = () -> {
        Log.e("TAG", "void OnCreate called successfully!");
        ProcessBuilder pb = new ProcessBuilder(command).redirectErrorStream(true);
        pb.redirectErrorStream(true);
        try {
            Process process = pb.start();
            BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
            OutputStream writer = process.getOutputStream();
            Log.e("TAG", "Something good happened here");
        } catch (IOException e) {
            e.printStackTrace();
            Log.e("TAG", "Nothing good happened here");
        }
    };


}


    


    My current problem is that I can't seem to start properly the processBuilder process via pb.start() ;

    


    I get the following logs from the logcat panel :

    


    2022-06-14 17:24:46.328 13371-13371/com.example.myapplication E/TAG: void OnCreate called successfully!
2022-06-14 17:24:46.333 13371-13371/com.example.myapplication E/TAG: Nothing good happened here


    


    I'd like to understand why is it skipping the try/catch block and not starting the process ?

    


    EDIT : I made some changes as per @g00se's suggestions and I got the following stack trace from the code above :

    


    2022-06-15 00:32:26.700 29787-29787/? E/USNET: USNET: appName: com.example.myapplication
2022-06-15 00:32:29.328 29787-29828/com.example.myapplication E/TAG: void OnCreate called successfully!
2022-06-15 00:32:29.330 29787-29828/com.example.myapplication E/AndroidRuntime: FATAL EXCEPTION: Thread-4
    Process: com.example.myapplication, PID: 29787
    java.lang.NullPointerException
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1012)
        at com.example.myapplication.MainActivity.lambda$static$0(MainActivity.java:48)
        at com.example.myapplication.MainActivity$$ExternalSyntheticLambda0.run(Unknown Source:0)
        at java.lang.Thread.run(Thread.java:920)


    


  • avcodec/avcodec : Store whether AVCodec->close needs to be called

    18 avril 2021, par Andreas Rheinhardt
    avcodec/avcodec : Store whether AVCodec->close needs to be called
    

    Right now all AVCodecContexts except those using frame-threaded decoding
    call the codec's init function and expect its close function to be
    called. In order to make sure that the close function is not called for
    frame-threaded decoding ff_frame_thread_free() resets
    AVCodecContext.codec (and because of this it has to free the private
    AVOptions of the main AVCodecContext itself). This is not obvious and
    potentially fragile. Instead add a field to AVCodecInternal that
    indicates whether close should be called for this AVCodecContext.
    It is always zero when using frame-threaded decoding, so that resetting
    the codec is no longer necessary and has been removed.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavcodec/avcodec.c
    • [DH] libavcodec/internal.h
    • [DH] libavcodec/pthread_frame.c