Recherche avancée

Médias (3)

Mot : - Tags -/pdf

Autres articles (64)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

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

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

  • Streaming raw sound with FFMPEG

    30 juin 2020, par Dr_Click

    I'm using the ffmpeg library to decode / encode audio in JAVA, using the Process objets. The aim is to got the raw datas decoded by ffmpeg in my JAVA code and then, to send them back to ffmpeg to generate a stream or create a file.

    



    As JAVA sounds only allow wav audio datas, I made a first try with this command line :

    



    ffmpeg -i http://199.180.75.118:80 -acodec pcm_s16le -ar 44100 -ac 2 "/home/dr_click/montest.wav"


    



    It works. But, my goal is to get the frames on the fly and not a file. I thought about using a pipe but it seems it will work only with Linux and not with Windows (and no idea for MacOS)
So, I'd prefer to stream locally a wav file and to catch it with JAVA into a AudioInputStream.

    



    I wrote this command :

    



    ffmpeg -re -i http://199.180.75.118:80 -acodec pcm_s16le -ar 44100 -ac 2 -f rtp rtp://127.0.0.1:1234


    



    It semms to work on the server side. But, when I enter the below command line on the server side :

    



    ffplay rtp://127.0.0.1:1234


    



    It doesn't work at all. I got this error :

    



      

    • [rtp @ 0x7f29c8000b80] Unable to receive RTP payload type 97 without an SDP file describing it
    • 


    



    If I try the couple :

    



    ffmpeg -i http://199.180.75.118:80 -acodec pcm_s16le -ar 44100 -ac 2 -f rtp -sdp_file /home/dr_click/audio.sdp rtp://127.0.1.1:1234


    



    and

    



    ffplay /home/dr_click/audio.sdp


    



    I got the following error :

    



      

    • [rtp @ 0x7f7d00008040] Protocol 'rtp' not on whitelist 'file,crypto' ! if
    • 


    



    And if I finally try :

    



    fmpeg -protocol_whitelist file,http,rtp,tcp -i http://199.180.75.118:80 -acodec pcm_s16le -ar 44100 -ac 2 -f rtp -sdp_file /home/dr_click/audio.sdp rtp://127.0.1.1:1234


    



    I still get the same error.

    



    Which point do I miss to stream locally some raw datas and catch them back in the AudioInputStream ?

    



    Thank you for all your replies.

    


  • In FFMpeg Ubuntu “rtmp ://url live=1” not working

    13 juillet 2015, par Yuvraj Kakkar

    Trying to excute following ffmpeg command in ubuntu.

    *ffmpeg -i "rtmp://IP/live/1234 live=1" -f flv rtmp://IP/live/1234_56 *

    ffmpeg version 2.2.git Copyright (c) 2000-2014 the FFmpeg developers
     built on Apr  8 2014 13:15:21 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
     configuration: --prefix=/home/encoder/ffmpeg_build --extra-cflags=-I/home/encoder/ffmpeg_build/include --extra-ldflags=-L/home/encoder/ffmpeg_build/lib --bindir=/home/encoder/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab
     libavutil      52. 74.100 / 52. 74.100
     libavcodec     55. 58.102 / 55. 58.102
     libavformat    55. 36.102 / 55. 36.102
     libavdevice    55. 11.100 / 55. 11.100
     libavfilter     4.  3.100 /  4.  3.100
     libswscale      2.  6.100 /  2.  6.100
     libswresample   0. 18.100 /  0. 18.100
     libpostproc    52.  3.100 / 52.  3.100
    [rtmp @ 0x3c5a140] Detected librtmp style URL parameters, these aren't supported by the libavformat internal RTMP handler currently enabled. See the documentation for the correct way to pass parameters.
    ^C[flv @ 0x3c59b00] Could not find codec parameters for stream 0 (Video: none): unspecified size
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    [flv @ 0x3c59b00] Could not find codec parameters for stream 1 (Audio: none, 0 channels): unspecified sample format
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    rtmp://IP/live/1234 live=1: could not find codec parameters
    Received signal 2: terminating.

    I have installed avserver (Libav) earlier to ffmpeg.Kindly suggest any alternative to live=1 or provide suggstion.

  • MoviePy error : failed to read the first frame of video file... That may also mean that you are using a deprecated version of FFMPEG

    30 août 2023, par Alister Kwapisz

    When I run a python telegram bot script locally, it works completely fine but when I run the script on PythonAnywhere I get an error that shows up when I try to generate a video :

    


    "2023-08-29 15:21:53,138 (__init__.py:960 MainThread) ERROR - TeleBot: "Infinity polling exception: MoviePy error: failed to read the first frame of video file /home/AlisterK/video_clips/Video 2023-01-10 &#xA;18 45 07.mp4. That might mean that the file is corrupted. That may also mean that you are using a deprecated version of FFMPEG. On Ubuntu/Debian for instance the version in the repos is deprecated. Pleas&#xA;e update to a recent version from the website."&#xA;2023-08-29 15:21:53,138 (__init__.py:962 MainThread) ERROR - TeleBot: "Exception traceback:&#xA;Traceback (most recent call last):&#xA;  File "/home/AlisterK/.local/lib/python3.10/site-packages/telebot/__init__.py", line 955, in infinity_polling&#xA;    self.polling(non_stop=True, timeout=timeout, long_polling_timeout=long_polling_timeout,&#xA;  File "/home/AlisterK/.local/lib/python3.10/site-packages/telebot/__init__.py", line 1043, in polling&#xA;    self.__threaded_polling(non_stop=non_stop, interval=interval, timeout=timeout, long_polling_timeout=long_polling_timeout,&#xA;  File "/home/AlisterK/.local/lib/python3.10/site-packages/telebot/__init__.py", line 1118, in __threaded_polling&#xA;    raise e&#xA;  File "/home/AlisterK/.local/lib/python3.10/site-packages/telebot/__init__.py", line 1074, in __threaded_polling&#xA;    self.worker_pool.raise_exceptions()&#xA;  File "/home/AlisterK/.local/lib/python3.10/site-packages/telebot/util.py", line 147, in raise_exceptions&#xA;    raise self.exception_info&#xA;  File "/home/AlisterK/.local/lib/python3.10/site-packages/telebot/util.py", line 90, in run&#xA;    task(*args, **kwargs)&#xA;  File "/home/AlisterK/.local/lib/python3.10/site-packages/telebot/__init__.py", line 6788, in _run_middlewares_and_handler&#xA;    result = handler[&#x27;function&#x27;](message)&#xA;  File "/home/AlisterK/Video generator.py", line 34, in generate_video_command&#xA;    generated_video = generate_video(audio_files[user_id])&#xA;  File "/home/AlisterK/Video generator.py", line 72, in generate_video&#xA;    clips = [VideoFileClip(os.path.join(input_folder, clip_file)).subclip(0, clip_duration) for clip_file in video_clips]&#xA;  File "/home/AlisterK/Video generator.py", line 72, in <listcomp>&#xA;    clips = [VideoFileClip(os.path.join(input_folder, clip_file)).subclip(0, clip_duration) for clip_file in video_clips]&#xA;  File "/home/AlisterK/.local/lib/python3.10/site-packages/moviepy/video/io/VideoFileClip.py", line 88, in __init__&#xA;    self.reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt,&#xA;  File "/home/AlisterK/.local/lib/python3.10/site-packages/moviepy/video/io/ffmpeg_reader.py", line 73, in __init__&#xA;    self.lastread = self.read_frame()&#xA;  File "/home/AlisterK/.local/lib/python3.10/site-packages/moviepy/video/io/ffmpeg_reader.py", line 133, in read_frame&#xA;    raise IOError(("MoviePy error: failed to read the first frame of "&#xA;OSError: MoviePy error: failed to read the first frame of video file /home/AlisterK/video_clips/Video 2023-01-10 18 45 07.mp4. That might mean that the file is corrupted. That may also mean that you are using a deprecated version of FFMPEG. On Ubuntu/Debian for instance the version in the repos is deprecated. Please update to a recent version from the website."&#xA;</listcomp>

    &#xA;

    I tried updating ffmpeg and moviepy. I even tried different versions but to no avail. The video clips are not corrupted as I checked.

    &#xA;

    This part of the code is responsible for generating the videos :

    &#xA;

    def generate_video(audio_path):&#xA;    input_folder = &#x27;/home/AlisterK/video_clips&#x27;  # Replace with your folder path&#xA;    output_file = &#x27;/home/AlisterK/output_combined_video.mp4&#x27;&#xA;    clip_duration = 3  # Duration of each clip in seconds&#xA;    num_clips = 10     # Number of video clips to select and combine&#xA;&#xA;    width = 1080  # Replace with your desired width&#xA;    height = 1920  # Replace with your desired height&#xA;&#xA;    video_clips = random_files_in_folder(input_folder, &#x27;.mp4&#x27;, num_clips)&#xA;&#xA;    clips = [VideoFileClip(os.path.join(input_folder, clip_file)).subclip(0, clip_duration) for clip_file in video_clips]&#xA;    standardized_clips = [clip.resize((width, height)) for clip in clips]  # Ensure consistent resolutions&#xA;&#xA;    final_clip = concatenate_videoclips(standardized_clips)&#xA;&#xA;    final_audio = AudioFileClip(audio_path)&#xA;

    &#xA;