Recherche avancée

Médias (3)

Mot : - Tags -/plugin

Autres articles (54)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

Sur d’autres sites (10040)

  • Calculating PCR (Program clock reference) in MPEG2 Transport stream

    1er octobre 2024, par Tomislav Timic

    i am implementing transcoder and packager for abr protocols (HLS/DASH), and also udp mutlicast as output option. I am currently finishing multiplexing of mpeg 2 transport streams, but i do not really understand how should pcr work, how should I calculate it, I have pts/dts values, is there some formula to derive pcr from pts and/or dts ? When i do tsdump from tsduck with ffmpeg output they have around +100ms PCR delay on PTS.

    


    I found some calculations like this :

    


    (int64_t) ((8.0 * (packetsWritten * TS_PACKET_LENGTH + offset) / tsMuxrate) * TS_CLOCK + 0.5) + pcrStart


    


    But it does not match ffmpeg calculation. When i do like this :

    


    base = (int64_t) packet->dts - (int64_t) (SYSTEM_CLOCK_FREQ_90kHz * 0.1);


    


    It has +100ms delay from PTS. But it is hardcoded.

    


  • JavaFX : ffmpeg process finishes writing the file only after closing the program

    16 juin 2024, par The Engineer

    My JavaFX application uses ffmpeg to extract the first frame from a video file. The ffmpeg command is run in a separate thread, and the process ends with a wait. However, despite the fact that the image is saved to a temporary directory (temp/video_preview.jpg ), it becomes available only after the forced termination of the entire program, and not immediately after the completion of the ffmpeg process. I need the image to be available for display in ImageView immediately after the ffmpeg process is completed.
    
https://github.com/Memory420/GifConverter/tree/master

    


    I expected the ffmpeg process to quickly create a picture and I would apply it where I need it.

    


    @FXML&#xA;    private void onDragOver(DragEvent event) {&#xA;        if (event.getDragboard().hasFiles()) {&#xA;            event.acceptTransferModes(TransferMode.ANY);&#xA;        }&#xA;    }&#xA;&#xA;    @FXML&#xA;    private void onDragDropped(DragEvent event) {&#xA;        Dragboard db = event.getDragboard();&#xA;        boolean success = false;&#xA;        if (db.hasFiles()) {&#xA;            List<file> files = db.getFiles();&#xA;            File videoFile = files.get(0);&#xA;            Image image = extractFirstFrameFromVideo(videoFile.getAbsolutePath());&#xA;            mainImage.setImage(image);&#xA;            success = true;&#xA;        }&#xA;        event.setDropCompleted(success);&#xA;        event.consume();&#xA;    }&#xA;</file>

    &#xA;

    private Image extractFirstFrameFromVideo(String pathToVideo) {&#xA;        try {&#xA;            ProcessBuilder processBuilder = new ProcessBuilder(&#xA;                    ffmpegPath,&#xA;                    "-y",&#xA;                    "-ss", "00:00:00",&#xA;                    "-i", pathToVideo,&#xA;                    "-frames:v", "1",&#xA;                    outputFilePath  // "temp/video_preview.jpg"&#xA;            );&#xA;&#xA;            Process process = processBuilder.start();&#xA;&#xA;            int exitCode = process.exitValue();&#xA;            if (exitCode != 0) {&#xA;                throw new IOException("ffmpeg process exited with error code: " &#x2B; exitCode);&#xA;            }&#xA;&#xA;            return new Image(new File(outputFilePath).toURI().toString());&#xA;&#xA;        } catch (IOException e) {&#xA;            throw new RuntimeException(e);&#xA;        }&#xA;    }&#xA;

    &#xA;

  • How to rename the .wav file which is going to download using the below program ?

    29 avril 2020, par Y V Sravan Kumar Reddy
    from __future__ import unicode_literals&#xA;import youtube_dl&#xA;&#xA;ydl_opts = {&#xA;    &#x27;format&#x27;: &#x27;bestaudio/best&#x27;,&#xA;    &#x27;postprocessors&#x27;: [{&#xA;        &#x27;key&#x27;: &#x27;FFmpegExtractAudio&#x27;,&#xA;        &#x27;preferredcodec&#x27;: &#x27;wav&#x27;,&#xA;        &#x27;preferredquality&#x27;: &#x27;192&#x27;&#xA;    }],&#xA;    &#x27;postprocessor_args&#x27;: [&#xA;        &#x27;-ar&#x27;, &#x27;16000&#x27;&#xA;    ],&#xA;    &#x27;prefer_ffmpeg&#x27;: True,&#xA;    &#x27;keepvideo&#x27;: True&#xA;}&#xA;&#xA;with youtube_dl.YoutubeDL(ydl_opts) as ydl:&#xA;    ydl.download([&#x27;https://www.youtube.com/watch?v=JpjEwIceVIo&#x27;])&#xA;

    &#xA;&#xA;


    &#xA;&#xA;

    Output :

    &#xA;&#xA;

    [youtube] JpjEwIceVIo: Downloading webpage&#xA;[download] Speech on Importance of Education in English for Higher Secondary students by Smile Please World-JpjEwIceVIo.webm has already been downloaded&#xA;[download] 100% of 1.69MiB&#xA;[ffmpeg] Destination: Speech on Importance of Education in English for Higher Secondary students by Smile Please World-JpjEwIceVIo.wav&#xA;

    &#xA;&#xA;


    &#xA;&#xA;

    I want to change the filename to audio1.wav instead of Speech on Importance of Education in English for Higher Secondary students by Smile Please World-JpjEwIceVIo.wav. Please help me with this problem.

    &#xA;