Recherche avancée

Médias (1)

Mot : - Tags -/wave

Autres articles (95)

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

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • 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

Sur d’autres sites (4900)

  • FFmpeg convert single image into video Android

    15 mai 2014, par berserk

    I am trying to convert a single image into a video using FFmpeg. I have tried following the files :

    "ffmpeg  -analyzeduration 2147483647 -probesize 2147483647 -i " + packat.get(i).path +"-r 25 -t 1000 -y op.mp4"

    "ffmpeg -loop 1 -r 23.976 -i input.jpg -t 00:00:02 -vcodec qtrle -an output.mov"

    "ffmpeg -i c:\rawvideo\mask.bmp -loop 1 -r 29.97 -s 720x480
           -aspect 4:3 -t 00:04:05 -vcodec mjpeg -vb 11261600 -an
           c:\rawvideo\fullmask.avi"

    But all of them give me this annoying error :

    Can not process SOS before SOF, skipping marker parser used 0 bytes (0 bits) decode frame unused 0 bytes decoding for stream 0 failed
    Could not find codec parameters for stream 0 (Video: mjpeg): unspecified size
    Consider increasing the value for the 'analyzeduration' and 'probesize' options /storage/sdcard0/cblVE/temp/0.jpg: could not find codec parameters
    exit_program: 1

    Please help. I have searched for a solution from a week, but I have found nothing.

  • Command does not complete when executed through a .NET Process ?

    7 mai 2014, par Abe Miessler

    I am using ffmpeg to convert audio files. If I do it through the command line like so :

    ffmpeg -i sourceAudio.wma -f mp3 destAudio.mp3

    it works fine. But when I attempt to do the same thing in a .net application using a Process, ffmpeg starts (and is visible as a running process in my task manager), but never completes. My .NET code never executes past the "WaitForExit" portion unless I go into my task manager and kill the process manually. Code :

    using(Process process = new Process())
    {
       process.StartInfo.RedirectStandardOutput = true;
       //process.StartInfo.RedirectStandardError = true;
       process.StartInfo.FileName = Path.GetDirectoryName(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName) + @"\ffmpeg.exe";
       File.Copy(OrigFilePath, LocalFileName, true);
       System.Diagnostics.EventLog.WriteEntry("ASP.NET 2.0.50727.0", "Copied file from: " + OrigFilePath + System.Environment.NewLine + "to: " + LocalFileName);
       process.StartInfo.Arguments = String.Format(@"-i ""{0}"" -f mp3 ""{1}""",
                                       LocalFileName,
                                       tempDirectory + NewFileName);


       process.StartInfo.UseShellExecute = false;
       process.StartInfo.CreateNoWindow = false;
       process.Start();
       System.Diagnostics.EventLog.WriteEntry("ASP.NET 2.0.50727.0", "After start...");
       string output =  process.StandardOutput.ReadToEnd() + System.Environment.NewLine + process.StandardError.ReadToEnd();
       process.WaitForExit();  //<------------------------------ stalls here
       System.Diagnostics.EventLog.WriteEntry("ASP.NET 2.0.50727.0", "Conversion completed!  Copying file from: " + LocalConvertedFile + System.Environment.NewLine + OrigFileFolder + "\\" + NewFileName);

       File.Copy(LocalConvertedFile, OrigFileFolder + "\\" + NewFileName,true);
       File.Delete(LocalFileName);
       File.Delete(LocalConvertedFile);
       sw.Stop();
       System.Diagnostics.EventLog.WriteEntry("ASP.NET 2.0.50727.0", "Conversion complete. Elapsed time in seconds: " + sw.ElapsedMilliseconds/1000);
       return true;
    }

    Does anyone know why the process isn’t exiting like it does in the command line ?

  • when i record video with javacv it comes "java.lang.NoClassDefFoundError : org.bytedeco.javacpp.avutil"

    9 avril 2020, par Pradeep Simba

    I make a video recorder android app with javacv.
But, when i run this app this error occurs "java.lang.NoClassDefFoundError : org.bytedeco.javacpp.avutil".

    



    How can I solve this error ?

    



    gradle.build file

    



      android {
   ..............
    packagingOptions {
        exclude 'META-INF/services/javax.annotation.processing.Processor'
        pickFirst  'META-INF/maven/org.bytedeco.javacpp-presets/opencv/pom.properties'
        pickFirst  'META-INF/maven/org.bytedeco.javacpp-presets/opencv/pom.xml'
        pickFirst  'META-INF/maven/org.bytedeco.javacpp-presets/ffmpeg/pom.properties'
        pickFirst  'META-INF/maven/org.bytedeco.javacpp-presets/ffmpeg/pom.xml'
    }
}

dependencies {

implementation group: 'org.bytedeco', name: 'javacv', version: '1.1'
implementation group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '3.0.0-1.1', classifier: 'android-arm'
implementation group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: '2.8.1-1.1', classifier: 'android-arm'
implementation group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '3.0.0-1.1', classifier: 'android-x86'
implementation group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: '2.8.1-1.1', classifier: 'android-x86'

}


    



    My demo code VideoService which will invoke in MainActivity

    



    package com.fs.fs.api;

import com.fs.fs.App;
import com.fs.fs.utils.DateUtils;
import com.fs.fs.utils.FileUtils;

import org.bytedeco.javacpp.avcodec;
import org.bytedeco.javacv.FFmpegFrameRecorder;
import org.bytedeco.javacv.FrameRecorder;

import java.util.Date;

/**
 * Created by wyx on 2017/1/11.
 */
public class VideoService {
    private FFmpegFrameRecorder mFrameRecorder;
    private String path;

    private VideoService() {
    }

    private static class SingletonHolder {
        private static final VideoService INSTANCE = new VideoService();
    }

    public static VideoService getInstance() {
        return SingletonHolder.INSTANCE;
    }

    public void startRecordVideo() {
        String fileName = String.format("%s.%s", DateUtils.date2String(new Date(), "yyyyMMdd_HHmmss"), "mp4");
        path = FileUtils.getExternalFullPath(App.getInstance(), fileName);
        mFrameRecorder = new FFmpegFrameRecorder(path, 640, 480, 1);
        mFrameRecorder.setVideoCodec(avcodec.AV_CODEC_ID_H264);
        mFrameRecorder.setVideoOption("tune", "zerolatency");
        mFrameRecorder.setVideoOption("preset", "ultrafast");
        mFrameRecorder.setVideoOption("crf", "28");
        mFrameRecorder.setVideoBitrate(300 * 1000);
        mFrameRecorder.setFormat("mp4");

        mFrameRecorder.setFrameRate(30);
        mFrameRecorder.setAudioOption("crf", "0");
        mFrameRecorder.setSampleRate(48 * 1000);
        mFrameRecorder.setAudioBitrate(960 * 1000);
        mFrameRecorder.setAudioCodec(avcodec.AV_CODEC_ID_AAC);
        try {
            mFrameRecorder.start();
        } catch (FrameRecorder.Exception e) {
            e.printStackTrace();
        }
    }

    public void stop() {
        if (mFrameRecorder != null) {
            try {
                mFrameRecorder.stop();
                mFrameRecorder.release();
            } catch (FrameRecorder.Exception e) {
                e.printStackTrace();
            }
            mFrameRecorder = null;
        }
    }

}


    



    MainActivity

    



    package com.fs.fs.activity;

import android.app.Activity;
import android.os.Bundle;

import com.fs.fs.R;
import com.fs.fs.api.VideoService;

import static java.lang.Thread.sleep;


public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);


        VideoService.getInstance().startRecordVideo();
        try {
            sleep(10 * 1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        VideoService.getInstance().stop();
    }
}


    



    Error

    



        E/AndroidRuntime: FATAL EXCEPTION: main&#xA;    Process: com.example.usb, PID: 660&#xA;    java.lang.NoClassDefFoundError: org.bytedeco.javacpp.avutil&#xA;                      at org.bytedeco.javacpp.Loader.load(Loader.java:590)&#xA;                      at org.bytedeco.javacpp.Loader.load(Loader.java:530)&#xA;                      at org.bytedeco.javacpp.avcodec$AVPacket.<clinit>(avcodec.java:1694)&#xA;                      at org.bytedeco.javacv.FFmpegFrameRecorder.<init>(FFmpegFrameRecorder.java:149)&#xA;                      at com.fs.fs.api.VideoService.startRecordVideo(VideoService.java:34)&#xA;                      at com.fs.fs.activity.MainActivity.onCreate(MainActivity.java:75)&#xA;                      at android.app.Activity.performCreate(Activity.java:5304)&#xA;                      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1090)&#xA;                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2245)&#xA;                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2331)&#xA;                      at android.app.ActivityThread.access$1000(ActivityThread.java:143)&#xA;                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1244)&#xA;                      at android.os.Handler.dispatchMessage(Handler.java:102)&#xA;                      at android.os.Looper.loop(Looper.java:136)&#xA;                      at android.app.ActivityThread.main(ActivityThread.java:5291)&#xA;                      at java.lang.reflect.Method.invokeNative(Native Method)&#xA;                      at java.lang.reflect.Method.invoke(Method.java:515)&#xA;                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)&#xA;                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)&#xA;                      at dalvik.system.NativeStart.main(Native Method)&#xA;                   Caused by: java.lang.ClassNotFoundException: org.bytedeco.javacpp.avutil&#xA;                      at java.lang.Class.classForName(Native Method)&#xA;                      at java.lang.Class.forName(Class.java:251)&#xA;                      at org.bytedeco.javacpp.Loader.load(Loader.java:585)&#xA;                      at org.bytedeco.javacpp.Loader.load(Loader.java:530)&#xA0;&#xA;                      at org.bytedeco.javacpp.avcodec$AVPacket.<clinit>(avcodec.java:1694)&#xA0;&#xA;                      at org.bytedeco.javacv.FFmpegFrameRecorder.<init>(FFmpegFrameRecorder.java:149)&#xA0;&#xA;                      at com.fs.fs.api.VideoService.startRecordVideo(VideoService.java:34)&#xA0;&#xA;                      at com.fs.fs.activity.MainActivity.onCreate(MainActivity.java:75)&#xA0;&#xA;                      at android.app.Activity.performCreate(Activity.java:5304)&#xA0;&#xA;                      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1090)&#xA0;&#xA;                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2245)&#xA0;&#xA;                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2331)&#xA0;&#xA;                      at android.app.ActivityThread.access$1000(ActivityThread.java:143)&#xA0;&#xA;                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1244)&#xA0;&#xA;                      at android.os.Handler.dispatchMessage(Handler.java:102)&#xA0;&#xA;                      at android.os.Looper.loop(Looper.java:136)&#xA0;&#xA;                      at android.app.ActivityThread.main(ActivityThread.java:5291)&#xA0;&#xA;                      at java.lang.reflect.Method.invokeNative(Native Method)&#xA0;&#xA;                      at java.lang.reflect.Method.invoke(Method.java:515)&#xA0;&#xA;                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)&#xA0;&#xA;                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)&#xA0;&#xA;                      at dalvik.system.NativeStart.main(Native Method)&#xA0;&#xA;                   Caused by: java.lang.NoClassDefFoundError: org/bytedeco/javacpp/avutil&#xA;                      at java.lang.Class.classForName(Native Method)&#xA0;&#xA;                      at java.lang.Class.forName(Class.java:251)&#xA0;&#xA;                      at org.bytedeco.javacpp.Loader.load(Loader.java:585)&#xA0;&#xA;                      at org.bytedeco.javacpp.Loader.load(Loader.java:530)&#xA0;&#xA;                      at org.bytedeco.javacpp.avcodec$AVPacket.<clinit>(avcodec.java:1694)&#xA0;&#xA;                      at org.bytedeco.javacv.FFmpegFrameRecorder.<init>(FFmpegFrameRecorder.java:149)&#xA0;&#xA;                      at com.fs.fs.api.VideoService.startRecordVideo(VideoService.java:34)&#xA0;&#xA;                      at com.fs.fs.activity.MainActivity.onCreate(MainActivity.java:75)&#xA0;&#xA;                      at android.app.Activity.performCreate(Activity.java:5304)&#xA0;&#xA;                      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1090)&#xA0;&#xA;                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2245)&#xA0;&#xA;                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2331)&#xA0;&#xA;                      at android.app.ActivityThread.access$1000(ActivityThread.java:143)&#xA0;&#xA;                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1244)&#xA0;&#xA;                      at android.os.Handler.dispatchMessage(Handler.java:102)&#xA0;&#xA;                      at android.os.Looper.loop(Looper.java:136)&#xA0;&#xA;                      at android.app.ActivityThread.main(ActivityThread.java:5291)&#xA0;&#xA;                      at java.lang.reflect.Method.invokeNative(Native Method)&#xA0;&#xA;                      at java.lang.reflect.Method.invoke(Method.java:515)&#xA0;&#xA;                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)&#xA0;&#xA;                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)&#xA0;&#xA;                      at dalvik.system.NativeStart.main(Native Method)&#xA0;&#xA;                   Caused by: java.lang.ClassNotFoundException: Didn&#x27;t find class "org.bytedeco.javacpp.avutil" on path: DexPathList[[zip file "/data/app/com.fs.fs-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.fs.fs-2, /vendor/lib, /system/lib, /data/datalib]]&#xA;                      at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)&#xA;                      at java.lang.ClassLoader.loadClass(ClassLoader.java:497)&#xA;                      at java.lang.ClassLoader.loadClass(ClassLoader.java:457)&#xA;                      at java.lang.Class.classForName(Native Method)&#xA0;&#xA;                      at java.lang.Class.forName(Class.java:251)&#xA0;&#xA;                      at org.bytedeco.javacpp.Loader.load(Loader.java:585)&#xA0;&#xA;                      at org.bytedeco.javacpp.Loader.load(Loader.java:530)&#xA0;&#xA;                      at org.bytedeco.javacpp.avcodec$AVPacket.<clinit>(avcodec.java:1694)&#xA0;&#xA;                      at org.bytedeco.javacv.FFmpegFrameRecorder.<init>(FFmpegFrameRecorder.java:149)&#xA0;&#xA;                      at com.fs.fs.api.VideoService.startRecordVideo(VideoService.java:34)&#xA0;&#xA;                      at com.fs.fs.activity.MainActivity.onCreate(MainActivity.java:75)&#xA0;&#xA;                      at android.app.Activity.performCreate(Activity.java:5304)&#xA0;&#xA;                      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1090)&#xA0;&#xA;                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2245)&#xA0;&#xA;                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2331)&#xA0;&#xA;                      at android.app.ActivityThread.access$1000(ActivityThread.java:143)&#xA0;&#xA;                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1244)&#xA0;&#xA;                      at android.os.Handler.dispatchMessage(Handler.java:102)&#xA0;&#xA;                      at android.os.Looper.loop(Looper.java:136)&#xA0;&#xA;                      at android.app.ActivityThread.main(ActivityThread.java:5291)&#xA0;&#xA;                      at java.lang.reflect.Method.invokeNative(Native Method)&#xA0;&#xA;                      at java.lang.reflect.Method.invoke(Method.java:515)&#xA0;&#xA;                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)&#xA0;&#xA;                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)&#xA0;&#xA;                      at dalvik.system.NativeStart.main(Native Method)&#xA0;&#xA;</init></clinit></init></clinit></init></clinit></init></clinit>

    &#xA;&#xA;

    How can i solve this error ?

    &#xA;&#xA;

    Why error occurs ?

    &#xA;