Recherche avancée

Médias (29)

Mot : - Tags -/Musique

Autres articles (85)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

Sur d’autres sites (3060)

  • ffmpeg output gives file not found error in python

    20 octobre 2022, par Batuhan Yılmaz

    Trying to build an auto subtitled video generator in Python. But couldn't generate the subtitled video of the input video using ffmpeg. Getting an error saying there is no output.mp4. FileNotFoundError : [Errno 2] No such file or directory : 'C :\Users\batuh\Desktop\auto-multipage\output.mp4'

    


    Can you help me out ? Full code is here : https://github.com/BatuhanYilmaz26/auto-sub-exp/blob/main/pages/02_up3.py

    


    Here's the parts where I used ffmpeg :

    


    def inferecence(loaded_model, uploaded_file, task):
    with open(f"{save_dir}/audio.mp3" , "wb") as f:
            f.write(uploaded_file.read())
        audio = ffmpeg.input(f"{save_dir}/audio.mp3")
        audio = ffmpeg.output(audio, f"{save_dir}/output.wav", acodec="pcm_s16le", ac=1, ar="16k")
        ffmpeg.run(audio, overwrite_output=True)
    if task == "Transcribe":
            options = dict(task="transcribe", best_of=5)
            results = loaded_model.transcribe(f"{save_dir}/output.wav", **options)
            vtt = getSubs(results["segments"], "vtt", 80)
            srt = getSubs(results["segments"], "srt", 80)
            lang = results["language"]
    return results["text"], vtt, srt, lang
    elif task == "Translate":
            options = dict(task="translate", best_of=5)
            results = loaded_model.transcribe(f"{save_dir}/output.wav", **options)
            vtt = getSubs(results["segments"], "vtt", 80)
            srt = getSubs(results["segments"], "srt", 80)
            lang = results["language"]
    return results["text"], vtt, srt, lang
    else:
    raise ValueError("Task not supported")
    
    results = inferecence(loaded_model, input_file, task)
    
    subprocess.run(shlex.split(f"ffmpeg -i {save_dir}/input.mp4 -i {save_dir}/output.wav -i transcript.srt -c:v copy -c:a copy -c:s copy -map 0:a -map 1:v -map 2:s -metadata:s:a:0 language={results[3]} -y {save_dir}/output.mp4"))
    #subprocess.run(shlex.split(f"ffmpeg -i {save_dir}/input.mp4 -vf {save_dir}/transcript.srt -y {save_dir}/output.mp4"))
    with open(os.path.join(os.getcwd(), "output.mp4"), "rb") as f:
                        data = f.read()
                    st.video(data)
                    st.download_button(label="Download Subtitled Video",
                                        data=data,
                                        file_name="output.mp4")


    


    sorry about the indentations

    


    Logfile :

    


    ffmpeg started on 2022-10-20 at 23:43:53
Report written to "ffmpeg-20221020-234353.log"
Command line:
ffmpeg -i C:UsersbatuhDesktopauto-multipagepageslocaloutput/input.mp4 -i C:UsersbatuhDesktopauto-multipagepageslocaloutput/output.wav -i transcript.srt -c:v copy -c:a copy -c:s copy -map 0:a -map 1:v -map 2:s -metadata:s:a:0 "language=eng" -y C:UsersbatuhDesktopauto-multipagepageslocaloutput/output.mp4 -report
ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.1 (GCC) 20200523
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Splitting the commandline.
Reading option '-i' ... matched as input url with argument 'C:UsersbatuhDesktopauto-multipagepageslocaloutput/input.mp4'.
Reading option '-i' ... matched as input url with argument 'C:UsersbatuhDesktopauto-multipagepageslocaloutput/output.wav'.
Reading option '-i' ... matched as input url with argument 'transcript.srt'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-c:s' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:a'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '1:v'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '2:s'.
Reading option '-metadata:s:a:0' ... matched as option 'metadata' (add metadata) with argument 'language=eng'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option 'C:UsersbatuhDesktopauto-multipagepageslocaloutput/output.mp4' ... matched as output url.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url C:UsersbatuhDesktopauto-multipagepageslocaloutput/input.mp4.
Successfully parsed a group of options.
Opening an input file: C:UsersbatuhDesktopauto-multipagepageslocaloutput/input.mp4.
[NULL @ 000001fba186b9c0] Opening 'C:UsersbatuhDesktopauto-multipagepageslocaloutput/input.mp4' for reading
[file @ 000001fba186c140] Setting default whitelist 'file,crypto'
C:UsersbatuhDesktopauto-multipagepageslocaloutput/input.mp4: No such file or directory


    


  • Adding a bitmap over video using ffmpeg for android

    11 septembre 2014, par Alin

    I am stuck in this area which I am not comfortable at all to work in.

    Here is what I did so far :

    • Made an Ubuntu VirtualBox machine
    • Downloaded latest ffmpeg version which is 2.3.3
    • Compiled ffmpeg to be compatible with armv7-a so in the end I get two folders : include and lib. In include I have the headers and in libs the *.so files (just as in http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/)

    enter image description here

    I have created a new android project and made a jni folder and this is how far I went... Even this, with all the struggle being new to linux and compiling took me almost a week to reach.

    Adding a watermark in ffmpeg I believe it is done on libavfilter ? I have to dig on this matter, however the original ffmpeg I need to translate into my project is :

    ffmpeg -i input.avi -i logo.png -filter_complex 'overlay=10:main_h-overlay_h-10' output.avi

    As far as I am studying now I need to do inside jni :

    • create a add_watermark.c file in which I need to somehow call the function that does the filter overlay call
    • create Android.mk to load this and the ffmpeg needed libraries

      LOCAL_PATH := $(call my-dir)

      include $(CLEAR_VARS)

      LOCAL_MODULE := add-watermark

      LOCAL_SRC_FILES := add-watermark.c

      LOCAL_LDLIBS := -llog -ljnigraphics -lz

      LOCAL_SHARED_LIBRARIES := libavformat libavcodec libswscale libavutil

      include $(BUILD_SHARED_LIBRARY)

      $(call import-module,ffmpeg-2.3.3/android/armv7-a)

    • create Application.mk

      APP_ABI := armeabi-v7a

      APP_PLATFORM := android-8

    • run ndk-build and use the generated libraries in my android project.

    I really need help on continuing, so every answer is received with great attention and pleasure.

    Later Edit :
    Would it be possible to somehow build ffmpeg.exe as a library and call its main with the exact same parameters as the original exe ? I do not want to run ffmpeg as a standalone executable, but have it integrated within the project.
    Something like http://www.roman10.net/how-to-port-ffmpeg-the-program-to-androidideas-and-thoughts/ What downsides would this approach have ?

  • Piwik 3 Release Candidate

    14 décembre 2016, par Piwik Core Team — Development

    The release candidate for Piwik 3 is now available.

    RC means we think we’re done, but it’s possible we’ve missed something. We hope to ship Piwik 3 on Sunday, December 18th (updated). If you haven’t tested Piwik 3 yet, now is the time ! To test Piwik 3, you can use the beta release channel or you can download the release candidate here (zip).

    Piwik 3 is a jam-packed release, with a number of features focused on security, performance, and more advanced analytics capabilities. Highlights include new UI design, responsive experience on mobile, better email reports, secure password storage, better tracking of downloads and outlinks, and more.

    Not sure where to start with testing ? Try setting up a new installation and taking notes on what you enjoyed and what got you stuck. For more details about what’s new in version 3.0, check out the beta 1, beta 2, beta 3, beta 4 changelogs as well as these blog posts : Piwik 3 overview, and Important notes and API breaking changes in Piwik 3.

    Think you’ve found a bug ? Please post to our Issues tracker. If any known issues come up, you’ll be able to search and find them there.

    Developers, please test your plugins and themes against Piwik 3 and update your plugin.json to require Piwik 3. An in-depth field guide to developer-focused changes and plugin migration is published on the Developer website.

    Do you speak a language other than English ? Help us translate Piwik into more than 50 languages !

    Happy testing !