Recherche avancée

Médias (9)

Mot : - Tags -/soundtrack

Autres articles (62)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

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

Sur d’autres sites (8095)

  • There is no data in the inbound-rtp section of WebRTC. I don't know why

    13 juin 2024, par qyt

    I am a streaming media server, and I need to stream video to WebRTC in H.264 format. The SDP exchange has no errors, and Edge passes normally.

    &#xA;

    These are the log debugging details from edge://webrtc-internals/. Both DTLS and STUN show normal status, and SDP exchange is also normal. I used Wireshark to capture packets and saw that data streaming has already started. The transport section (iceState=connected, dtlsState=connected, id=T01) also shows that data has been received, but there is no display of RTP video data at all.

    &#xA;

    timestamp   2024/6/13 16:34:01&#xA;bytesSent   5592&#xA;[bytesSent_in_bits/s]   176.2108579387652&#xA;packetsSent 243&#xA;[packetsSent/s] 1.001198056470257&#xA;bytesReceived   69890594&#xA;[bytesReceived_in_bits/s]   0&#xA;packetsReceived 49678&#xA;[packetsReceived/s] 0&#xA;dtlsState   connected&#xA;selectedCandidatePairId CPeVYPKUmD_FoU/ff10&#xA;localCertificateId  CFE9:17:14:B4:62:C3:4C:FF:90:C0:57:50:ED:30:D3:92:BC:BB:7C:13:11:AB:07:E8:28:3B:F6:A5:C7:66:50:77&#xA;remoteCertificateId CF09:0C:ED:3E:B3:AC:33:87:2F:7E:B0:BD:76:EB:B5:66:B0:D8:60:F7:95:99:52:B5:53:DA:AC:E7:75:00:09:07&#xA;tlsVersion  FEFD&#xA;dtlsCipher  TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256&#xA;dtlsRole    client&#xA;srtpCipher  AES_CM_128_HMAC_SHA1_80&#xA;selectedCandidatePairChanges    1&#xA;iceRole controlling&#xA;iceLocalUsernameFragment    R5DR&#xA;iceState    connected&#xA;

    &#xA;

    video recv info

    &#xA;

    inbound-rtp (kind=video, mid=1, ssrc=2124085007, id=IT01V2124085007)&#xA;Statistics IT01V2124085007&#xA;timestamp   2024/6/13 16:34:49&#xA;ssrc    2124085007&#xA;kind    video&#xA;transportId T01&#xA;jitter  0&#xA;packetsLost 0&#xA;trackIdentifier 1395f18c-6ab9-4dbc-9149-edb59a81044d&#xA;mid 1&#xA;packetsReceived 0&#xA;[packetsReceived/s] 0&#xA;bytesReceived   0&#xA;[bytesReceived_in_bits/s]   0&#xA;headerBytesReceived 0&#xA;[headerBytesReceived_in_bits/s] 0&#xA;jitterBufferDelay   0&#xA;[jitterBufferDelay/jitterBufferEmittedCount_in_ms]  0&#xA;jitterBufferTargetDelay 0&#xA;[jitterBufferTargetDelay/jitterBufferEmittedCount_in_ms]    0&#xA;jitterBufferMinimumDelay    0&#xA;[jitterBufferMinimumDelay/jitterBufferEmittedCount_in_ms]   0&#xA;jitterBufferEmittedCount    0&#xA;framesReceived  0&#xA;[framesReceived/s]  0&#xA;[framesReceived-framesDecoded-framesDropped]    0&#xA;framesDecoded   0&#xA;[framesDecoded/s]   0&#xA;keyFramesDecoded    0&#xA;[keyFramesDecoded/s]    0&#xA;framesDropped   0&#xA;totalDecodeTime 0&#xA;[totalDecodeTime/framesDecoded_in_ms]   0&#xA;totalProcessingDelay    0&#xA;[totalProcessingDelay/framesDecoded_in_ms]  0&#xA;totalAssemblyTime   0&#xA;[totalAssemblyTime/framesAssembledFromMultiplePackets_in_ms]    0&#xA;framesAssembledFromMultiplePackets  0&#xA;totalInterFrameDelay    0&#xA;[totalInterFrameDelay/framesDecoded_in_ms]  0&#xA;totalSquaredInterFrameDelay 0&#xA;[interFrameDelayStDev_in_ms]    0&#xA;pauseCount  0&#xA;totalPausesDuration 0&#xA;freezeCount 0&#xA;totalFreezesDuration    0&#xA;firCount    0&#xA;pliCount    0&#xA;nackCount   0&#xA;minPlayoutDelay 0&#xA;

    &#xA;

    wireshark,I have verified that the SSRC in the SRTP is correct.

    &#xA;

    enter image description here

    &#xA;

    This player works normally when tested with other streaming servers. I don't know what the problem is. Is there any way to find out why the web browser cannot play the WebRTC stream that I'm pushing ?

    &#xA;

  • PyQt6 6.7.0 - How to fix error : No QtMultimedia backends found

    4 février, par Belleroph0N

    Problem on Windows 10 and Windows 11 using Anaconda.

    &#xA;

    Here is the full error message for PyQt6=6.7.0 :

    &#xA;

    No QtMultimedia backends found. Only QMediaDevices, QAudioDevice, QSoundEffect, QAudioSink, and QAudioSource are available.&#xA;Failed to initialize QMediaPlayer "Not available"&#xA;Failed to create QVideoSink "Not available"&#xA;

    &#xA;

    Installed PyQt6 using a requirements file :

    &#xA;

    PyQt6&#xA;PyQt6-WebEngine&#xA;requests&#xA;pyserial&#xA;pynput&#xA;

    &#xA;

    Here are a couple things I tried :

    &#xA;

      &#xA;
    1. Reroll version back to PyQt6=6.6.1. This results in an error as well : ImportError : DLL load failed while importing QtGui : The specified procedure could not be found.
    2. &#xA;

    3. I thought that missing ffmpeg might be the issue so I installed it, but the issue persists.
    4. &#xA;

    5. Tried the setup on Ubuntu (WSL2) and the issue disappears, but there is just a black screen and nothing gets displayed in the widget. (EDIT : Got this up and running, the problem was with differences in file paths in linux vs windows.)
    6. &#xA;

    &#xA;

    I am new to PyQt so any pointers will be helpful !

    &#xA;

    Edit : Here is generic code (taken from here) that gives the same error :

    &#xA;

    from PyQt6.QtGui import QIcon, QFont&#xA;from PyQt6.QtCore import QDir, Qt, QUrl, QSize&#xA;from PyQt6.QtMultimedia import QMediaPlayer&#xA;from PyQt6.QtMultimediaWidgets import QVideoWidget&#xA;from PyQt6.QtWidgets import (QApplication, QFileDialog, QHBoxLayout, QLabel, QStyleFactory,&#xA;        QPushButton, QSizePolicy, QSlider, QStyle, QVBoxLayout, QWidget, QStatusBar)&#xA;&#xA;&#xA;class VideoPlayer(QWidget):&#xA;&#xA;    def __init__(self, parent=None):&#xA;        super(VideoPlayer, self).__init__(parent)&#xA;&#xA;        self.mediaPlayer = QMediaPlayer()&#xA;&#xA;        btnSize = QSize(16, 16)&#xA;        videoWidget = QVideoWidget()&#xA;&#xA;        openButton = QPushButton("Open Video")   &#xA;        openButton.setToolTip("Open Video File")&#xA;        openButton.setStatusTip("Open Video File")&#xA;        openButton.setFixedHeight(24)&#xA;        openButton.setIconSize(btnSize)&#xA;        openButton.setFont(QFont("Noto Sans", 8))&#xA;        openButton.setIcon(QIcon.fromTheme("document-open", QIcon("D:/_Qt/img/open.png")))&#xA;        openButton.clicked.connect(self.abrir)&#xA;&#xA;        self.playButton = QPushButton()&#xA;        self.playButton.setEnabled(False)&#xA;        self.playButton.setFixedHeight(24)&#xA;        self.playButton.setIconSize(btnSize)&#xA;        self.playButton.setIcon(self.style().standardIcon(QStyle.StandardPixmap.SP_MediaPlay))&#xA;        self.playButton.clicked.connect(self.play)&#xA;&#xA;        self.positionSlider = QSlider(Qt.Orientation.Horizontal)&#xA;        self.positionSlider.setRange(0, 0)&#xA;        self.positionSlider.sliderMoved.connect(self.setPosition)&#xA;&#xA;        self.statusBar = QStatusBar()&#xA;        self.statusBar.setFont(QFont("Noto Sans", 7))&#xA;        self.statusBar.setFixedHeight(14)&#xA;&#xA;        controlLayout = QHBoxLayout()&#xA;        controlLayout.setContentsMargins(0, 0, 0, 0)&#xA;        controlLayout.addWidget(openButton)&#xA;        controlLayout.addWidget(self.playButton)&#xA;        controlLayout.addWidget(self.positionSlider)&#xA;&#xA;        layout = QVBoxLayout()&#xA;        layout.addWidget(videoWidget)&#xA;        layout.addLayout(controlLayout)&#xA;        layout.addWidget(self.statusBar)&#xA;&#xA;        self.setLayout(layout)&#xA;&#xA;        #help(self.mediaPlayer)&#xA;        self.mediaPlayer.setVideoOutput(videoWidget)&#xA;        self.mediaPlayer.playbackStateChanged.connect(self.mediaStateChanged)&#xA;        self.mediaPlayer.positionChanged.connect(self.positionChanged)&#xA;        self.mediaPlayer.durationChanged.connect(self.durationChanged)&#xA;        self.mediaPlayer.errorChanged.connect(self.handleError)&#xA;        self.statusBar.showMessage("Ready")&#xA;&#xA;    def abrir(self):&#xA;        fileName, _ = QFileDialog.getOpenFileName(self, "Select Media",&#xA;                ".", "Video Files (*.mp4 *.flv *.ts *.mts *.avi)")&#xA;&#xA;        if fileName != &#x27;&#x27;:&#xA;            self.mediaPlayer.setSource(QUrl.fromLocalFile(fileName))&#xA;            self.playButton.setEnabled(True)&#xA;            self.statusBar.showMessage(fileName)&#xA;            self.play()&#xA;&#xA;    def play(self):&#xA;        if self.mediaPlayer.playbackState() == QMediaPlayer.PlaybackState.PlayingState:&#xA;            self.mediaPlayer.pause()&#xA;        else:&#xA;            self.mediaPlayer.play()&#xA;&#xA;    def mediaStateChanged(self, state):&#xA;        if self.mediaPlayer.playbackState() == QMediaPlayer.PlaybackState.PlayingState:&#xA;            self.playButton.setIcon(&#xA;                    self.style().standardIcon(QStyle.StandardPixmap.SP_MediaPause))&#xA;        else:&#xA;            self.playButton.setIcon(&#xA;                    self.style().standardIcon(QStyle.StandardPixmap.SP_MediaPlay))&#xA;&#xA;    def positionChanged(self, position):&#xA;        self.positionSlider.setValue(position)&#xA;&#xA;    def durationChanged(self, duration):&#xA;        self.positionSlider.setRange(0, duration)&#xA;&#xA;    def setPosition(self, position):&#xA;        self.mediaPlayer.setPosition(position)&#xA;&#xA;    def handleError(self):&#xA;        self.playButton.setEnabled(False)&#xA;        self.statusBar.showMessage("Error: " &#x2B; self.mediaPlayer.errorString())&#xA;&#xA;if __name__ == &#x27;__main__&#x27;:&#xA;    import sys&#xA;    app = QApplication(sys.argv)&#xA;    player = VideoPlayer()&#xA;    player.setWindowTitle("Player")&#xA;    player.resize(900, 600)&#xA;    player.show()&#xA;    sys.exit(app.exec())&#xA;

    &#xA;

    The videos I want to play are in the same folder as this .py file.&#xA;The conda env (python 3.9.2) I am working on has the following packages :

    &#xA;

    certifi                     2024.6.2&#xA;charset-normalizer          3.3.2&#xA;idna                        3.7&#xA;pip                         24.0&#xA;pynput                      1.7.6&#xA;PyQt6                       6.7.0&#xA;PyQt6-Qt6                   6.7.1&#xA;PyQt6-sip                   13.6.0&#xA;PyQt6-WebEngine             6.7.0&#xA;PyQt6-WebEngine-Qt6         6.7.1&#xA;PyQt6-WebEngineSubwheel-Qt6 6.7.1&#xA;pyserial                    3.5&#xA;requests                    2.31.0&#xA;setuptools                  69.5.1&#xA;six                         1.16.0&#xA;urllib3                     2.2.1&#xA;wheel                       0.43.0&#xA;

    &#xA;

    PS : MacOS seems to have the same issue.

    &#xA;

  • ffmpeg Command in Docker with Rust Tokio Closes Warp Server Connection (curl 52 Error)

    3 juin 2024, par user762345

    I’m encountering an issue where executing an ffmpeg concatenation command through Rust’s Tokio process in a Docker container causes subsequent HTTP requests to fail. The error occurs exclusively after running the ffmpeg command and making immediate requests, resulting in a “curl 52 empty response from server” error with the connection being closed. Notably, this issue does not occur when running the same setup outside of Docker. Additionally, if no HTTP requests are made after the ffmpeg command, the curl 52 error does not occur.

    &#xA;

    Here is the verbose curl output of my minimum reproducible example (see below).

    &#xA;

    curl -v "http://localhost:3030"&#xA;*   Trying 127.0.0.1:3030...&#xA;* Connected to localhost (127.0.0.1) port 3030 (#0)&#xA;> GET / HTTP/1.1&#xA;> Host: localhost:3030&#xA;> User-Agent: curl/8.1.2&#xA;> Accept: */*&#xA;> &#xA;* Empty reply from server&#xA;* Closing connection 0&#xA;curl: (52) Empty reply from server&#xA;

    &#xA;

    Here are Docker logs from my minimum reproducible example (see below). The wav files are concatenated successfully, then the container appears to rebuild.

    &#xA;

    [2024-06-03T05:26:58Z INFO  minimal_docker_webserver_post_error] Starting server on 0.0.0.0:3030&#xA;[2024-06-03T05:26:58Z INFO  warp::server] Server::run; addr=0.0.0.0:3030&#xA;[2024-06-03T05:26:58Z INFO  warp::server] listening on http://0.0.0.0:3030&#xA;[2024-06-03T05:27:07Z INFO  minimal_docker_webserver_post_error] WAV files concatenated successfully&#xA;[Running &#x27;cargo run&#x27;]&#xA;    Finished `dev` profile [unoptimized &#x2B; debuginfo] target(s) in 0.06s&#xA;     Running `target/debug/minimal_docker_webserver_post_error`&#xA;[2024-06-03T05:27:08Z INFO  minimal_docker_webserver_post_error] Starting server on 0.0.0.0:3030&#xA;[2024-06-03T05:27:08Z INFO  warp::server] Server::run; addr=0.0.0.0:3030&#xA;[2024-06-03T05:27:08Z INFO  warp::server] listening on http://0.0.0.0:3030&#xA;

    &#xA;

    What I have tried :&#xA;I tried using different web frameworks (Warp, Actix-web) and request crates (reqwest, ureq). I also tried running the setup outside of Docker, which worked as expected without any issues. Additionally, I tried running the setup in Docker without making any HTTP requests after the ffmpeg command, and the connection closed successfully without errors. I also tried posting to httpbin with a minimal request, but the issue persisted.

    &#xA;

    Minimum reproducible example :

    &#xA;

    main.rs

    &#xA;

    use warp::Filter;&#xA;use reqwest::Client;&#xA;use std::convert::Infallible;&#xA;use log::{info, error};&#xA;use env_logger;&#xA;use tokio::process::Command;&#xA;&#xA;#[tokio::main]&#xA;async fn main() {&#xA;    std::env::set_var("RUST_LOG", "debug");&#xA;    env_logger::init();&#xA;&#xA;    let route = warp::path::end()&#xA;        .and_then(handle_request);&#xA;&#xA;    info!("Starting server on 0.0.0.0:3030");&#xA;    warp::serve(route)&#xA;        .run(([0, 0, 0, 0], 3030))&#xA;        .await;&#xA;}&#xA;&#xA;async fn handle_request() -> Result<impl infallible="infallible"> {&#xA;    let client = Client::new();&#xA;&#xA;    let output = Command::new("ffmpeg")&#xA;        .args(&amp;[&#xA;            "y",&#xA;            "-i", "concat:/usr/src/minimal_docker_webserver_post_error/file1.wav|/usr/src/minimal_docker_webserver_post_error/file2.wav",&#xA;            "-c", "copy",&#xA;            "/usr/src/minimal_docker_webserver_post_error/combined.wav"&#xA;        ])&#xA;        .output()&#xA;        .await;&#xA;&#xA;    match output {&#xA;        Ok(output) => {&#xA;            if output.status.success() {&#xA;                info!("WAV files concatenated successfully");&#xA;            } else {&#xA;                error!("Failed to concatenate WAV files: {:?}", output);&#xA;                return Ok(warp::reply::with_status("Failed to concatenate WAV files", warp::http::StatusCode::INTERNAL_SERVER_ERROR));&#xA;            }&#xA;        },&#xA;        Err(e) => {&#xA;            error!("Failed to execute ffmpeg: {:?}", e);&#xA;            return Ok(warp::reply::with_status("Failed to execute ffmpeg", warp::http::StatusCode::INTERNAL_SERVER_ERROR));&#xA;        }&#xA;    }&#xA;&#xA;    // ISSUE: Connection closes with curl: (52) Empty reply from server&#xA;    match client.get("https://httpbin.org/get").send().await {&#xA;        Ok(response) => info!("GET request successful: {:?}", response),&#xA;        Err(e) => error!("GET request failed: {:?}", e),&#xA;    }&#xA;&#xA;    match client.post("https://httpbin.org/post")&#xA;        .body("field1=value1&amp;field2=value2")&#xA;        .send().await {&#xA;        Ok(response) => info!("POST request successful: {:?}", response),&#xA;        Err(e) => error!("POST request failed: {:?}", e),&#xA;    }&#xA;&#xA;    Ok(warp::reply::with_status("Request handled", warp::http::StatusCode::OK))&#xA;}&#xA;</impl>

    &#xA;

    FFMPEG command to generate the two wav files for concatenation

    &#xA;

    ffmpeg -f lavfi -i "sine=frequency=1000:duration=5" file1.wav &amp;&amp; ffmpeg -f lavfi -i "sine=frequency=500:duration=5" file2.wav&#xA;

    &#xA;

    Dockerfile

    &#xA;

    # Use the official Rust image as the base image&#xA;FROM rust:latest&#xA;&#xA;# Install cargo-watch&#xA;RUN cargo install cargo-watch&#xA;&#xA;# Install ffmpeg&#xA;RUN apt-get update &amp;&amp; apt-get install -y ffmpeg&#xA;&#xA;# Set the working directory inside the container&#xA;WORKDIR /usr/src/minimal_docker_webserver_post_error&#xA;&#xA;# Copy the Cargo.toml and Cargo.lock files&#xA;COPY Cargo.toml Cargo.lock ./&#xA;&#xA;# Copy the source code&#xA;COPY src ./src&#xA;&#xA;# Copy wav files&#xA;COPY file1.wav /usr/src/minimal_docker_webserver_post_error/file1.wav&#xA;COPY file2.wav /usr/src/minimal_docker_webserver_post_error/file2.wav&#xA;&#xA;# Install dependencies&#xA;RUN cargo build --release&#xA;&#xA;# Expose the port that the application will run on&#xA;EXPOSE 3030&#xA;&#xA;# Set the entry point to use cargo-watch&#xA;CMD ["cargo", "watch", "-x", "run"]&#xA;

    &#xA;

    Cargo.toml

    &#xA;

    [package]&#xA;name = "minimal_docker_webserver_post_error"&#xA;version = "0.1.0"&#xA;edition = "2021"&#xA;&#xA;# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html&#xA;&#xA;[dependencies]&#xA;warp = "0.3"&#xA;reqwest = { version = "0.12.4", features = ["json"] }&#xA;tokio = { version = "1", features = ["full"] }&#xA;log = "0.4"&#xA;env_logger = "0.11.3"&#xA;

    &#xA;

    Making the request to the warp server

    &#xA;

    curl -v "http://localhost:3030"&#xA;

    &#xA;