Recherche avancée

Médias (2)

Mot : - Tags -/kml

Autres articles (37)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (5694)

  • How to debug "Error in pull function & Input buffer exhausted" ?

    15 septembre 2021, par user16909319

    Introduction :

    


    I'm working on a Discord Music Bot for personal use only. Basically, when I play a 2min song with the bot, it plays the song for 1min 30secs, then skips it and plays the next one in the queue. The error is shown below :

    


    


    Error in Pull Function
    
IO error : Error number -10054 occurred
    
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000018f86a6f4c0] Packet corrupt (stream = 0, dts = 11154432).
    
Input buffer exhausted before END element found
    
Invalid Data found when processing Input
    
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000018f86a6f4c0] stream 0, offset 0x3e805c : partial file

    


    


    The code block which I think is causing the problem :

    


    Search song method

    


        async def search_song(self, amount, song, get_url=False):
        info = await self.bot.loop.run_in_executor(None, lambda: youtube_dl.YoutubeDL(ytdl_format_options).extract_info(
            f"ytsearch{amount}:{song}", download=False, ie_key="YoutubeSearch"))
        if len(info["entries"]) == 0: return None

        return [entry["webpage_url"] for entry in info["entries"]] if get_url else info


    


    Play_song method

    


        async def play_song(self, ctx, song):
        url = pafy.new(song).getbestaudio().url
        ctx.voice_client.play(discord.PCMVolumeTransformer(discord.FFmpegPCMAudio(url, executable="C:/ffmpeg/bin/ffmpeg.exe")),
                              after=lambda error: self.bot.loop.create_task(self.check_queue(ctx)))
        ctx.voice_client.source.volume = 0.5


    


    Formatting Options I provided :

    


    ytdl_format_options = {
    'format': 'bestaudio/best',
    'outtmpl': '%(extractor)s-%(id)s-%(title)s.%(ext)s',
    'restrictfilenames': True,
    'noplaylist': True,
    'nocheckcertificate': True,
    'ignoreerrors': True,
    'logtostderr': False,
    'quiet': True,
    'no_warnings': True,
    'default_search': 'auto',
    'source_address': '0.0.0.0'
}


    


    Solutions that I've tried :

    


      

    • Running it on both Replit and locally.
    • 


    • Redownloading FFmpeg
    • 


    • Ensuring FFmpeg, pafy, and youtube_dl are all up to date.
    • 


    


    Things to Note :

    


      

    • Playing a 2mins song, it stops after 1min 30 seconds and displays the error above. (75% of the song)
    • 


    • Playing a 1hr song, it still continues after 10 minutes.
    • 


    


    I do not have much experience in this yet so I'm not entirely sure where in my code is actually causing this issue or other ways which I can use to test and fix the issue.

    


  • ffmpeg cut flv but resulting video cannot be processed on youtube

    20 avril 2017, par user1017674

    I am using a simple ffmpeg command to cut some videos.

    The command i ran is

    ffmpeg -i test.flv -ss 0 -to 60 -c copy output.flv

    The output.flv turns out is not processable on youtube, but I am able to play this file locally using a random flv player that I downloaded.

    This is the log when cutting the video.

    The original file test.flv can be found here.
    https://drive.google.com/open?id=0B5eHJIAbpaIYaW95ZlFTMTUzNGc

    The output file output.flv can be found here.
    https://drive.google.com/open?id=0B5eHJIAbpaIYejk5dGJTOEo1UU0

    ./ffmpeg -i test.flv -ss 0 -to 60 -c copy diablo.flv
    ffmpeg version 3.3 Copyright (c) 2000-2017 the FFmpeg developers
     built with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
     configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl --enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-libgsm --enable-libvidstab --enable-libx265 --disable-doc --arch=x86_64 --enable-runtime-cpudetect
     libavutil      55. 58.100 / 55. 58.100
     libavcodec     57. 89.100 / 57. 89.100
     libavformat    57. 71.100 / 57. 71.100
     libavdevice    57.  6.100 / 57.  6.100
     libavfilter     6. 82.100 /  6. 82.100
     libswscale      4.  6.100 /  4.  6.100
     libswresample   2.  7.100 /  2.  7.100
     libpostproc    54.  5.100 / 54.  5.100
    Input #0, flv, from 'test.flv':
     Metadata:
       creator         : Coded
       metadatacreator : Yet Another Metadata Injector for FLV - Version 1.9
       hasKeyframes    : true
       hasVideo        : true
       hasAudio        : true
       hasMetadata     : true
       canSeekToEnd    : true
       datasize        : 69602014
       videosize       : 63600961
       audiosize       : 5917165
       lasttimestamp   : 292
       lastkeyframetimestamp: 292
       lastkeyframelocation: 69603218
     Duration: 00:04:51.68, start: 0.080000, bitrate: 1909 kb/s
       Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720, 1742 kb/s, 25 fps, 25 tbr, 1k tbn, 50 tbc
       Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp, 158 kb/s
    Output #0, flv, to 'diablo.flv':
     Metadata:
       creator         : Coded
       metadatacreator : Yet Another Metadata Injector for FLV - Version 1.9
       hasKeyframes    : true
       hasVideo        : true
       hasAudio        : true
       hasMetadata     : true
       canSeekToEnd    : true
       datasize        : 69602014
       videosize       : 63600961
       audiosize       : 5917165
       lasttimestamp   : 292
       lastkeyframetimestamp: 292
       lastkeyframelocation: 69603218
       encoder         : Lavf57.71.100
       Stream #0:0: Video: h264 (High) ([7][0][0][0] / 0x0007), yuv420p(progressive), 1280x720, q=2-31, 1742 kb/s, 25 fps, 25 tbr, 1k tbn, 1k tbc
       Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 48000 Hz, stereo, fltp, 158 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    frame= 1252 fps=0.0 q=-1.0 Lsize=   12074kB time=00:00:59.98 bitrate=1648.8kbits/s speed=1.21e+03x    
    video:10849kB audio:1153kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.598021%
  • Trim with transition/fade using FFMPEG given a list of timestamps

    19 janvier 2024, par realsarm

    I have a video and a list of timestamps that I want to filter.

    


    [
  {
    "timestamp": [10, 20],
    "state": true
  },
  {
    "timestamp": [30, 40],
    "state": false
  },
  {
    "timestamp": [50, 60],
    "state": true
  },
  {
    "timestamp": [70, 80],
    "state": true
  }
]


    


    I have a script like this to trim based on state.

    


        video_path = Path(video_in.name)
    video_file_name = video_path.stem

    timestamps_to_cut = [
        (timestamps_var[i]['timestamp'][0], timestamps_var[i]['timestamp'][1])
        for i in range(len(timestamps_var)) if timestamps_var[i]['state']]

    between_str = '+'.join(
        map(lambda t: f'between(t,{t[0]},{t[1]})', timestamps_to_cut))

    if timestamps_to_cut:
        video_file = ffmpeg.input(video_path)
        video = video_file.video.filter(
            "select", f'({between_str})').filter("setpts", "N/FRAME_RATE/TB")
        audio = video_file.audio.filter(
            "aselect", f'({between_str})').filter("asetpts", "N/SR/TB")

        output_video = f'./videos_out/{video_file_name}.mp4'
        ffmpeg.concat(video, audio, v=1, a=1).output(
            output_video).overwrite_output().global_args('-loglevel', 'quiet').run()


    


    How can I smooth out this trimming like adding a fade or smoothing transition each time state is false ?