Recherche avancée

Médias (1)

Mot : - Tags -/wave

Autres articles (29)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • 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

  • 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 ;

Sur d’autres sites (4234)

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

    


    It does run when I run the program in Windows.
    
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.
    
It does run in Linux if I run the same command that fails in Java from the command line.

    


    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 :

    


        ProcessBuilder processBuilder = new ProcessBuilder( commands );
    processBuilder.redirectErrorStream( true );
    //  Added the next line to see if I could log an error from ffmpeg
    processBuilder.redirectOutput( ProcessBuilder.Redirect.appendTo( new File( "./ffmpeg.log" ) ) );

    Process process = processBuilder.start();
    BufferedReader bufferedOutputReader = new BufferedReader( new InputStreamReader( process.getInputStream() ) );
    do {
        outputString = bufferedOutputReader.readLine();
        if ( outputString != null ) {
            LOGGER.trace( outputString );
        }
    } while ( outputString != null );
    results = process.waitFor();
    LOGGER.debug( "Exit value: " + results );


    


    The commands are :

    


    2023-10-25 16:21:52,452 224257 [pool-1-thread-4] DEBUG org.sperbolink.utils.CodecUtils - command string: /bin/ffmpeg 
2023-10-25 16:21:52,452 224257 [pool-1-thread-4] DEBUG org.sperbolink.utils.CodecUtils - command string: -y 
2023-10-25 16:21:52,452 224257 [pool-1-thread-4] DEBUG org.sperbolink.utils.CodecUtils - command string: -i 
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" 
2023-10-25 16:21:52,452 224257 [pool-1-thread-4] DEBUG org.sperbolink.utils.CodecUtils - command string: -ac 
2023-10-25 16:21:52,452 224257 [pool-1-thread-4] DEBUG org.sperbolink.utils.CodecUtils - command string: 1 
2023-10-25 16:21:52,452 224257 [pool-1-thread-4] DEBUG org.sperbolink.utils.CodecUtils - command string: -af 
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" 
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"


    


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

    


    /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"


    


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

    


    What am I doing wrong ?

    


    EDIT :
I changed the commands to be

    


    "/bin/ffmpeg 2> foo.txt" 


    


    and the execution code to :

    


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


    


    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.

    


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

    


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


    


    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.

    


    EDIT 3 :
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

    


  • youtube-dl (ffmpeg) blank error on embedding subtitles

    22 mars 2021, par Human1

    I am new to using youtube-dl, and therefore is quite unfamiliar with how it works. I configured it to download auto subs and english subs (if there were any), and embed them in the video. It worked for me for quite a good while (1 or 2 months), and it suddenly stopped working with blank errors starting to pop up, and I have no idea why that happened. I have checked that I am using the most updated version of youtube-dl and ffmpeg. I am currently using a m1 mac , and I don't know if that caused the problem. Below is the output I got with the -v command, as well as some background information.

    


    [debug] System config: []
[debug] User config: ['-o', '~/Documents/playlists/%(playlist)s/%(playlist_index)-i%(title)s.%(ext)s', '-f', 'mp4', '--write-sub', '--sub-lang', 'en', '--write-auto-sub', '--embed-subs']
[debug] Custom config: []
[debug] Command-line args: ['https://youtube.com/playlist?list=PL4cUxeGkcC9i3FXJSUfmsNOx8E7u6UuhG', '-v']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.03.14
[debug] Git HEAD: 59ada80ca
[debug] Python version 3.9.2 (CPython) - macOS-11.2.3-arm64-arm-64bit
[debug] exe versions: ffmpeg present, ffprobe present, rtmpdump 2.4
[debug] Proxy map: {}
[youtube:tab] PL4cUxeGkcC9i3FXJSUfmsNOx8E7u6UuhG: Downloading webpage
[download] Downloading playlist: CSS Flexbox Tutorial
[youtube:tab] playlist CSS Flexbox Tutorial: Downloading 12 videos
[download] Downloading video 1 of 12
[youtube] Y8zMYaD1bz0: Downloading webpage
[info] Writing video subtitles to: /Users/{username}/Documents/playlists/CSS Flexbox Tutorial/1CSS Flexbox Tutorial #1 - Introduction.en.vtt
[debug] Invoking downloader on 'https://r2---sn-45gpjx-3x4e.googlevideo.com/videoplayback?expire=1616392628&ei=VN1XYKikA9eo1gai6KegBg&ip=45.133.192.196&id=o-APtlxrUI2wU4tPFiSxBi5MzLnuR5EFYL3-TE-BpiPEYG&itag=22&source=youtube&requiressl=yes&mh=U3&mm=31%2C29&mn=sn-45gpjx-3x4e%2Csn-5hne6nlr&ms=au%2Crdu&mv=m&mvi=2&pl=24&initcwndbps=1155000&vprv=1&mime=video%2Fmp4&ns=r0wuXA2lBVMGhop9uJeEHHUF&ratebypass=yes&dur=317.161&lmt=1607169749865434&mt=1616370759&fvip=3&fexp=24001373%2C24007246&c=WEB&txp=5432434&n=_jK4PI5-7sa9Q0X2ye&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRAIgR0wbVc18mWDheT_QVT5Jsbmd647wKJNyVfzGRJd_oOkCIArV-vvKQmD3D7W90dw1l9b3zaJQNzltitp3BJPt2fqA&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAI9I7LQw5zTAldgCydhe3yzicBgvxYfxeHxI8lCxh3sLAiEAlT8Dpf93fiPbdMI3rHOebH-nFkToCZr1VfWaoX0HVeg%3D'
[download] /Users/{username}/Documents/playlists/CSS Flexbox Tutorial/1CSS Flexbox Tutorial #1 - Introduction.mp4 has already been downloaded
[download] 100% of 16.50MiB
[ffmpeg] Embedding subtitles in '/Users/{username}/Documents/playlists/CSS Flexbox Tutorial/1CSS Flexbox Tutorial #1 - Introduction.mp4'
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:/Users/{username}/Documents/playlists/CSS Flexbox Tutorial/1CSS Flexbox Tutorial #1 - Introduction.mp4' -i 'file:/Users/{username}/Documents/playlists/CSS Flexbox Tutorial/1CSS Flexbox Tutorial #1 - Introduction.en.vtt' -map 0 -c copy -map -0:s -map -0:d -c:s mov_text -map 1:0 -metadata:s:s:0 language=eng 'file:/Users/{username}/Documents/playlists/CSS Flexbox Tutorial/1CSS Flexbox Tutorial #1 - Introduction.temp.mp4'
ERROR: 
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/youtube-dl/2021.3.14/libexec/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 2106, in post_process
    files_to_delete, info = pp.run(info)
  File "/opt/homebrew/Cellar/youtube-dl/2021.3.14/libexec/lib/python3.9/site-packages/youtube_dl/postprocessor/ffmpeg.py", line 426, in run
    self.run_ffmpeg_multiple_files(input_files, temp_filename, opts)
  File "/opt/homebrew/Cellar/youtube-dl/2021.3.14/libexec/lib/python3.9/site-packages/youtube_dl/postprocessor/ffmpeg.py", line 235, in run_ffmpeg_multiple_files
    raise FFmpegPostProcessorError(msg)
youtube_dl.postprocessor.ffmpeg.FFmpegPostProcessorError


    


    I would be very grateful if anyone can tell me what happened and what should I do next. Thanks ! ;)

    


  • dashjs can't find initialization segment on manifest.mpd

    30 avril 2016, par Abelardo Mendoza

    I am following this tutorial to stream a WebM. I have no issues running the ffmpeg commands to generate the videos/audio/manifest files but when I try to run it locally, there’s no video or audio at all and dashjs floods the console with :

    Searching for initialization.    
    Start searching for initialization.    
    Perform init search: http://localhost:8080/video_1280x720_500k.webm    
    Perform SIDX load: http://localhost:8080/video_640x360_750k.webm    
    Perform SIDX load: http://localhost:8080/video_1280x720_500k.webm

    Writing that to console until I stop the server. I have tried using other mpd files such as this, which is used on the dashjs quickstart and it plays the video without any problems.

    I used this guide to install the latest version of ffmpeg on Ubuntu 14.04 LTS :

    ffmpeg version N-79688-g3cb3ddd Copyright (c) 2000-2016 the FFmpeg developers
    built with gcc 5.3.0 (Ubuntu 5.3.0-3ubuntu1~14.04) 20151204
    configuration: --prefix=/home/ab/cpp/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/ab/cpp/ffmpeg_build/include --extra-ldflags=-L/home/ab/cpp/ffmpeg/lib --bindir=/home/ab/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
    libavutil      55. 23.100 / 55. 23.100
    libavcodec     57. 38.100 / 57. 38.100
    libavformat    57. 34.103 / 57. 34.103
    libavdevice    57.  0.101 / 57.  0.101
    libavfilter     6. 44.100 /  6. 44.100
    libswscale      4.  1.100 /  4.  1.100
    libswresample   2.  0.101 /  2.  0.101
    libpostproc    54.  0.100 / 54.  0.100

    When running on ffmpeg :

    ffmpeg \
    -f webm_dash_manifest -i video_160x90_250k.webm \
    -f webm_dash_manifest -i video_320x180_500k.webm \
    -f webm_dash_manifest -i video_640x360_750k.webm \
    -f webm_dash_manifest -i video_640x360_1000k.webm \
    -f webm_dash_manifest -i video_1280x720_500k.webm \
    -f webm_dash_manifest -i audio_128k.webm \
    -c copy -map 0 -map 1 -map 2 -map 3 -map 4 -map 5 \
    -f webm_dash_manifest \
    -adaptation_sets "id=0,streams=0,1,2,3,4 id=1,streams=5" \
    manifest.mpd

    It generates the following manifest.mpd :

    <?xml version="1.0" encoding="UTF-8"?>
    <mpd xmlns="urn:mpeg:DASH:schema:MPD:2011" type="static" mediapresentationduration="PT117.726S" minbuffertime="PT1S" profiles="urn:webm:dash:profile:webm-on-demand:2012">
     <period start="PT0S" duration="PT117.726S">
       <adaptationset mimetype="video/webm" codecs="vp9" lang="eng" bitstreamswitching="true" subsegmentalignment="true" subsegmentstartswithsap="1">
         <representation bandwidth="198155" width="160" height="90">
           <baseurl>video_160x90_250k.webm</baseurl>
           <segmentbase indexrange="2007834-2008211">
             <initialization range="0-437"></initialization>
           </segmentbase>
         </representation>
         <representation bandwidth="459264" width="320" height="180">
           <baseurl>video_320x180_500k.webm</baseurl>
           <segmentbase indexrange="4459996-4460374">
             <initialization range="0-439"></initialization>
           </segmentbase>
         </representation>
         <representation bandwidth="718495" width="640" height="360">
           <baseurl>video_640x360_750k.webm</baseurl>
           <segmentbase indexrange="6614036-6614414">
             <initialization range="0-441"></initialization>
           </segmentbase>
         </representation>
         <representation bandwidth="931445" width="640" height="360">
           <baseurl>video_640x360_1000k.webm</baseurl>
           <segmentbase indexrange="8309082-8309460">
             <initialization range="0-441"></initialization>
           </segmentbase>
         </representation>
         <representation bandwidth="821274" width="1280" height="720">
           <baseurl>video_1280x720_500k.webm</baseurl>
           <segmentbase indexrange="8728812-8729190">
             <initialization range="0-441"></initialization>
           </segmentbase>
         </representation>
       </adaptationset>
       <adaptationset mimetype="audio/webm" codecs="vorbis" lang="eng" audiosamplingrate="44100" bitstreamswitching="true" subsegmentalignment="true" subsegmentstartswithsap="1">
         <representation bandwidth="107104">
           <baseurl>audio_128k.webm</baseurl>
           <segmentbase indexrange="1538710-1539184">
             <initialization range="0-4112"></initialization>
           </segmentbase>
         </representation>
       </adaptationset>
     </period>
    </mpd>

    The index.html has a few changes because dash.js changed the way the player gets initialized.

       
           
           
           <code class="echappe-js">&lt;script src=&quot;http://cdn.dashjs.org/latest/dash.all.debug.js&quot;&gt;&lt;/script&gt;

    And here is Chromium’s log file. I’m converting this webm from this site.

    If I missed out any other relevant information or if anyone can guide me into the right direction, please let me know.

    Edit :

    Like Will Law mentioned, using the Shaka Player worked without any issues with my current manifest. Hope this helps anyone else.