Recherche avancée

Médias (2)

Mot : - Tags -/kml

Autres articles (52)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Prérequis à l’installation

    31 janvier 2010, par

    Préambule
    Cet article n’a pas pour but de détailler les installations de ces logiciels mais plutôt de donner des informations sur leur configuration spécifique.
    Avant toute chose SPIPMotion tout comme MediaSPIP est fait pour tourner sur des distributions Linux de type Debian ou dérivées (Ubuntu...). Les documentations de ce site se réfèrent donc à ces distributions. Il est également possible de l’utiliser sur d’autres distributions Linux mais aucune garantie de bon fonctionnement n’est possible.
    Il (...)

Sur d’autres sites (6652)

  • Ffmpeg hangs when -vcodec copy specified (called from Java via ProcessBuilder)

    24 juin 2015, par Inglonias

    I’m trying to use ffmpeg to export an array of bytes to a video file, but the people I work with insist that I use -vcodec copy in the arguments for it. This, however, causes the code to hang, whereas if I don’t use -vcodec copy, the code will not hang. I don’t know what the problem is, and I’ve been trying to debug this code for the past two hours.

    Here is the relevant section of code. I’ve added comments above and below the line where the code hangs. Can anybody help me ?

           // This is the tricky part. We need to build an ffmpeg process that
           // takes input from stdin, and then plug Java into that.
           ProcessBuilder ffmpegBuilder = new ProcessBuilder();
           String[] cmd = {"ffmpeg", "-i", "-","-vcodec", "copy", directory
                   + "/" + fileName};
           StringBuilder combinedCmd = new StringBuilder();
           for (String s : cmd) {
               combinedCmd.append(s);
               combinedCmd.append(" ");
           }
           mLogger.log(Level.INFO,"Final command is " + combinedCmd.toString());
           ffmpegBuilder.command(cmd);
           ffmpegBuilder.redirectErrorStream(true); // So that stdout and stderr go
                                                       // to the same stream.
           byte[] dataToWrite = new byte[data.size()];
           for (int i = 0; i < dataToWrite.length; i++) {
               dataToWrite[i] = data.get(i); // Is there really STILL no better way
                                               // to convert an ArrayList to an
                                               // array?!
           }
           try {
               Process ffmpeg = ffmpegBuilder.start();
               OutputStream stdin = ffmpeg.getOutputStream();
               BufferedReader stdout = new BufferedReader(new InputStreamReader(
                       ffmpeg.getInputStream()));
    //HANGS AT THIS LINE vvvvvvvvvvvvvvvv
               stdin.write(dataToWrite);
    //HANGS AT THIS LINE ^^^^^^^^^^^^^^^^

               String line = "I know a song that gets on everybody's nerves...";
               while ((line != null) && stdout.ready()) {
                   line = stdout.readLine();
                   mLogger.log(Level.INFO, line);
               }
               try {
                   ffmpeg.waitFor(2, TimeUnit.SECONDS);
                   ffmpeg.destroyForcibly();
               } catch (InterruptedException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
               }
           } catch (IOException e) {
               // TODO Auto-generated catch block
               e.printStackTrace();
           }
  • stream_loop generate a big size video [FFMPEG]

    26 mars 2021, par Mouaad Abdelghafour AITALI

    I'm trying to loop a short video for e.g. 190 time to match the audio length, I use the following code :

    


    -y -stream_loop  190  -i input.mp4 -c copy output.mp4


    


    The command above works, but it generates video with huge size for video with 3min the size is 885 MB

    


    2021-03-25 23:52:30.445 5687-6253/maa.abc.music_maker D/XXX: LOOPING VIDEO SIZE ===> 885.845MB


    


    Or there's any way I can loop the video to match the audio length without using -stream_loop

    


  • XABE : One or more errors occurred (FFmpeg)

    22 mars 2021, par A Farmanbar

    I am trying to build video from images by below piece of code :

    


    FFmpeg.SetExecutablesPath(dir);
FFmpeg.Conversions.New()
   .BuildVideoFromImages(files)
   .SetInputFrameRate(_video.Fps)
   .SetFrameRate(_video.Fps)
   .SetPixelFormat(PixelFormat.bgr24)
   .SetOutput(dir + "\\output.mp4").Start().Wait();


    


    but I get below error

    


    System.AggregateException: One or more errors occurred. (ffmpeg version n4.3.2-160-gfbb9368226 Copyright (c) 2000-2021 the FFmpeg developers&#xA;  built with gcc 9.3-win32 (GCC) 20200320&#xA;  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-zlib --enable-libxml2 --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-opencl --enable-libvmaf --disable-vulkan --enable-libvorbis --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --disable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libtwolame --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-libs=-lgomp&#xA;  libavutil      56. 51.100 / 56. 51.100&#xA;  libavcodec     58. 91.100 / 58. 91.100&#xA;  libavformat    58. 45.100 / 58. 45.100&#xA;  libavdevice    58. 10.100 / 58. 10.100&#xA;  libavfilter     7. 85.100 /  7. 85.100&#xA;  libswscale      5.  7.100 /  5.  7.100&#xA;  libswresample   3.  7.100 /  3.  7.100&#xA;  libpostproc    55.  7.100 / 55.  7.100&#xA;[mjpeg @ 0000018b7067a780] bits 217 is invalid&#xA;[mjpeg @ 0000018b7067a780] bits 253 is invalid&#xA;[mjpeg @ 0000018b7067a780] bits 159 is invalid&#xA;[mjpeg @ 0000018b7067a780] bits 234 is invalid&#xA;[mjpeg @ 0000018b7067a780] unable to decode APP fields: Invalid data found when processing input&#xA;    Last message repeated 2 times&#xA;[mjpeg @ 0000018b7067a780] Found EOI before any SOF, ignoring&#xA;[mjpeg @ 0000018b7067a780] unable to decode APP fields: Invalid data found when processing input&#xA;    Last message repeated 1 times&#xA;[mjpeg @ 0000018b7067a780] No JPEG data found in image&#xA;[mjpeg @ 0000018b7067a780] bits 95 is invalid&#xA;[mjpeg @ 0000018b7067a780] Found EOI before any SOF, ignoring&#xA;[mjpeg @ 0000018b7067a780] bits 133 is invalid&#xA;[mjpeg @ 0000018b7067a780] bits 31 is invalid&#xA;[mjpeg @ 0000018b7067a780] dqt: invalid precision&#xA;[mjpeg @ 0000018b7067a780] unable to decode APP fields: Invalid data found when processing input&#xA;    Last message repeated 8 times&#xA;[mjpeg @ 0000018b7067a780] No JPEG data found in image&#xA;[mjpeg @ 0000018b7067a780] Found EOI before any SOF, ignoring&#xA;[mjpeg @ 0000018b7067a780] bits 105 is invalid&#xA;[image2 @ 0000018b72294f80] decoding for stream 0 failed&#xA;[image2 @ 0000018b72294f80] Could not find codec parameters for stream 0 (Video: mjpeg (Progressive), none(bt470bg/unknown/unknown), lossless): unspecified size&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; and &#x27;probesize&#x27; options&#xA;Input #0, image2, from &#x27;C:\Users\a\AppData\Local\Temp\79b5fa99-f5a5-4788-b126-ef1549eb2086\img_%03d.jpg&#x27;:&#xA;  Duration: 00:00:00.38, start: 0.000000, bitrate: N/A&#xA;    Stream #0:0: Video: mjpeg (Progressive), none(bt470bg/unknown/unknown), lossless, 29 fps, 29 tbr, 29 tbn, 29 tbc&#xA;File &#x27;C:\Users\a\source\repos\ConsoleApp1\ConsoleApp1\bin\Debug\net5.0\output.mp4&#x27; already exists. Exiting.)&#xA; ---> Xabe.FFmpeg.Exceptions.ConversionException: ffmpeg version n4.3.2-160-gfbb9368226 Copyright (c) 2000-2021 the FFmpeg developers&#xA;  built with gcc 9.3-win32 (GCC) 20200320&#xA;  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-zlib --enable-libxml2 --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-opencl --enable-libvmaf --disable-vulkan --enable-libvorbis --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --disable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libtwolame --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-libs=-lgomp&#xA;  libavutil      56. 51.100 / 56. 51.100&#xA;  libavcodec     58. 91.100 / 58. 91.100&#xA;  libavformat    58. 45.100 / 58. 45.100&#xA;  libavdevice    58. 10.100 / 58. 10.100&#xA;  libavfilter     7. 85.100 /  7. 85.100&#xA;  libswscale      5.  7.100 /  5.  7.100&#xA;  libswresample   3.  7.100 /  3.  7.100&#xA;  libpostproc    55.  7.100 / 55.  7.100&#xA;[mjpeg @ 0000018b7067a780] bits 217 is invalid&#xA;[mjpeg @ 0000018b7067a780] bits 253 is invalid&#xA;[mjpeg @ 0000018b7067a780] bits 159 is invalid&#xA;[mjpeg @ 0000018b7067a780] bits 234 is invalid&#xA;[mjpeg @ 0000018b7067a780] unable to decode APP fields: Invalid data found when processing input&#xA;    Last message repeated 2 times&#xA;[mjpeg @ 0000018b7067a780] Found EOI before any SOF, ignoring&#xA;[mjpeg @ 0000018b7067a780] unable to decode APP fields: Invalid data found when processing input&#xA;    Last message repeated 1 times&#xA;[mjpeg @ 0000018b7067a780] No JPEG data found in image&#xA;[mjpeg @ 0000018b7067a780] bits 95 is invalid&#xA;[mjpeg @ 0000018b7067a780] Found EOI before any SOF, ignoring&#xA;[mjpeg @ 0000018b7067a780] bits 133 is invalid&#xA;[mjpeg @ 0000018b7067a780] bits 31 is invalid&#xA;[mjpeg @ 0000018b7067a780] dqt: invalid precision&#xA;[mjpeg @ 0000018b7067a780] unable to decode APP fields: Invalid data found when processing input&#xA;    Last message repeated 8 times&#xA;[mjpeg @ 0000018b7067a780] No JPEG data found in image&#xA;[mjpeg @ 0000018b7067a780] Found EOI before any SOF, ignoring&#xA;[mjpeg @ 0000018b7067a780] bits 105 is invalid&#xA;[image2 @ 0000018b72294f80] decoding for stream 0 failed&#xA;[image2 @ 0000018b72294f80] Could not find codec parameters for stream 0 (Video: mjpeg (Progressive), none(bt470bg/unknown/unknown), lossless): unspecified size&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; and &#x27;probesize&#x27; options&#xA;Input #0, image2, from &#x27;C:\Users\a\AppData\Local\Temp\79b5fa99-f5a5-4788-b126-ef1549eb2086\img_%03d.jpg&#x27;:&#xA;  Duration: 00:00:00.38, start: 0.000000, bitrate: N/A&#xA;    Stream #0:0: Video: mjpeg (Progressive), none(bt470bg/unknown/unknown), lossless, 29 fps, 29 tbr, 29 tbn, 29 tbc&#xA;File &#x27;C:\Users\a\source\repos\ConsoleApp1\ConsoleApp1\bin\Debug\net5.0\output.mp4&#x27; already exists. Exiting.&#xA;   at Xabe.FFmpeg.FFmpegWrapper.&lt;>c__DisplayClass11_0.<runprocess>b__0()&#xA;   at System.Threading.Tasks.Task`1.InnerInvoke()&#xA;   at System.Threading.Tasks.Task.&lt;>c.&lt;.cctor>b__277_0(Object obj)&#xA;   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)&#xA;--- End of stack trace from previous location ---&#xA;   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)&#xA;   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task&amp; currentTaskSlot, Thread threadPoolThread)&#xA;--- End of stack trace from previous location ---&#xA;   at Xabe.FFmpeg.Conversion.Start(String parameters, CancellationToken cancellationToken)&#xA;   --- End of inner exception stack trace ---&#xA;   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)&#xA;   at System.Threading.Tasks.Task.Wait()&#xA;   at ConsoleApp1.Program.Main(String[] args) in C:\Users\a\source\repos\ConsoleApp1\ConsoleApp1\Program.cs:line 79&#xA;</runprocess>

    &#xA;