Recherche avancée

Médias (1)

Mot : - Tags -/berlin

Autres articles (73)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

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

  • Problems piping ffmpeg to flac encoder

    19 mai 2019, par Sebastian Olsen

    I need to encode a flac file with seektables, ffmpeg’s flac encoder does not include seektables, so I need to use the flac CLI. I’m trying to make it possible to convert any arbitrary audio file to a seekable flac file by first piping it through ffmpeg, then to the flac encoder.

    export const transcodeToFlac: AudioTranscoder<{}> = ({
     source,
     destination
    }) => {
     return new Promise((resolve, reject) => {
       let totalSize = 0

       const { stdout: ffmpegOutput, stderr: ffmpegError } = spawn("ffmpeg", [
         "-i",
         source,
         "-f",
         "wav",
         "pipe:1"
       ])

       const { stdout: flacOutput, stdin: flacInput, stderr: flacError } = spawn(
         "flac",
         ["-"]
       )

       flacOutput.on("data", (buffer: Buffer) => {
         totalSize += buffer.byteLength
       })

       ffmpegError.on("data", error => {
         console.log(error.toString())
       })

       flacError.on("data", error => {
         console.log(error.toString())
       })

       //stream.on("error", reject)

       destination.on("finish", () => {
         resolve({
           mime: "audio/flac",
           size: totalSize,
           codec: "flac",
           bitdepth: 16,
           ext: "flac"
         })
       })

       ffmpegOutput.pipe(flacInput)
       flacOutput.pipe(destination)
     })
    }

    While this code works, the resulting flac file is not correct. The source audio is of duration 06:14, but the flac file is of duration 06:45:47. Encoding the flac manually without piping ffmpeg to it works fine, but I cannot do that in a server environment where I need to utilize streams.

    Here’s what the flac encoder outputs when transcoding :

    flac 1.3.2
    Copyright (C) 2000-2009  Josh Coalson, 2011-2016  Xiph.Org Foundation
    flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
    welcome to redistribute it under certain conditions.  Type `flac' for details.

    -: WARNING: skipping unknown chunk 'LIST' (use --keep-foreign-metadata to keep)
    -: WARNING, cannot write back seekpoints when encoding to stdout
    -: 0% complete, ratio=0.357
    0% complete, ratio=0.432
    0% complete, ratio=0.482
    0% complete, ratio=0.527
    0% complete, ratio=0.541
    1% complete, ratio=0.554
    1% complete, ratio=0.563
    1% complete, ratio=0.571
    size=   36297kB time=00:03:30.70 bitrate=1411.2kbits/s speed= 421x
    1% complete, ratio=0.572
    1% complete, ratio=0.570
    1% complete, ratio=0.577
    1% complete, ratio=0.583
    1% complete, ratio=0.584
    1% complete, ratio=0.590
    1% complete, ratio=0.592
    size=   64512kB time=00:06:14.49 bitrate=1411.2kbits/s speed= 421x
    video:0kB audio:64512kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead:
    0.000185%

    -: WARNING: unexpected EOF; expected 1073741823 samples, got 16510976 samples
    2% complete, ratio=0.579
  • FFmpeg : Remux f4v cutted from stream to mp4

    13 mai 2019, par Martin

    I have a mp4 file cutted from a H.264/AAC stream with Wowza Media Server.
    After the cutting, the file was forced to mp4 format with the following command :

    ffmpeg -i wowza_output_file -vcodec copy -acodec copy -f mp4 -y wowza_output_file_copy

    From there I renamed it to test_f4v.mp4 and took ffprobe, to take a look at the file :

    ffprobe version 0.8, Copyright (c) 2007-2011 the FFmpeg developers
     built on Jul 20 2011 13:32:19 with gcc 4.4.3
     configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264
     libavutil    51.  9. 1 / 51.  9. 1
     libavcodec   53.  7. 0 / 53.  7. 0
     libavformat  53.  4. 0 / 53.  4. 0
     libavdevice  53.  1. 1 / 53.  1. 1
     libavfilter   2. 23. 0 /  2. 23. 0
     libswscale    2.  0. 0 /  2.  0. 0
     libpostproc  51.  2. 0 / 51.  2. 0
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test_f4v.mp4':
     Metadata:
       major_brand     : f4v
       minor_version   : 0
       compatible_brands: isommp42m4v
       creation_time   : 2012-04-23 12:36:06
     Duration: 01:00:01.84, start: 0.000000, bitrate: 2004 kb/s
       Stream #0.0(eng): Video: h264 (Baseline), yuv420p, 854x480 [PAR 1:1 DAR 427:240], 1903 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
       Metadata:
         creation_time   : 2012-04-23 12:36:06
       Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 96 kb/s
       Metadata:
         creation_time   : 2012-04-23 12:36:06

    Now there is a problem. I need a file, which has the following meta data :

    major_brand     : mp42
    compatible_brands: isom

    Is there a way to remux the mp4 file to get the major_brand and compatible_brands to the described values with ffmpeg ?

  • How to split a .mkv file into sounds and vedio file ?

    13 février 2020, par Ken Yip

    I have a mkv file which contain 3 streams. I use ffprobe to get the info of my mkv file.

    ffprobe ./demo/test2.mkv

    I got this output

    Input #0, matroska,webm, from './demo/test2.mkv':
    Metadata:
    encoder         : libebml v0.7.7 + libmatroska v0.8.1
    creation_time   : 2011-02-16T16:06:17.000000Z
    Duration: 00:03:41.08, start: 0.000000, bitrate: 1363 kb/s
    Stream #0:0: Video: rv40, yuv420p, 720x480, SAR 1:1 DAR 3:2, 29.97 tbr, 1k tbn, 1k tbc (default)
    Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp (default)
    Stream #0:2: Audio: aac (LC), 48000 Hz, stereo, fltp

    The audio streams should be vocal and background music. I would like to extract them from the video.

    I have try to do so with those command

    ffmpeg -i ./demo/test2.mkv -map_channel 0.1.0 -y ch0.wav -map_channel 0.2.0 -y ch1.wav

    However, it output the same audio file. Is there any mistake I have made ? Thanks a lot.