Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (99)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • 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

Sur d’autres sites (10705)

  • How to resolve "runOnReady command exited with code 0" when restreaming a stream using Mediamtx ?

    2 juillet 2023, par Emad Helmi

    I'm attempting to publish a stream to the RTMP port 1935 using a ffmpeg command with Mediamtx (v0.22.2). Afterward, I want to restream the mainstream to another path using the runOnReady command in the config file. However, I'm encountering an issue where the runOnReady command exits with code 0.

    


    Steps to Replicate :

    


      

    1. Use the provided docker-compose.yml file :
    2. 


    


    version: "3.8"

name: mediamtx
services:
  mediamtx:
    image: aler9/rtsp-simple-server:v0.22.2
    container_name: media_mtx_rtsp_server
    ports:
      - "8554:8554"
      - "1935:1935"
      - "8888:8888"
      - "8889:8889"
      - "9997:9997"
      - "8000:8000"
    volumes:
      - ./configs/mediamtx/config.yml:/mediamtx.yml
      - ../volumes/hls/segments:/hls/segments


    


      

    1. Add the following path to the config.yml file :
    2. 


    


    paths:
  show/test:
    runOnReady: ffmpeg -i rtmp://localhost:1935/show/test -c copy -f flv "rtmp://localhost:1935/compressed/test"
    runOnReadyRestart: yes


    


      

    1. Start the server using docker-compose.
    2. 


    3. Publish an RTMP stream to the server using the following command :
    4. 


    


    ffmpeg -re -stream_loop -1 -i files/sample-30s.mp4 -c copy -f flv "rtmp://localhost:1935/show/test"


    


      

    1. When I check the logs :
    2. 


    


    2023/07/01 15:16:30 INF [RTMP] [conn 172.26.0.1:51044] opened
2023/07/01 15:16:30 INF [path show/test] runOnReady command started
2023/07/01 15:16:30 INF [RTMP] [conn 172.26.0.1:51044] is publishing to path 'show/test', 2 tracks (H264, MPEG4-audio-gen)
2023/07/01 15:16:30 INF [path show/test] runOnReady command exited with code 0


    


    So I can't watch the stream on the new path (/compressed/test)

    


  • Issue with ffprobe execution within Docker Environment

    7 mars 2024, par Khải Hồ Quang

    Here is my Dockerfile :

    


    FROM node:18-slim as builder

WORKDIR /usr/src/ai_api_builder/

COPY package*.json tsconfig.json /usr/src/ai_api_builder/

RUN apt-get update && \
    apt-get install mariadb-client -y && \
    npm install && npm cache clean --force

RUN apt install ffmpeg -y && \
    ffmpeg -version && \
    ffprobe -version
COPY ${REPO_DIR}/ ./

RUN npm run build && mv audio_store node_modules dist/

FROM node:18-slim

# Create and cd into app directory
WORKDIR /usr/src/dwt_api_app/dist

# Copy the artifact to the new image
COPY --from=builder /usr/src/dwt_api_builder/dist ./

EXPOSE 3001

ENTRYPOINT ["node", "app.js"]


    


    When I build Dockerfile, the step check ffmpeg and ffprobe version worked :

    


    ffmpeg version 5.1.4-0+deb12u1 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 12 (Debian 12.2.0-14)
...
ffprobe version 5.1.4-0+deb12u1 Copyright (c) 2007-2023 the FFmpeg developers


    


    But when I run container, my TypeScript code not work (the metadata return undefined) :

    


    import { ffprobe } from "fluent-ffmpeg";
ffprobe(latestFilePath, async function(err: any, metadata: any) {
    console.log("metadata", metadata);
})


    


    When I exec to container and check ffmpeg -version and ffprobe -version, I got : bash: ffmpeg: command not found. And when I check in bin folder, also couldn't find ffmpeg.
    
I tried it locally (Centos7), not in container, it worked (metadata return an object), and here is ffprobe version

    


    ffprobe version 6.1-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2007-2023 the FFmpeg developers <b>&#xA;&#xA;</b>

    &#xA;

    What step did I do wrong when running the container or is there any difference between debian (in container) and centos 7 (local) that I need to pay attention to ? Thanks

    &#xA;

  • Java shelling out to FFMPEG not running nor giving error

    4 janvier, par Todd

    I'm writing a Podcast downloader where I want to be able to download one or more podcasts then run them through FFMPEG.

    &#xA;

    It does run when I run the program in Windows.
    &#xA;It does not run when I run the program in Linux - Meaning FFMPEG may or may not have been called. I have no way of knowing. I get a -1 back from process.waitfor() but no error in my Java logs and no entries at all in the ffmpeg.log file. And there is no file in the processed file directory that FFMPEG would have created.
    &#xA;It does run in Linux if I run the same command that fails in Java from the command line.

    &#xA;

    FFMPEG has the permissions : rwxr-xr-x , so it doesn't seem as if it'd be a permission error. The Java code looks like :

    &#xA;

        ProcessBuilder processBuilder = new ProcessBuilder( commands );&#xA;    processBuilder.redirectErrorStream( true );&#xA;    //  Added the next line to see if I could log an error from ffmpeg&#xA;    processBuilder.redirectOutput( ProcessBuilder.Redirect.appendTo( new File( "./ffmpeg.log" ) ) );&#xA;&#xA;    Process process = processBuilder.start();&#xA;    BufferedReader bufferedOutputReader = new BufferedReader( new InputStreamReader( process.getInputStream() ) );&#xA;    do {&#xA;        outputString = bufferedOutputReader.readLine();&#xA;        if ( outputString != null ) {&#xA;            LOGGER.trace( outputString );&#xA;        }&#xA;    } while ( outputString != null );&#xA;    results = process.waitFor();&#xA;    LOGGER.debug( "Exit value: " &#x2B; results );&#xA;

    &#xA;

    The commands are :

    &#xA;

    2023-10-25 16:21:52,452 224257 [pool-1-thread-4] DEBUG org.sperbolink.utils.CodecUtils - command string: /bin/ffmpeg &#xA;2023-10-25 16:21:52,452 224257 [pool-1-thread-4] DEBUG org.sperbolink.utils.CodecUtils - command string: -y &#xA;2023-10-25 16:21:52,452 224257 [pool-1-thread-4] DEBUG org.sperbolink.utils.CodecUtils - command string: -i &#xA;2023-10-25 16:21:52,452 224257 [pool-1-thread-4] DEBUG org.sperbolink.utils.CodecUtils - command string: "/home/todd/aggregator/incoming/Downrange Radio/Downrange_Radio_2023-02-15_The_Avidity_PD-10_Delivers_.mp3" &#xA;2023-10-25 16:21:52,452 224257 [pool-1-thread-4] DEBUG org.sperbolink.utils.CodecUtils - command string: -ac &#xA;2023-10-25 16:21:52,452 224257 [pool-1-thread-4] DEBUG org.sperbolink.utils.CodecUtils - command string: 1 &#xA;2023-10-25 16:21:52,452 224257 [pool-1-thread-4] DEBUG org.sperbolink.utils.CodecUtils - command string: -af &#xA;2023-10-25 16:21:52,452 224257 [pool-1-thread-4] DEBUG org.sperbolink.utils.CodecUtils - command string: "atempo=1.4,volume=1.4" &#xA;2023-10-25 16:21:52,452 224257 [pool-1-thread-4] DEBUG org.sperbolink.utils.CodecUtils - command string: "/home/todd/aggregator/processed/Downrange Radio/Downrange_Radio_2023-02-15_The_Avidity_PD-10_Delivers_.mp3"&#xA;

    &#xA;

    And the manually constructed and run command line that DOES work is :

    &#xA;

    /bin/ffmpeg -y -i "/home/todd/aggregator/incoming/Downrange Radio/Downrange_Radio_2023-02-15_The_Avidity_PD-10_Delivers_.mp3" -ac 1 -af "atempo=1.4,volume=1.4" "/home/todd/aggregator/processed/Downrange Radio/Downrange_Radio_2023-02-15_The_Avidity_PD-10_Delivers_.mp3"&#xA;

    &#xA;

    The ffmpeg.log file is empty, so I'm doubting whether FFMPEG is ever being reached.

    &#xA;

    What am I doing wrong ?

    &#xA;

    EDIT :&#xA;I changed the commands to be

    &#xA;

    "/bin/ffmpeg 2> foo.txt" &#xA;

    &#xA;

    and the execution code to :

    &#xA;

        ProcessBuilder processBuilder = new ProcessBuilder( commands );&#xA;//        processBuilder.redirectErrorStream( true );&#xA;    //  Added the next line to see if I could log an error from ffmpeg&#xA;//        processBuilder.redirectOutput( ProcessBuilder.Redirect.appendTo( new File( "./ffmpeg.log" ) ) );&#xA;        Process process = processBuilder.start();&#xA;        results = process.waitFor();&#xA;

    &#xA;

    Running that command from the command line displays a list of MMPEG commands that can be run within foo.txt. Upon running from within the Java app, the foo.txt file is empty, so it doesn't appear that FFMPEG ever gets reached. But, I'm clueless why not.

    &#xA;

    EDIT 2 :&#xA;I converted the /bin/ffmpeg path to uppercase to see if that would return an error and it did.

    &#xA;

    ERROR org.mrpc.utilities.ShellUtils - Cannot run program "/BIN/FFMPEG": error=2, No such file or directory&#xA;

    &#xA;

    This seems to confirm that the Java Process object can locate ffmpeg successfully when it is properly cased (i.e. my original code) as I don't see an error message when the case is incorrect. Still not sure why nothing happens when it is called.

    &#xA;

    EDIT 3 :&#xA;I punted on this a year ago, but recently had to revisit. This time I found the answer. It is because I included double quotes around some of the command parameters. That caused the files to not be found. This link states that the Process class handles embedded spaces without any intervention required by you : ProcessBuilder adds extra quotes to command line

    &#xA;