Recherche avancée

Médias (1)

Mot : - Tags -/book

Autres articles (34)

  • 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

  • Utilisation et configuration du script

    19 janvier 2011, par

    Informations spécifiques à la distribution Debian
    Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
    Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
    Récupération du script
    Le script d’installation peut être récupéré de deux manières différentes.
    Via svn en utilisant la commande pour récupérer le code source à jour :
    svn co (...)

  • Installation en mode standalone

    4 février 2011, par

    L’installation de la distribution MediaSPIP se fait en plusieurs étapes : la récupération des fichiers nécessaires. À ce moment là deux méthodes sont possibles : en installant l’archive ZIP contenant l’ensemble de la distribution ; via SVN en récupérant les sources de chaque modules séparément ; la préconfiguration ; l’installation définitive ;
    [mediaspip_zip]Installation de l’archive ZIP de MediaSPIP
    Ce mode d’installation est la méthode la plus simple afin d’installer l’ensemble de la distribution (...)

Sur d’autres sites (2663)

  • FFMPEG : Adding font to Video gives error

    7 juin 2016, par janki gadhiya

    I am trying to execute ffmpeg on android. I have successfully executed 2-3 commands also. But i am stuck at one point where i am adding text to the video.

    Here is the command i am executing.

    NOT WORKING : because the text argument has a space between two words.

    "-i "+path+"out.mp4 -vf drawtext=fontfile="+path+"f1.ttf:text='Stack OverFlow' -y -c:v libx264 -c:a copy -movflags +faststart "+path+"output.mp4"

    WORKING : just removed space.

    "-i "+path+"out.mp4 -vf drawtext=fontfile="+path+"f1.ttf:text='StackOverFlow' -y -c:v libx264 -c:a copy -movflags +faststart "+path+"output.mp4"

    Here path contains my external Sd card’s path. out.mp4 and f1.ttf exists in my folder.

    My Question is why it is not working with space.

    Here is the stack trace i am getting.

    FAILED with output : WARNING: linker: /data/data/com.github.hiteshsondhi88.sampleffmpeg/files/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
    ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
    built with gcc 4.8 (GCC)
    configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/i686-linux-android- --arch=x86 --cpu=i686 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/x86 --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all -march=i686' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
    libavutil      55. 17.103 / 55. 17.103
    libavcodec     57. 24.102 / 57. 24.102
    libavformat    57. 25.100 / 57. 25.100
    libavdevice    57.  0.101 / 57.  0.101
    libavfilter     6. 31.100 /  6. 31.100
    libswscale      4.  0.100 /  4.  0.100
    libswresample   2.  0.101 /  2.  0.101
    libpostproc    54.  0.100 / 54.  0.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Testing/out.mp4':
    Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.25.100
    Duration: 00:00:05.00, start: 0.000000, bitrate: 117 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 300x300 [SAR 40:33 DAR 40:33], 113 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
    handler_name    : VideoHandler
    [NULL @ 0xb585f000] Unable to find a suitable output format for 'text='Stack'
    text='Stack: Invalid argument

    Why it is saying invalid argument. It will be great if any ffmpeg expert can guide me in what i am doing wrong here.

    I have refered this Question of SO : Text on video ffmpeg

  • avformat_open_input fails intermittently with avfoundation due to "audio format is not supported"

    27 septembre 2019, par NaderNader

    My application uses the ffmpeg APIs (avformat, avdevice, etc) to open a selected audio input for encoding. For some inputs I can reliably open them the first time, but when I close and reopen that input later, the avformat_open_input() call fails due to "audio format is not supported". My testing shows that it never fails the first time after starting my, and has only about a 50% chance of success when reopening.

    The failure only occurs with my "Built-in Microphone" audio input. I have a USB audio card that reliably opens and closes repeatedly. I have read the documentation and see that the proper way to free the resources after opening is to call avformat_close_input. The only way I have found to guarantee success is to only open the input once.

    I have written a test program to recreate these failures.

    int main() {

       avdevice_register_all();

       cout << "Running open audio test" << endl;


       int i;
       for(i = 0; i< 10; i++) {

           AVDictionary* options = NULL;
           AVInputFormat* inputFormat = av_find_input_format("avfoundation");
           if (!inputFormat) {
               cout << "avfoundation inputFormat=null" << endl;
           }

           AVFormatContext* formatContext = avformat_alloc_context();
           int result = avformat_open_input(&formatContext, ":1", inputFormat, &options);
           if (result < 0) {
               char error[256];
               av_strerror(result, error, sizeof(error));
               cout << "result=" << result << " " << error << endl;
           } else {
               cout << "input opened successfully" << endl;
           }

           sleep(1);

           avformat_close_input(&formatContext);

           sleep(1);

       }

       return 0;
    }

    I would expect the main loop to succeed each time but a typical output shows a high failure rate :

    Running open audio test

    input opened successfully
    [avfoundation @ 0x7fdeb281de00] audio format is not supported
    result=-5 Input/output error
    [avfoundation @ 0x7fdeb2001400] audio format is not supported
    result=-5 Input/output error
    [avfoundation @ 0x7fdeb2001400] audio format is not supported
    result=-5 Input/output error
    input opened successfully
    input opened successfully
    input opened successfully
    [avfoundation @ 0x7fdeb2068800] audio format is not supported
    result=-5 Input/output error
    input opened successfully
    input opened successfully

    I have tried increasing the sleep time between close and open to 5 seconds, but saw no difference in behavior.

    The source of the failure is https://github.com/FFmpeg/FFmpeg/blob/master/libavdevice/avfoundation.m#L672

    It appears avfoundation.m internally is opening an input stream and grabbing an audio frame to determine the format, but the value returned is not valid sometimes, when the process has previously opened and closed that input.

    Am I not closing the resources properly ? Do I have a hardware issue specific to my macbook ?

    Additional Details :

    Tested MacBook Pro with MacOS Mojave 10.14.6
    Tested with Ffmpeg 3.4.1, 4.0, and 4.1

    list_devices :

    [AVFoundation input device @ 0x7f80fff066c0] AVFoundation video devices:
    [AVFoundation input device @ 0x7f80fff066c0] [0] FaceTime HD Camera
    [AVFoundation input device @ 0x7f80fff066c0] [1] Capture screen 0
    [AVFoundation input device @ 0x7f80fff066c0] AVFoundation audio devices:
    [AVFoundation input device @ 0x7f80fff066c0] [0] Behringer Duplex
    [AVFoundation input device @ 0x7f80fff066c0] [1] Built-in Microphone
    [AVFoundation input device @ 0x7f80fff066c0] [2] USB Audio CODEC
  • FFMPEG:Merging Audio(.mp3) and single image convert them into a Video

    5 juin 2013, par Nitish Singla

    I want to merge IMAGE + AUDIO and convert them into video using FFMPEG library,i compiled the library successfully,and got libfmpeg.so.but getting problem to execute the ffmpeg command through java code.This is command which i am using...
    "ffmpeg -i image8.jpg -i file.m4a -acodec copy test.mp4"
    if i execute this ffmpeg command through CMD,my video.mp4 file is successfully created,but if exceute same command through my Activity,it doesnot create any file.

    MY CODE IS :

    public class Mpeg extends Activity

    static {

       System.loadLibrary("ffmpeg");

    }

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

    File mf = Environment.getExternalStorageDirectory() ;

       String livestream = mf.getAbsoluteFile()+"smile.png";

       String folderpth = mf.getAbsoluteFile()+"RABBA.MP3";

       //String output="/home/saicomputer/game.mp4";

       String output = new File(Environment.getExternalStorageDirectory(), "video.mp4").getAbsolutePath();
       Log.i("Test", "Let's set output to " + output);

       String cmd="ffmpeg -i "+ livestream +" -i "+ folderpth +" -acodec copy "+ output;

        Log.e("chck plzzzzz", "after "+ cmd);

       //String jaiho="ffmpeg -i image8.jpg -i file.m4a -acodec copy test.mp4";

       try{

       Process p = Runtime.getRuntime().exec(cmd);

       }
    catch(Exception e)
    {
       System.out.println("exception"+e);
    }
    enter code here
    CONSOLE OUTPUT-
    06-05 17:58:11.466: E/image(1189): imageeeeeeeee /mnt/sdcard/smile.png
    06-05 17:58:11.466: E/Test(1189): songggggggggg /mnt/sdcard/RABBA.MP3
    06-05 17:58:11.476: E/Test(1189): outputttttt /mnt/sdcard/video.mp4
    06-05 17:58:11.476: E/chck plzzzzz(1189): after ffmpeg -i /mnt/sdcard/smile.png -i      /mnt/sdcard/RABBA.MP3 -acodec copy /mnt/sdcard/video.mp4

    enter code here
    06-05 17:58:10.686: D/dalvikvm(1189): Trying to load lib /data/data/com.example.myfmpeg /lib/libffmpeg.so 0x412a5cf0
    06-05 17:58:10.756: I/dalvikvm(1189): threadid=3: reacting to signal 3
    06-05 17:58:10.955: D/dalvikvm(1189): Added shared lib /data/data/com.example.myfmpeg/lib/libffmpeg.so 0x412a5cf0
    06-05 17:58:10.955: D/dalvikvm(1189): No JNI_OnLoad found in /data/data/com.example.myfmpeg/lib/libffmpeg.so 0x412a5cf0, skipping init
    06-05 17:58:11.024: I/dalvikvm(1189): Wrote stack traces to '/data/anr/traces.txt'
    06-05 17:58:11.215: I/dalvikvm(1189): threadid=3: reacting to signal 3
    06-05 17:58:11.326: I/dalvikvm(1189): Wrote stack traces to '/data/anr/traces.txt'
    06-05 17:58:11.466: E/image(1189): imageeeeeeeee /mnt/sdcard/smile.png
    06-05 17:58:11.466: E/Test(1189): songggggggggg /mnt/sdcard/RABBA.MP3
    06-05 17:58:11.476: E/Test(1189): outputttttt /mnt/sdcard/video.mp4
    06-05 17:58:11.476: E/chck plzzzzz(1189): after ffmpeg -i /mnt/sdcard/smile.png -i /mnt/sdcard/RABBA.MP3 -acodec copy /mnt/sdcard/video.mp4
    0 6-05 17:58:11.896: E/AndroidRuntime(1189): FATAL EXCEPTION: main
    06-05 17:58:11.896: E/AndroidRuntime(1189): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myfmpeg/com.example.myfmpeg.Mpeg}: java.lang.RuntimeException: java.io.IOException: Error running exec(). Command: [ffmpeg, -i, /mnt/sdcard/smile.png, -i, /mnt/sdcard/RABBA.MP3, -acodec, copy, /mnt/sdcard/video.mp4] Working Directory: null Environment: null
    06-05 17:58:11.896: E/AndroidRuntime(1189):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
    06-05 17:58:11.896: E/AndroidRuntime(1189):     at
    06-05 17:58:11.896: E/AndroidRuntime(1189): Caused by: java.lang.RuntimeException: java.io.IOException: Error running exec(). Command: [ffmpeg, -i, /mnt/sdcard/smile.png, -i, /mnt/sdcard/RABBA.MP3, -acodec, copy, /mnt/sdcard/video.mp4] Working Directory: null       Environment: null