Recherche avancée

Médias (0)

Mot : - Tags -/performance

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

Autres articles (36)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (3498)

  • AttributeError : 'FilterableStream' object has no attribute 'input' - ffmpeg-python

    26 septembre 2024, par Karolek

    I am a fresh programmer and I am learning the Python language.
I have been trying to design a graphical application (using tkinter and ffmpeg-python libraries) that converts an image file along with audio into a video of audio length displaying the image. Unfortunately whenever I try run program I keep encountering errors

    


    At first it was due to installing the ffmpeg library in pip package manager instead of ffmpeg-python. I uninstalled the previous one, installing the correct one making sure no other package causes problems. Using a short script like this, the library functioned smoothly :

    


    '''
The Error causing Statement
import ffmpeg 
(
    ffmpeg.input("something.mp3")
    .output("output.wav")
    .run()
)
'''
# When I tried to use the ffmpeg library in a graphics program within a function, unfortunately I was not able to get it to work

import tkinter as tk
from tkinter import filedialog
from tkinter import ttk

def select_image():
    file_path = filedialog.askopenfilename(title="Select a file", filetypes=[("image files","*.jpg;*.png;*.gif;*.jfif;")])
    print("Selected file:", file_path)

def select_audio():
    file_path = filedialog.askopenfilename(title="Select a file", filetypes=[("audio files","*.mp3;*.wav;*.ogg;*.flac;*.m4a;*.acc;")])
    print("Selected file:", file_path)

def create_video(image_file, audio_file, output_format):
    import ffmpeg
    (
        ffmpeg.input(image_file, loop=1)
        .input(audio_file)
        .output("output" + output_format)
        .run()
    )   

def choose_directory():
    directory_path = filedialog.askdirectory(title="Select directory")
    print("Selected directory:", directory_path)


root = tk.Tk()

root.title("Audio To Video Converter")
root.geometry("500x700")

title = tk.Label(root, text="Audio To Video Converter", font=('Arial', 28))
title.pack(padx=20, pady=20)

selectImage_button = tk.Button(root, text="Select image", command=select_image, height=3, width=50)
selectImage_button.pack(pady=10, padx=20)
selectAudio_button = tk.Button(root, text="Select audio", command=select_audio, height=3, width=50)
selectAudio_button.pack(pady=10, padx=20)

label1 = tk.Label(root, text="Output video format", font=('Arial', 16))
label1.pack(padx=20, pady=10)

outputFormat = ttk.Combobox(root, width=55)
outputFormat['values'] = ('.avi', '.mkv', '.mp4', '.webm')
outputFormat['state'] = 'readonly'
outputFormat.pack(pady=5, padx=20)

label2 = tk.Label(root, text="Output directory", font=('Arial', 16))
label2.pack(padx=20, pady=10)

outputDirectory_button = tk.Button(root, text="Select directory", command=choose_directory, height=3, width=50)
outputDirectory_button.pack(pady=5, padx=60)


convert_button = tk.Button(root, text="Convert", height=3, width=50, command=create_video(selectImage_button, selectAudio_button, outputFormat['values'] ))

root.mainloop()


    


    This is the only thing the console displayed after attempting to run

    


    Traceback (most recent call last):&#xA;  File "c:\Users\Admin\Documents\konwerter\konwerter.py", line 56, in <module>&#xA;    convert_button = tk.Button(root, text="Convert", height=3, width=50, command=create_video(selectImage_button, selectAudio_button, outputFormat[&#x27;values&#x27;] ))&#xA;                                                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "c:\Users\Admin\Documents\konwerter\konwerter.py", line 17, in create_video&#xA;    .input(audio_file)&#xA;     ^^^^^&#xA;AttributeError: &#x27;FilterableStream&#x27; object has no attribute &#x27;input&#x27;&#xA;</module>

    &#xA;

    I did some research and did not find any information about this error except that it may be due to installing the wrong libraries. This is my list of installed libraries in pip package manager :

    &#xA;

    colored           2.2.4 customtkinter     5.2.2 darkdetect        0.8.0 ffmpeg-python     0.2.0 future            1.0.0 Gooey             1.0.8.1 packaging         24.1 pillow            10.4.0 pip               24.2 psutil            6.0.0 pyee              12.0.0 pygtrie           2.5.0 six               1.16.0 tkinterdnd2       0.4.2 typing_extensions 4.12.2 wxPython          4.2.2&#xA;

    &#xA;

    Perhaps the solution to the problem is simple, but I am new and don't understand many things. I will be very grateful for your answer !

    &#xA;

  • Understanding User Flow : Eight Practical Examples for Better UX

    4 octobre 2024, par Daniel Crough — Analytics Tips, UX

    Imagine trying to cook a complex dish without a recipe. You might have all the ingredients, but without a clear sequence of steps, you’re likely to end up with a mess rather than a masterpiece. Similarly, designing a website without understanding user flow is a recipe for confusion and lost conversions.

    User flows—the paths visitors take through your site—are the recipes for digital success. They provide a clear sequence of steps that guide users towards their goals, whether that’s making a purchase, signing up for a newsletter, or finding information. By understanding and optimising these flows, you can create a website that’s not just functional, but delightfully intuitive.

    In this article, we’ll explore seven practical user flow examples and show you how to apply these insights using web analytics tools. Whether you’re new to user experience (UX) design or a seasoned professional, you’ll find valuable takeaways to enhance your digital strategy.

    Read More

  • Stream H264 raw data on RTSP server

    1er janvier, par Aitazaz

    I have H264 hex string data saved in a list.&#xA;The data is in correct format as it is being received, I am trying to stream it to RTSP server.

    &#xA;

    I have stream the data in realtime as it is from a dashcam.

    &#xA;

    The RTSP server is deployed but when I stream frames to it, the connection is created and then ends in an instant (does not last for a second)

    &#xA;

    The code is mentioned below which performs this streaming task.

    &#xA;

    def h264_stream_to_rtsp(data_list, rtsp_url):&#xA;    try:&#xA;        ffmpeg_command = [&#xA;            "ffmpeg", &#xA;            "-f", "h264",&#xA;            "-i", "-",&#xA;            "-vcodec", "libx264",&#xA;            "-preset", "fast",&#xA;            "-f", "rtsp",&#xA;            "-analyzeduration", "5000000",&#xA;            "-probesize", "5000000", &#xA;            rtsp_url  # The RTSP URL to stream to&#xA;        ]&#xA;        &#xA;        ffmpeg_process = subprocess.Popen(ffmpeg_command, stdin=subprocess.PIPE)&#xA;&#xA;        for index, hex_data in enumerate(data_list):&#xA;            # print(f"Processing hex data {index &#x2B; 1}/{len(data_list)}...")&#xA;&#xA;            if len(hex_data) % 2 != 0:&#xA;                hex_data = &#x27;0&#x27; &#x2B; hex_data  # Append a leading zero if length is odd&#xA;&#xA;            binary_data = binascii.unhexlify(hex_data)&#xA;&#xA;            ffmpeg_process.stdin.write(binary_data)&#xA;&#xA;        ffmpeg_process.stdin.close()&#xA;&#xA;        ffmpeg_process.wait()&#xA;        print("Stream completed.")&#xA;&#xA;    except KeyboardInterrupt:&#xA;        print("Stopping live stream.")&#xA;    except Exception as e:&#xA;        print(f"Error: {e}")&#xA;

    &#xA;

    Logs from the RTSP server are mentioned below :

    &#xA;

    2025/01/01 10:56:04 INF [RTSP] [conn 20.174.9.78:35474] opened&#xA;2025/01/01 10:56:04 INF [RTSP] [session 1d2bb871] created by 20.174.9.78:35474&#xA;2025/01/01 10:56:04 INF [RTSP] [session 1d2bb871] is publishing to path &#x27;live&#x27;, 1 track (H264)&#xA;2025/01/01 10:56:04 INF [RTSP] [session 1d2bb871] destroyed: torn down by 20.174.9.78:35474&#xA;2025/01/01 10:56:04 INF [RTSP] [conn 20.174.9.78:35474] closed: EOF&#xA;2025/01/01 10:56:48 INF [RTSP] [conn 20.174.9.78:54448] opened&#xA;2025/01/01 10:56:48 INF [RTSP] [session b6a95e71] created by 20.174.9.78:54448&#xA;2025/01/01 10:56:48 INF [RTSP] [session b6a95e71] is publishing to path &#x27;live&#x27;, 1 track (H264)&#xA;2025/01/01 10:56:48 INF [RTSP] [session b6a95e71] destroyed: torn down by 20.174.9.78:54448&#xA;

    &#xA;

    How can I stream continuously ?

    &#xA;