Recherche avancée

Médias (0)

Mot : - Tags -/latitude

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

Autres articles (60)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Configuration spécifique d’Apache

    4 février 2011, par

    Modules spécifiques
    Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
    Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
    Création d’un (...)

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

Sur d’autres sites (7747)

  • Merge commit ’527bf5f7c6890664b0f1dccd42397f4d204659fe’

    27 avril 2016, par Derek Buitenhuis
    Merge commit ’527bf5f7c6890664b0f1dccd42397f4d204659fe’
    

    * commit ’527bf5f7c6890664b0f1dccd42397f4d204659fe’ :
    svq3 : move the pred mode variables to SVQ3Context

    Merged-by : Derek Buitenhuis <derek.buitenhuis@gmail.com>

    • [DH] libavcodec/svq3.c
  • Can't view and record graph at the same time using FFMpegWriter [closed]

    7 juillet 2024, par Barkın Özer

    So this code is used for graphing and logging sensor data coming from bluetooth ports. I wanted to add an function that will record the graph in mp4 format. In order to achieve this I used ffmpegWriter. The issue is while this code records the graph I can't view the graph at the same time.

    &#xA;

    import serial&#xA;import matplotlib.pyplot as plt&#xA;from matplotlib.animation import FuncAnimation, FFMpegWriter&#xA;import openpyxl&#xA;from datetime import datetime&#xA;&#xA;# Constants&#xA;GRAVITY = 9.81  # Standard gravity in m/s&#xB2;&#xA;&#xA;# Initialize serial connections to HC-06 devices&#xA;ser_x_accel = serial.Serial(&#x27;COM4&#x27;, 9600, timeout=1)  # X-axis acceleration data&#xA;ser_y_angle = serial.Serial(&#x27;COM11&#x27;, 9600, timeout=1)  # Y-axis angle data&#xA;&#xA;# Initialize empty lists to store data&#xA;x_accel_data = []&#xA;y_angle_data = []&#xA;timestamps = []&#xA;&#xA;# Initialize Excel workbook&#xA;wb = openpyxl.Workbook()&#xA;ws = wb.active&#xA;ws.title = "Sensor Data"&#xA;ws.append(["Timestamp", "X Acceleration (m/s&#xB2;)", "Y Angle (degrees)"])&#xA;&#xA;# Function to update the plot and log data&#xA;def update(frame):&#xA;    # Read data from serial connections&#xA;    line_x_accel = ser_x_accel.readline().decode(&#x27;utf-8&#x27;).strip()&#xA;    line_y_angle = ser_y_angle.readline().decode(&#x27;utf-8&#x27;).strip()&#xA;    &#xA;    try:&#xA;        # Parse and process X-axis acceleration data&#xA;        x_accel_g = float(line_x_accel)  # Acceleration in g read from serial&#xA;        x_accel_ms2 = x_accel_g * GRAVITY  # Convert from g to m/s&#xB2;&#xA;        x_accel_data.append(x_accel_ms2)&#xA;        &#xA;        # Parse and process Y-axis angle data&#xA;        y_angle = float(line_y_angle)&#xA;        y_angle_data.append(y_angle)&#xA;        &#xA;        # Append timestamp&#xA;        timestamps.append(datetime.now())&#xA;&#xA;        # Limit data points to show only the latest 100&#xA;        if len(x_accel_data) > 100:&#xA;            x_accel_data.pop(0)&#xA;            y_angle_data.pop(0)&#xA;            timestamps.pop(0)&#xA;&#xA;        # Log data to Excel with timestamp&#xA;        timestamp_str = timestamps[-1].strftime("%H:%M:%S")&#xA;        ws.append([timestamp_str, x_accel_data[-1], y_angle_data[-1]])&#xA;&#xA;        # Clear and update plots&#xA;        ax1.clear()&#xA;        ax1.plot(timestamps, x_accel_data, label=&#x27;X Acceleration&#x27;, color=&#x27;b&#x27;)&#xA;        ax1.legend(loc=&#x27;upper left&#x27;)&#xA;        ax1.set_ylim([-20, 20])  # Adjust based on expected acceleration range in m/s&#xB2;&#xA;        ax1.set_title(&#x27;Real-time X Acceleration Data&#x27;)&#xA;        ax1.set_xlabel(&#x27;Time&#x27;)&#xA;        ax1.set_ylabel(&#x27;Acceleration (m/s&#xB2;)&#x27;)&#xA;        ax1.grid(True)&#xA;&#xA;        ax2.clear()&#xA;        ax2.plot(timestamps, y_angle_data, label=&#x27;Y Angle&#x27;, color=&#x27;g&#x27;)&#xA;        ax2.legend(loc=&#x27;upper left&#x27;)&#xA;        ax2.set_ylim([-180, 180])&#xA;        ax2.set_title(&#x27;Real-time Y Angle Data&#x27;)&#xA;        ax2.set_xlabel(&#x27;Time&#x27;)&#xA;        ax2.set_ylabel(&#x27;Angle (degrees)&#x27;)&#xA;        ax2.grid(True)&#xA;&#xA;        # Update text boxes with latest values&#xA;        text_box.set_text(f&#x27;X Acceleration: {x_accel_data[-1]:.2f} m/s&#xB2;&#x27;)&#xA;        text_box2.set_text(f&#x27;Y Angle: {y_angle_data[-1]:.2f}&#xB0;&#x27;)&#xA;        &#xA;        # Save the workbook periodically (every 100 updates)&#xA;        if frame % 100 == 0:&#xA;            wb.save("sensor_data.xlsx")&#xA;        &#xA;    except ValueError:&#xA;        pass  # Ignore lines that are not properly formatted&#xA;&#xA;# Setup the plots&#xA;fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(10, 8))&#xA;text_box = ax1.text(0.05, 0.95, &#x27;&#x27;, transform=ax1.transAxes, fontsize=12, verticalalignment=&#x27;top&#x27;, bbox=dict(boxstyle=&#x27;round&#x27;, facecolor=&#x27;wheat&#x27;, alpha=0.5))&#xA;text_box2 = ax2.text(0.05, 0.95, &#x27;&#x27;, transform=ax2.transAxes, fontsize=12, verticalalignment=&#x27;top&#x27;, bbox=dict(boxstyle=&#x27;round&#x27;, facecolor=&#x27;wheat&#x27;, alpha=0.5))&#xA;&#xA;# Animate the plots&#xA;ani = FuncAnimation(fig, update, interval=100)  # Update interval of 100ms&#xA;&#xA;# Save the animation as a video file&#xA;writer = FFMpegWriter(fps=10, metadata=dict(artist=&#x27;Me&#x27;), bitrate=1800)&#xA;ani.save("sensor_data.mp4", writer=writer)&#xA;&#xA;plt.tight_layout()&#xA;plt.show()&#xA;&#xA;# Save the workbook at the end of the session&#xA;wb.save("sensor_data.xlsx")&#xA;&#xA;

    &#xA;

    I tried using OpenCV to record the graph but then I didn't even got any recording. I think solving this issue with my original code would be a better approach.

    &#xA;

  • FFMPEG Select Both Mp3 & M4a Files Through PowerShell

    30 avril 2020, par ilham zacky

    Question - Need to select both *.mp3, *.m4a files from a directory.&#xA;I have some audio, video files, I am using ffmpeg or ffprobe to get the file duration,

    &#xA;&#xA;

    It runs in a loop, audio names will be taken from an excel sheet. In my directory folder, I have both mp3, m4a files.

    &#xA;&#xA;

    This is my code :

    &#xA;&#xA;

        $file = (Get-Item -Path ".\CPExport.xlsx")&#xA;    #$sheetName = "Sheet1"&#xA;    #Create an instance of Excel.Application and Open Excel file&#xA;    $objExcel = New-Object -ComObject Excel.Application&#xA;    $workbook = $objExcel.Workbooks.Open($file)&#xA;    $sheet = $workbook.Worksheets.Item(1)&#xA;    $objExcel.Visible=$false&#xA;    #Count max row&#xA;    $rowMax = ($sheet.UsedRange.Rows).count&#xA;    #Declare the starting positions&#xA;    $rowName,$colName = 1,1&#xA;&#xA;    $id = $sheet.Cells.Item($rowName&#x2B;$i,$colName).text&#xA;&#xA;    $audioId = "$id.m4a"&#xA;    $videoId = "$id.mp4"&#xA;    $duration6= ffprobe -v error -show_entries format=duration -of csv=p=0 $audioId&#xA;

    &#xA;&#xA;

    So I am using this $audioId variable and passing it to my ffmpeg code. Here I can select only the m4a files,&#xA;I need to select both mp3 and m4a files.

    &#xA;&#xA;

    Any Suggestion ?

    &#xA;&#xA;

    I am using Powershell.

    &#xA;&#xA;

    Thank you.

    &#xA;