Recherche avancée

Médias (2)

Mot : - Tags -/map

Autres articles (64)

  • 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

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

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

Sur d’autres sites (9890)

  • Why doesn't FFmpeg work when using yt-dlp in python script ?

    11 mai 2022, par spelle

    I'm trying to download a video using yt-dlp in python.

    


    ydl_opts = {'format': 'bv+ba/b'}
with YoutubeDL(ydl_opts) as ydl:
     ydl.download('https://www.reddit.com/r/cats/comments/re37dn/weve_been_feeding_this_stray_for_several_years/')


    


    But I'm reaching an FFmpeg error in the log

    


    [generic] 1o8t9ollwx481: Requesting header
[redirect] Following redirect to https://www.reddit.com/r/cats/comments/re37dn/weve_been_feeding_this_stray_for_several_years/
[Reddit] re37dn: Downloading JSON metadata
[Reddit] re37dn: Downloading m3u8 information
[Reddit] re37dn: Downloading MPD manifest
[info] 1o8t9ollwx481: Downloading 1 format(s): dash-video_4419291+dash-audio_0_133951
WARNING: You have requested merging of multiple formats but ffmpeg is not installed. The formats won't be merged.
[download] Destination: We’ve been feeding this stray for several years, but she’s lost a lot of weight and I don’t think she would last outside for another winter, so I brought her in. [1o8t9ollwx481].fdash-video_4419291.mp4
[download] 100% of 5.18MiB in 00:00               
[download] Destination: We’ve been feeding this stray for several years, but she’s lost a lot of weight and I don’t think she would last outside for another winter, so I brought her in. [1o8t9ollwx481].fdash-audio_0_133951.m4a
[download] 100% of 161.32KiB in 00:00


    


    FFmpeg is installed through pip and added in PATH.

    


  • How to append fMP4 chunks to SourceBuffer ?

    24 octobre 2020, par Stefan Falk

    I have finally managed to create an fMP4 but now I am not able to seek or play the file depending on what I do in the file.

    


    On my backend I am taking the file and convert it to MP4 or fragmented MP4.

    


    The file gets send to the clients chunk-wise but this approach does not seem to work as it used to work on Chrome (bot not on Firefox) when using MP3.

    


    How I played MP3

    


    Say we have a 10 seconds track that is 1 MB in size which I want to start playing from second five. I want to load chunks of 1 second.

    


    Thus, I have offset = 5 / 10 * file_size and chunkSize = 1 / 10 * file_size`.

    


    With this I just started loading the MP3-file at an offset of 0.5 MB and loaded the chunks as needed where each chunk was 0.1 MB in size.

    


    This worked because before actually playing the file, I loaded the first bytes of the file and appended it to the SourceBuffer as well s.t. it was able to load the meta-information of the file. However, this approach is just not working for fMP4.

    


    What I tried with fMP4

    


    So, I have been converting MP3 to fMP4 with the MP3-approach ..

    


    .. using +dash (can play but not seek)

    


    ffmpeg -i input.mp3 -acodec aac -b:a 256k -f mp4 -movflags +dash output.mp4


    


    .. using frag_keyframe+empty_moov (cannot play on Chrome)

    


    ffmpeg -i input.mp3 -acodec aac -b:a 256k -f mp4 -movflags frag_keyframe+empty_moov output.mp4


    


    On the client the chunks get appended to a SourceBuffer (as explained above) after creating it with the Mime-Type audio/mp4; codecs="mp4a.40.2" :

    


    this.sourceBuffer = this.mediaSource
                        .addSourceBuffer('audio/mp4; codecs="mp4a.40.2"');


    


    and

    


    private appendSegment = (chunk) => {
  try {
    this.sourceBuffer.appendBuffer(chunk);
  } catch {
    return;
  }
}


    


    The problem is that I can only play the +dash converted file if I start reading it from the start and continue adding chunks.

    


    However, if I start reading the file from further down, the audio gets never played.

    


    playTrack(track, 0.0);  // Start at second 0 works
playTrack(track, 10.0); // Start at second 10 does not work


    


  • Convert GIF to MP4 with ffmpeg with palette color

    28 mars 2019, par NAG

    Palettegen is ok :

    ffmpeg()
    .input('temp/' + input.hash)
    .outputOptions(["-vf fps=15,scale=320:-1:flags=lanczos,palettegen"])
    .output('temp/palette.png')

    the conversion using the palette return a error :

    Error : Cannot find a matching stream for unlabeled input pad 1 on filter Parsed_paletteuse_0

    ffmpeg()
    .input('color=' + input.bg)
    .inputFormat('lavfi')
    .input('temp/' + input.hash)
    .inputFormat('gif')
    .input('temp/palette.png')
    .outputOptions('-lavfi paletteuse')
    .complexFilter(["[0][1]scale2ref[bg][gif]", "[bg]setsar=1[bg]", "[bg][gif]overlay=shortest=1[o]", "[o]scale=trunc(iw/2)*2:trunc(ih/2)*2"])
    .outputOptions(['-pix_fmt yuv420p', '-movflags frag_keyframe+empty_moov', '-movflags +faststart', '-crf 5'])
    .toFormat('mp4')
    .output('temp/final-' + input.hash)

    ffmpeg final command :

    ffmpeg -f lavfi -i color=ffffff -f gif -i temp/cf81f99083462f693406e8fd03ca7009 -i temp/palette.png -y -filter_complex [0][1]scale2ref[bg][gif];[bg]setsar=1[bg];[bg][gif]overlay=shortest=1[o];[o]scale=trunc(iw/2)*2:trunc(ih/2)*2 -lavfi paletteuse -pix_fmt yuv420p -movflags frag_keyframe+empty_moov -movflags +faststart -crf 5 -f mp4 temp/final-cf81f99083462f693406e8fd03ca7009