Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (108)

  • 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

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

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (14816)

  • Unable to convert video to mp4 formate

    11 avril 2017, par Usman Saeed

    I have to convert video (any format) to mp4 format
    I am using this android library WritingMinds

    Here is my code

     ffmpeg = FFmpeg.getInstance(UploadVideoService.this);
               loadFFMpegBinary();

               String newVideoPath = Utils.makeAndGetFolderName(Constants.PHOTEX_VIDEO);
               File file = new File(newVideoPath + File.separator +
                       System.currentTimeMillis() + ".mp4");
               if (file.exists()) {
                   file.delete();
               }

               File fileOrignal = new File(videoFilePath);
               if (fileOrignal.exists()) {
                   try {
                       InputStream is =new FileInputStream(videoFilePath);
                       int size = is.available();
                       byte[] buffer = new byte[size];
                       is.read(buffer);
                       is.close();
                       FileOutputStream fos = new FileOutputStream(file);
                       fos.write(buffer);
                       fos.close();


                       String command = "-i " + fileOrignal.getAbsolutePath()
                               + " -c:v libx264 -c:a aac -movflags faststart " + file.getAbsolutePath();

                       execFFmpegBinary(new String[]{command});
                   } catch (Exception e) {
                       Log.d(TAG, "Exception ");
                       e.printStackTrace();
                   }

       private void loadFFMpegBinary() {
       try {
           ffmpeg.loadBinary(new LoadBinaryResponseHandler() {
               @Override
               public void onFailure() {
                   // TODO: 11-Apr-17 Notification and toast
               }

               @Override
               public void onSuccess() {
                   super.onSuccess();




               }
           });
       } catch (FFmpegNotSupportedException e) {
           e.printStackTrace();
       }
    }

       private void execFFmpegBinary(final String[] command) {
       try {
           ffmpeg.execute(command, new ExecuteBinaryResponseHandler() {
               @Override
               public void onFailure(String s) {
                   Log.d(TAG, "onFailure " + s);
               }

               @Override
               public void onSuccess(String s) {
                   Log.d(TAG, "onSuccess " + s);
               }

               @Override
               public void onProgress(String s) {
                   Log.d(TAG, "onProgress " + s);
               }


               @Override
               public void onStart() {
                   Log.d(TAG, "onStart ");
               }

               @Override
               public void onFinish() {
                   Log.d(TAG, "onFinish ");

               }
           });
       } catch (FFmpegCommandAlreadyRunningException e) {
           e.printStackTrace();
           // do nothing for now
           Log.d(TAG, "FFmpegCommandAlreadyRunningException ");
       }
    }

    its give these error

                                                                                   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
                                                                                 Unrecognized option 'i /storage/emulated/0/Movies/mvd.avi -c:v libx264 -c:a aac -movflags faststart /storage/emulated/0/Photex/photexVideo/1491909522363.mp4'.
                                                                                 **Error splitting the argument list: Option not found**

    04-11 16:18:43.158 11529-11529/com.photex.urdu.textonphotos D/UploadVideoService : onFinish

    I am unable to understand how to solve this !

  • ffmpeg isn't accepting "%d" format ?

    7 janvier 2017, par Tim Wescott

    So, I have a directory full of files named motor_animate_000.gif, motor_animate_001.gif, etc.

    I run :

    ffmpeg -r 30 -i motor_animate_%03d.gif -r 30 motor.mpg

    I expect to get a file called motor.mpg, but instead I get the usual bunch of printout, ending with :

    motor_animate_%03d.gif: No such file or directory

    What ? This worked in Ubuntu 14.04, but doesn’t work now. What I’m doing appears to be consistent with the ffmpeg man page. I’m now officially clueless. Thanks in advance.

    Here’s what I get when I try the alternate suggested below :

    tim@Servo:~/Documents/Movies/dcmotor/animation$ ffmpeg -f image2 -framerate 30 -i motor_animate_%03d.gif motor.mpg
    ffmpeg version 2.8.10-0ubuntu0.16.04.1 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
     configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
     libavutil      54. 31.100 / 54. 31.100
     libavcodec     56. 60.100 / 56. 60.100
     libavformat    56. 40.101 / 56. 40.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 40.101 /  5. 40.101
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  2.101 /  1.  2.101
     libpostproc    53.  3.100 / 53.  3.100
    [image2 @ 0x20bd420] Could not find codec parameters for stream 0 (Video: none, none): unknown codec
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    motor_animate_%03d.gif: could not find codec parameters
    Input #0, image2, from 'motor_animate_%03d.gif':
     Duration: 00:00:04.03, start: 0.000000, bitrate: N/A
       Stream #0:0: Video: none, none, 30 fps, 30 tbr, 30 tbn, 30 tbc
    No decoder for stream #0:0, filtering impossible
    Error opening filters!
  • ffmpeg custom compile options with hardware/software support

    14 mars 2023, par Capitalmind

    My last compile enabled nvidia/cuda but even though I included —enable-nonfree in the configure, I had issues encoding videos, with outputs like :

    


    ffmpeg -hwaccel cuvid -c:v h264_cuvid -resize 1920x1080 -i Input.mkv -c:a copy -c:v h264_nvenc -preset slow -rc vbr_hq -cq 18 Output.mkv

    


    Giving errors like :

    


    ffmpeg -hwaccel cuvid -c:v h264_cuvid -resize 1920x1080 -i /media/zuultux/Video/Movies/Lawrence.of.Arabia.1962.UHD.BluRay.2160p.TrueHD.Atmos.7.1.HEVC.mkv -c:a copy -c:v h264_nvenc -preset slow -rc vbr_hq -cq 18 /media/zuultux/Video/Lawrence.of.Arabia.1962.UHD.BluRay.1080p.TrueHD.Atmos.7.1.HEVC.mkv


    


    [hevc_cuvid @ 0x5624718179c0] Codec hevc_cuvid is not supported.
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (hevc_cuvid) -> h264 (h264_nvenc))
  Stream #0:1 -> #0:1 (copy)


    


    My actual configure reads :

    


    ./configure --enable-nonfree --enable-cuda-nvcc --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64


    


    There a heaps of options on Githhub. Can anyone suggest how to include parameters that specifically :

    


      

    • Toggle enable AMD64/Nvidia or non-hardware processing
    • 


    • All free and non-free codecs, but particularly VC9, H264/265
    • 


    • Or basically enable as many features as possible !
    • 


    


    Note I already have ubuntu-restricted-extras installed.

    


    Configuration used compiled correctly but gave errors when using. Several media files selected to test. nvidia-smi command responds NVIDIA-SMI 470.161.03 Driver Version : 470.161.03 CUDA Version : 11.4

    



    


    Edit

    


    After fixing the problem I thought to share my results on Github. https://github.com/Capitalmind/makeffmpeg