Recherche avancée

Médias (0)

Mot : - Tags -/protocoles

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

Autres articles (91)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (3648)

  • Runtime.exec() freezes on execution of ffmpeg Audio-replacing command that works in windows console

    17 février 2024, par Finn Andre Worm

    I have been building an application to merge together videos based on data I got from the web. I was lucky enough to find this great tool ffmpeg that has saved me a lot of time and effort, but unfortunately I seem to be stuck on the following issue :

    


    Im attempting to execute a command for merging a video with audio (in the future I will also be adding hardcoded .ASS subtitles and .PNG images).
My application dynamically generates me a command based on the files its suppposed to use which works just as intended, as the command that I get works inside of my windows console (cmd).
But when I try to run it through my Java application, the code seems to "freeze" permanently and while the placeholder file gets created on my desktop with the filename and correct file format, it just has the default windows video icon and cant be opened (as it has not finished being created, duh).
Im also using Eclipse, perhaps thats worth noting.

    


    This is the part of the code where it freezes :

    


    protected void runFFMPEG(Multimap args, String outputFile, String fileFormat) throws IOException
{
    try
    {
        Runtime.getRuntime().exec(setCommand(args, outputFile, fileFormat)).waitFor();
    }
    catch (InterruptedException e)
    {
        e.printStackTrace();
    }
}


    


    as previously said, the command itself is generated correctly, but heres the code nonetheless :

    


    private String[] setCommand(Multimap args, String outputFile, String fileFormat)
{
    String[] command = new String[args.size()*2+2];
    command[0] = ffmpegLocation;
    int[] i = new int[1];
    i[0] = 1;
    args.forEach((key, value) -> { 
        command[i[0]++] = key;
        command[i[0]++] = value;
    });
    command[i[0]] = outputFile + fileFormat;
    return command;
}


    


    Note : I used a normal string previously for command, but I saw another thread saying that using an array instead fixxed their issue (which it didnt for me, else i wouldnt be here...).

    


    This is an example command that gets generated :

    


    ffmpeg.exe -ss 00:00:00 -to 00:00:15 -i C :\Users\Test.mp4 -i C :\Users\FINAL.mp3 -map 0 -map 1:a -c:v copy C :/Users/User/TestVideo.mp4

    


    I also have a different command that concats the audio together into one FINAL.mp3 file, so its not like ffmpeg entirely fails to work in my application.
My guess is that it has something to do with the Runtime i get with Runtime.getRunTime(), but I cant seem to find out what the problem is.
Can someone tell me what I did wrong ? Thanks in advance !

    


  • ffmpeg - prop flicker removal works but ffmpeg insists on changing framerate [closed]

    28 avril 2023, par Mutley Eugenius

    I have been researching how to use FFmpeg to do some fantastic wizardry on my cockpit videos to remove the dramatically distracting propeller, but after many hours now I cannot seem to find a way to get the program to stop stripping more than half the frames. The source video file is 1920 x 1080 @ 60fps and I believe I have my offset right (1/60= 0.0166) but the output video is always coming out at 25 fps. Can't see what element in the code is telling it to do that, or how to change it.

    


    Here's my file :

    


    https://drive.google.com/file/d/1VPttH4PHgUr0uzmsbl4Bcyg5_gAixblA/view?usp=sharing

    


    Here's my code :

    


    ffmpeg -i G:\PropFlicker.mp4 -itsoffset 0.01666 -i G:\PropFlicker.mp4 -filter_complex color=0x202020:s=1920x1080:d=24[mask];[mask][0][1]maskedmax=[out] -map [out] -crf 10 G:\PropNoFlicker.mp4


    


    I have tried adding -r 60 which gives me a 60 fps output file, but the video is still being processed at 25 and it just adds in duplicated frames after processing to pad it out to 60. The rendering shows more dropped frames than rendered frames by about a 3 to 2 ratio which matches frame drops from 60 to 25. I lose my shot fluidity and I get flickery artifacts

    


    What am I missing to get the flicker removal processing done at 60 fps and the output file rendered at 60 fps with the original smoothness ?

    


    I'm also not sure what the :d=24 is doing. I tried d=60, but it made no difference.

    


    I copied original code that I found in this link :

    


    text

    


  • ffmpeg error in subprocess.run but works in terminal

    6 juin 2023, par 8TM

    I'm creating my own MKV videos and I found a strange bug when I'm using subprocess module from python 3.11.2 to execute FFmpeg command.

    


    My FFmpeg command is running fine in terminal (ends with success) :

    


    ffmpeg -y \
-i input_video_stream.mkv \
-i input_audio_stream_1.ac3 \
-i input_audio_stream_2.ac3 \
-i input_audio_stream_3.ac3 \
-i input_audio_stream_4.ac3 \
-f srt -i input_subtitle_stream_1.srt \
-f srt -i input_subtitle_stream_2.srt \
-map 0 -map 1 -map 2 -map 3 -map 4 -map 5 -map 6 \
-c copy \
-metadata:s:a:0 language=eng -metadata:s:a:0 title="English1" \
-metadata:s:a:1 language=eng -metadata:s:a:1 title="English2" \
-metadata:s:a:2 language=eng -metadata:s:a:2 title="English3" \
-metadata:s:a:3 language=eng -metadata:s:a:3 title="English4" \
-metadata:s:s:0 language=eng -metadata:s:s:0 title="English1" -metadata:s:s:0 mimetype=application/x-ass \
-metadata:s:s:1 language=eng -metadata:s:s:1 title="English2" -metadata:s:s:1 mimetype=application/x-ass \
-disposition:a:0 default -disposition:s:s:0 default \
output_video_with_audio_and_subtitles.mkv


    


    But when I'm running it by in the same terminal (the same session and the same ffmpeg version) by python from subprocess.run(command) :

    


    subprocess.run([
    'ffmpeg', '-y',
    '-i', 'input_video_stream.mkv',
    '-i', 'input_audio_stream_1.ac3',
    '-i', 'input_audio_stream_2.ac3',
    '-i', 'input_audio_stream_3.ac3',
    '-i', 'input_audio_stream_4.ac3',
    '-f', 'srt', '-i', 'input_subtitle_stream_1.srt',
    '-f', 'srt', '-i', 'input_subtitle_stream_2.srt',
    '-map', '0', '-map', '1', '-map', '2', '-map', '3', '-map', '4', '-map', '5', '-map', '6',
    '-c', 'copy',
    '-metadata:s:a:0', 'language=eng', '-metadata:s:a:0', 'title="English1"', 
    '-metadata:s:a:1', 'language=eng', '-metadata:s:a:1', 'title="English2"', 
    '-metadata:s:a:2', 'language=eng', '-metadata:s:a:2', 'title="English3"', 
    '-metadata:s:a:3', 'language=eng', '-metadata:s:a:3', 'title="English4"', 
    '-metadata:s:s:0', 'language=eng', '-metadata:s:s:0', 'title="English1"', 
    '-metadata:s:s:0', 'mimetype=application/x-ass',
    '-metadata:s:s:1', 'language=eng', '-metadata:s:s:1', 'title="English2"', '-metadata:s:s:1', 'mimetype=application/x-ass', 
    '-disposition:a:0 default', '-disposition:s:s:0 default', 
    'output_video_with_audio_and_subtitles.mkv'
])



    


    it fails :

    


    
ffmpeg version 5.1.2-3 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12 (Debian 12.2.0-14)
  configuration : —prefix=/usr —extra-version=3 —toolchain=hardened —libdir=/usr/lib/x86_64-linux-gnu —incdir=/usr/include/x86_64-linux-gnu —arch=amd64 —enable-gpl —disable-stripping —enable-gnutls —enable-ladspa —enable-libaom —enable-libass —enable-libbluray —enable-libbs2b —enable-libcaca —enable-libcdio —enable-libcodec2 —enable-libdav1d —enable-libflite —enable-libfontconfig —enable-libfreetype —enable-libfribidi —enable-libglslang —enable-libgme —enable-libgsm —enable-libjack —enable-libmp3lame —enable-libmysofa —enable-libopenjpeg —enable-libopenmpt —enable-libopus —enable-libpulse —enable-librabbitmq —enable-librist —enable-librubberband —enable-libshine —enable-libsnappy —enable-libsoxr —enable-libspeex —enable-libsrt —enable-libssh —enable-libsvtav1 —enable-libtheora —enable-libtwolame —enable-libvidstab —enable-libvorbis —enable-libvpx —enable-libwebp —enable-libx265 —enable-libxml2 —enable-libxvid —enable-libzimg —enable-libzmq —enable-libzvbi —enable-lv2 —enable-omx —enable-openal —enable-opencl —enable-opengl —enable-sdl2 —disable-sndio —enable-libjxl —enable-pocketsphinx —enable-librsvg —enable-libmfx —enable-libdc1394 —enable-libdrm —enable-libiec61883 —enable-chromaprint —enable-frei0r —enable-libx264 —enable-libplacebo —enable-librav1e —enable-shared
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
Input #0, matroska,webm, from 'input_video_stream.mkv' :
  Metadata :
    ENCODER : Lavf59.27.100
  Duration : 00:44:19.94, start : 0.000000, bitrate : 22551 kb/s
  Stream #0:0 : Video : h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn (default)
    Metadata :
      BPS : 22549589
      NUMBER_OF_FRAMES : 63631
      NUMBER_OF_BYTES : 7480665638
      _STATISTICS_WRITING_APP : mkvmerge v56.0.0 ('Strasbourg / St. Denis') 64-bit
      _STATISTICS_WRITING_DATE_UTC : 2023-05-15 08:21:43
      _STATISTICS_TAGS : BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      DURATION : 00:44:19.942000000
[ac3 @ 0x55b374ee9e80] Estimating duration from bitrate, this may be inaccurate
Input #1, ac3, from 'input_audio_stream_1.ac3' :
  Duration : 00:44:19.89, start : 0.000000, bitrate : 448 kb/s
  Stream #1:0 : Audio : ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
[ac3 @ 0x55b37502ef80] Estimating duration from bitrate, this may be inaccurate
Input #2, ac3, from 'input_audio_stream_2.ac3' :
  Duration : 00:44:19.89, start : 0.000000, bitrate : 192 kb/s
  Stream #2:0 : Audio : ac3, 48000 Hz, stereo, fltp, 192 kb/s
[ac3 @ 0x55b374efc900] Estimating duration from bitrate, this may be inaccurate
Input #3, ac3, from 'input_audio_stream_3.ac3' :
  Duration : 00:43:19.18, start : 0.000000, bitrate : 384 kb/s
  Stream #3:0 : Audio : ac3, 48000 Hz, stereo, fltp, 384 kb/s
[ac3 @ 0x55b374fd60c0] Estimating duration from bitrate, this may be inaccurate
Input #4, ac3, from 'input_audio_stream_4.ac3' :
  Duration : 00:43:19.18, start : 0.000000, bitrate : 192 kb/s
  Stream #4:0 : Audio : ac3, 48000 Hz, stereo, fltp, 192 kb/s
Input #5, srt, from 'input_subtitle_stream_1.srt' :
  Duration : N/A, bitrate : N/A
  Stream #5:0 : Subtitle : subrip
Input #6, srt, from 'input_subtitle_stream_2.srt' :
  Duration : N/A, bitrate : N/A
  Stream #6:0 : Subtitle : subrip
[matroska @ 0x55b3751a1940] Invalid stream specifier : a:0 default.
    Last message repeated 1 times


    


    I know it's reporting something with audio ([matroska @ 0x55b3751a1940] Invalid stream specifier : a:0 default. Last message repeated 1 times) but it's probably problem with my ffmpeg command.