Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

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

Autres articles (107)

  • L’utiliser, en parler, le critiquer

    10 avril 2011

    La première attitude à adopter est d’en parler, soit directement avec les personnes impliquées dans son développement, soit autour de vous pour convaincre de nouvelles personnes à l’utiliser.
    Plus la communauté sera nombreuse et plus les évolutions seront rapides ...
    Une liste de discussion est disponible pour tout échange entre utilisateurs.

  • Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur

    8 février 2011, par

    La visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
    Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
    Configuration de la boite multimédia
    Dès (...)

  • Participer à sa documentation

    10 avril 2011

    La documentation est un des travaux les plus importants et les plus contraignants lors de la réalisation d’un outil technique.
    Tout apport extérieur à ce sujet est primordial : la critique de l’existant ; la participation à la rédaction d’articles orientés : utilisateur (administrateur de MediaSPIP ou simplement producteur de contenu) ; développeur ; la création de screencasts d’explication ; la traduction de la documentation dans une nouvelle langue ;
    Pour ce faire, vous pouvez vous inscrire sur (...)

Sur d’autres sites (12910)

  • Apply multiple text filters at once and burn into video for captioning without re-encoding, and fix error [ffmpeg-python wrapper]

    13 mai, par Baldi

    Is there any way to burn text into a video without re-encoding ? I ask this because the re-encoding process goes at around 0.1x speed on my device when writing to WEBM. Alternatively, if there is a faster way to render high quality video quickly while still re-encoding that would be great. I vaguely remember someone writing to a temporary file to solve this problem.

    


    Also small error in program, code attatched

    


    def processVideo(self):
    print("creating video")

    # File location management
    font_path = self.input_path / "CalSans-Regular.ttf"
    background_path = self.input_path / "new_video_background.webm"
    audio_path = self.sound_output_path
    video_ouput_path = self.parent_path / "new_result.webm"
    sound_input = ffmpeg.input(str(audio_path))
    video_input = ffmpeg.input(str(background_path))

    # Adding captions
    print(self.text_caption)
    previous_timepoint = 0
    for caption, timepoint in zip(self.text_caption, self.timepoints, strict=False): 
        # Text caption and timepooints are lists where the end of the words in text_caption correspond
        # to the timepoint with the same index in timepoint
        video_input = video_input.drawtext(
                                            text=caption, 
                                            fontfile = font_path, 
                                            x='w-text_w/2', 
                                            y='h-text_h/2', 
                                            escape_text=True, 
                                            fontsize= 32,
                                            bordercolor = "black",
                                            borderw = 4,
                                            enable=f'between(t,{previous_timepoint},{timepoint["timeSeconds"]})'
                                            )
        previous_timepoint = timepoint["timeSeconds"]
        
    # Combining sound and video and writing output
    command = ffmpeg.output(sound_input, video_input, str(video_ouput_path), codec='copy').overwrite_output().global_args('-shortest')
    print("args =", command)
    print(command.get_args())
    command.run()
    print("done!")


    


      File "c:\Desktop\Projects\video_project\main.py", line 239, in <module>&#xA;    post_list[0].processVideo()&#xA;    ~~~~~~~~~~~~~~~~~~~~~~~~~^^&#xA;  File "c:\Desktop\Projects\video_project\main.py", line 223, in processVideo&#xA;    command.run()&#xA;    ~~~~~~~~~~~^^&#xA;  File "C:\Desktop\Projects\video_project\.venv\Lib\site-packages\ffmpeg\_run.py", line 313, in run&#xA;    process = run_async(&#xA;        stream_spec,&#xA;    ...&lt;5 lines>...&#xA;        overwrite_output=overwrite_output,&#xA;    )&#xA;  File "C:\Desktop\Projects\video_project\.venv\Lib\site-packages\ffmpeg\_run.py", line 284, in run_async&#xA;    return subprocess.Popen(&#xA;           ~~~~~~~~~~~~~~~~^&#xA;        args, stdin=stdin_stream, stdout=stdout_stream, stderr=stderr_stream&#xA;        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;    )&#xA;    ^&#xA;  File "C:\AppData\Local\Programs\Python\Python313\Lib\subprocess.py", line 1038, in __init__&#xA;    self._execute_child(args, executable, preexec_fn, close_fds,&#xA;    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;                        pass_fds, cwd, env,&#xA;                        ^^^^^^^^^^^^^^^^^^^&#xA;    ...&lt;5 lines>...&#xA;                        gid, gids, uid, umask,&#xA;                        ^^^^^^^^^^^^^^^^^^^^^^&#xA;                        start_new_session, process_group)&#xA;                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "C:\AppData\Local\Programs\Python\Python313\Lib\subprocess.py", line 1550, in _execute_child&#xA;    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,&#xA;                       ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^&#xA;                             # no special security&#xA;                             ^^^^^^^^^^^^^^^^^^^^^&#xA;    ...&lt;4 lines>...&#xA;                             cwd,&#xA;                             ^^^^&#xA;                             startupinfo)&#xA;                             ^^^^^^^^^^^^&#xA;FileNotFoundError: [WinError 206] The filename or extension is too long&#xA;</module>

    &#xA;

  • Merging two audio files in Android using FFMPEG

    1er juillet 2021, par Jeremy

    I'm working on an application that takes two audio files, and merges them into the respected channels. The way they are being equalized are not as good as I had hoped, So I want to adjust the volume of each file during the mixing phase. I've seen a couple of examples online, like this, this, and [this][3].. but none of them are working for me. Can someone direct me in the right direction with this ? Much appreciation !

    &#xA;&#xA;

    I am using this library to execute : https://github.com/WritingMinds/ffmpeg-android-java

    &#xA;&#xA;

    Here is my code (EDIT)

    &#xA;&#xA;

    String files = "-i " &#x2B; mVoiceFile.getAbsolutePath() &#x2B; " -i " &#x2B; mBeatFile.getAbsolutePath();&#xA;String filter = "-filter_complex [0:a]volume=0.99[a1];[1:a]volume=0.3[a2][a1][a2]amerge=inputs=2,volume=1.3,pan=stereo|c0

    &#xA;&#xA;

    enter code here

    &#xA;&#xA;

    and here are my errors from running.

    &#xA;&#xA;

    04-06 12:17:34.079 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process: WARNING: linker: /data/user/0/me.rapchat.rapchat/files/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.&#xA;04-06 12:17:34.306 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process: ffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers&#xA;04-06 12:17:34.306 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:   built on Oct  7 2014 15:08:46 with gcc 4.8 (GCC)&#xA;04-06 12:17:34.306 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:   configuration: --target-os=linux --cross-prefix=/home/sb/Source-Code/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/sb/Source-Code/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --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/sb/Source-Code/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/sb/Source-Code/ffmpeg-android/build/armeabi-v7a-neon --extra-cflags=&#x27;-I/home/sb/Source-Code/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all -mfpu=neon&#x27; --extra-ldflags=&#x27;-L/home/sb/Source-Code/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie&#x27; --extra-libs=&#x27;-lpng -lexpat -lm&#x27; --extra-cxxflags=&#xA;04-06 12:17:34.307 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:   libavutil      54.  7.100 / 54.  7.100&#xA;04-06 12:17:34.307 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:   libavcodec     56.  1.100 / 56.  1.100&#xA;04-06 12:17:34.307 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:   libavformat    56.  4.101 / 56.  4.101&#xA;04-06 12:17:34.307 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:   libavdevice    56.  0.100 / 56.  0.100&#xA;04-06 12:17:34.308 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:   libavfilter     5.  1.100 /  5.  1.100&#xA;04-06 12:17:34.308 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:   libswscale      3.  0.100 /  3.  0.100&#xA;04-06 12:17:34.308 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:   libswresample   1.  1.100 /  1.  1.100&#xA;04-06 12:17:34.308 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:   libpostproc    53.  0.100 / 53.  0.100&#xA;04-06 12:17:34.372 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;/data/user/0/me.rapchat.rapchat/cache/recording.m4a&#x27;:&#xA;04-06 12:17:34.373 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:   Metadata:&#xA;04-06 12:17:34.373 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:     major_brand     : mp42&#xA;04-06 12:17:34.373 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:     minor_version   : 0&#xA;04-06 12:17:34.374 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:     compatible_brands: isommp42&#xA;04-06 12:17:34.374 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:     creation_time   : 2016-04-06 19:17:33&#xA;04-06 12:17:34.374 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:   Duration: 00:00:01.56, start: 0.000000, bitrate: 144 kb/s&#xA;04-06 12:17:34.375 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:     Stream #0:0(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 128 kb/s (default)&#xA;04-06 12:17:34.375 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:     Metadata:&#xA;04-06 12:17:34.375 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:       creation_time   : 2016-04-06 19:17:33&#xA;04-06 12:17:34.375 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:       handler_name    : SoundHandle&#xA;04-06 12:17:34.401 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process: Input #1, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;/data/user/0/me.rapchat.rapchat/cache/beats/d3c37d60-ed50-4c00-b454-4e399a7858ff.m4a&#x27;:&#xA;04-06 12:17:34.401 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:   Metadata:&#xA;04-06 12:17:34.401 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:     major_brand     : mp42&#xA;04-06 12:17:34.401 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:     minor_version   : 0&#xA;04-06 12:17:34.401 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:     compatible_brands: mp42isom&#xA;04-06 12:17:34.401 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:     creation_time   : 1993-11-24 14:46:42&#xA;04-06 12:17:34.401 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:     encoder         : Max 0.9.1&#xA;04-06 12:17:34.401 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:     iTunSMPB        : 00000000 00000840 000003c0 000000000035dc00 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000&#xA;04-06 12:17:34.401 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:     date            : 2015&#xA;04-06 12:17:34.401 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:   Duration: 00:01:20.04, start: 0.047891, bitrate: 129 kb/s&#xA;04-06 12:17:34.402 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:     Stream #1:0(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)&#xA;04-06 12:17:34.402 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:     Metadata:&#xA;04-06 12:17:34.402 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process:       creation_time   : 1993-11-24 14:46:42&#xA;04-06 12:17:34.404 30975-30975/me.rapchat.rapchat E/Studio&#xA0;Process: [NULL @ 0xb5e4fc00] Unable to find a suitable output format for &#x27;[a1][a2]amerge,pan=stereo|c0me.rapchat.rapchat E/Studio&#xA0;Process: [a1][a2]amerge,pan=stereo|c0me.rapchat.rapchat E/Studio&#xA0;Status&#xA0;Failed: WARNING: linker: /data/user/0/me.rapchat.rapchat/files/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.&#xA;                                                                          ffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers&#xA;                                                                            built on Oct  7 2014 15:08:46 with gcc 4.8 (GCC)&#xA;                                                                            configuration: --target-os=linux --cross-prefix=/home/sb/Source-Code/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/sb/Source-Code/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --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/sb/Source-Code/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/sb/Source-Code/ffmpeg-android/build/armeabi-v7a-neon --extra-cflags=&#x27;-I/home/sb/Source-Code/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all -mfpu=neon&#x27; --extra-ldflags=&#x27;-L/home/sb/Source-Code/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie&#x27; --extra-libs=&#x27;-lpng -lexpat -lm&#x27; --extra-cxxflags=&#xA;                                                                            libavutil      54.  7.100 / 54.  7.100&#xA;                                                                            libavcodec     56.  1.100 / 56.  1.100&#xA;                                                                            libavformat    56.  4.101 / 56.  4.101&#xA;                                                                            libavdevice    56.  0.100 / 56.  0.100&#xA;                                                                            libavfilter     5.  1.100 /  5.  1.100&#xA;                                                                            libswscale      3.  0.100 /  3.  0.100&#xA;                                                                            libswresample   1.  1.100 /  1.  1.100&#xA;                                                                            libpostproc    53.  0.100 / 53.  0.100&#xA;                                                                          Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;/data/user/0/me.rapchat.rapchat/cache/recording.m4a&#x27;:&#xA;                                                                            Metadata:&#xA;                                                                              major_brand     : mp42&#xA;                                                                              minor_version   : 0&#xA;                                                                              compatible_brands: isommp42&#xA;                                                                              creation_time   : 2016-04-06 19:17:33&#xA;                                                                            Duration: 00:00:01.56, start: 0.000000, bitrate: 144 kb/s&#xA;                                                                              Stream #0:0(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 128 kb/s (default)&#xA;                                                                              Metadata:&#xA;                                                                                creation_time   : 2016-04-06 19:17:33&#xA;                                                                                handler_name    : SoundHandle&#xA;                                                                          Input #1, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;/data/user/0/me.rapchat.rapchat/cache/beats/d3c37d60-ed50-4c00-b454-4e399a7858ff.m4a&#x27;:&#xA;                                                                            Metadata:&#xA;                                                                              major_brand     : mp42&#xA;                                                                              minor_version   : 0&#xA;                                                                              compatible_brands: mp42isom&#xA;                                                                              creation_time   : 1993-11-24 14:46:42&#xA;                                                                              encoder         : Max 0.9.1&#xA;                                                                              iTunSMPB        : 00000000 00000840 000003c0 000000000035dc00 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000&#xA;                                                                              date            : 2015&#xA;                                                                            Duration: 00:01:20.04, start: 0.047891, bitrate: 129 kb/s&#xA;                                                                              Stream #1:0(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)&#xA;                                                                              Metadata:&#xA;                                                                                creation_time   : 1993-11-24 14:46:42&#xA;                                                                          [NULL @ 0xb5e4fc00] Unable to find a suitable output format for &#x27;[a1][a2]amerge,pan=stereo|c0code>

    &#xA;

  • Redux : how to add subtitles to mp4 using ffmpeg ?

    25 novembre 2015, par stachyra

    I have a tiny little example mp4 video (which unfortunately stack overflow won’t allow me to embed directly inside my question). Following the advice previously offered in this answer, I’d like to add a subtitle to the video, which will flash on the screen for 2 seconds, using an .srt file that looks like this :

    1
    00:00:02,000 --> 00:00:04,000
    Test subtitle

    As provided in the link above, I issue a command that looks like this :

    ffmpeg -i small.mp4 -f srt -i small.srt -c:v copy -c:a copy -c:s mov_text small_subtitles.mp4 >&amp; err.log

    And the err.log file looks like this :

    ffmpeg version N-76950-g401c93d-tessus Copyright (c) 2000-2015 the FFmpeg developers
    built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
    configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --as=yasm --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzmq --enable-version3 --disable-ffplay --disable-indev=qtkit --disable-indev=x11grab_xcb
     libavutil      55.  7.100 / 55.  7.100
     libavcodec     57. 15.100 / 57. 15.100
     libavformat    57. 17.100 / 57. 17.100
     libavdevice    57.  0.100 / 57.  0.100
     libavfilter     6. 15.100 /  6. 15.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 'small.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf56.40.101
     Duration: 00:00:10.02, start: 0.000000, bitrate: 23 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 188x112 [SAR 1:1 DAR 47:28], 17 kb/s, 60 fps, 60 tbr, 15360 tbn, 120 tbc (default)
    Metadata:
     handler_name    : VideoHandler
    Input #1, srt, from 'small.srt':
     Duration: N/A, bitrate: N/A
    Stream #1:0: Subtitle: subrip
    [mp4 @ 0x7f8492848000] Codec for stream 0 does not use global headers but container format requires global headers
    Output #0, mp4, to 'small_subtitles.mp4':
     Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.17.100
    Stream #0:0(und): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 188x112 [SAR 1:1 DAR 47:28], q=2-31, 17 kb/s, 60 fps, 60 tbr, 15360 tbn, 15360 tbc (default)
    Metadata:
     handler_name    : VideoHandler
    Stream #0:1: Subtitle: mov_text ([8][0][0][0] / 0x0008) (default)
    Metadata:
     encoder         : Lavc57.15.100 mov_text
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #1:0 -> #0:1 (subrip (srt) -> mov_text (native))
    Press [q] to stop, [?] for help
    frame=  601 fps=0.0 q=-1.0 Lsize=      29kB time=00:00:09.96 bitrate=  24.0kbits/s    
    video:21kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 39.561928%

    The resulting output, small_subtitles.mp4, does not seem to have the expected subtitle present.

    Furthermore, the error message,

    [mp4 @ 0x7f8492848000] Codec for stream 0 does not use global headers but container format requires global headers

    is highlighted in bold colors when I run this at the command line without capturing the err.log file (which makes me think it must be a significant message), although I am unable to reproduce that special print formatting easily here.

    I’ve also tried this method, but with the .avi replaced by .mp4, and it seems to just fail silently—no obvious error message, but also no subtitle in the resulting video either.

    Anybody have an idea how to fix this ? In particular, what does the business about global headers mean ?

    I’m working on OS X and am open to hearing answers that would use other open source tools as well.