Recherche avancée

Médias (91)

Autres articles (36)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Les images

    15 mai 2013

Sur d’autres sites (6187)

  • ffmpeg : Make output file duration that of the file with the longest length [closed]

    27 février 2024, par losercantcode

    I'm going crazy trying to figure this out.

    


    Essentially I'm trying to apply sidechain compression using ffmpeg (for the sake of speed and automation). a2.mp3 in this example is the full length track and a1.wav is a short 5 second, spoken-word clip. The code currently applies the sidechain compression well, but the output file is only that of the spoken-word clips length, so 5 seconds. Is it at all possible to make the output match that of a2.mp3's length instead ? Switching around the input order is not something that's possible as it'll apply the compression to the incorrect track.

    


    Essentially, i'm trying to make it so i'm just layering the spoken-word file on top of the audio track without having to pre-pad the file. I'd rather, if it's possible, this just happen with one block of code within the in one program. I'm interested to see if this is at all possible within ffmpeg.

    


    ffmpeg -i a2.mp3 -i a1.wav -filter_complex "[1:a]asplit=2[sc][mix];[0:a][sc]sidechaincompress=threshold=0.000976563:ratio=10:level_sc=0.015625:release=100:attack=10[compr];[compr][mix]amix=duration=longest[aout]" -map "[aout]" output.wav


    


    a1.wav is mon, a2.mp3 is stereo.

    


    Attempted to implement amix=duration=longest to no avail. Research similar problems on the Stack Exchange that gave unrelated answers.

    


  • FFmpeg does not save the mp4 clips to file

    31 janvier 2021, par oo92

    I'm using the FFmpeg Python library to save 60-second mp4 clips to a .mp4 file from Twitch live streams using its API. This is my code :

    


    current_dir = os.getcwd()

client = TwitchClient(client_id='')
streams_now = client.streams.get_live_streams(limit=100, offset=900)
epoch = str(math.ceil(time.time()))

if not os.path.exists(current_dir + '/twitch_videos/'):
    os.mkdir(current_dir + '/twitch_videos/')

for i in range(0, 100):
    try:
        username = streams_now[i]['channel']['name']
        id = streams_now[i]['id']
        game = streams_now[i]['game']
        game = game.translate(str.maketrans({':': '-', ' ': '-', "'": '', '!': '', '&': '_', '.': '', '+': '_'}))
        streaming = streamlink.streams('http://twitch.tv/' + username)
        stream = streaming["best"].url

        twitch_stream = ffmpeg.input(stream)

        twitch_stream = ffmpeg.filter(twitch_stream,
                                      'fps',
                                      fps=1,
                                      round='up')

        twitch_stream = ffmpeg.output(twitch_stream,
                                      current_dir + '/twitch_videos/' + '%d_' + username + '_' + epoch + '.mp4',
                                      sc_threshold='0',
                                      g='60',
                                      f='segment',
                                      segment_time='600',
                                      segment_format_options='movflags=+faststart',
                                      reset_timestamps='1')frl3dqgn21bbpp6tajjvg5pdevczac
        ffmpeg.run(twitch_stream)


    except:
        pass


    


    I am concatenating the path it should go to the name of the file but the folder is empty after I take a look. The reason why its in the try-catch block is because some streams do not have the best tag so I want to skip those.

    


    Update

    


    I put a bunch of print statements inside the try block and none of them get printed. I put similar if statements inside the except block and they are all printed. This means that there is something wrong with my code inside the try block. This tells me that the code inside the try block never gets executed.

    


  • Using FFMPEG to batch remove audio endings

    27 juillet 2019, par user2828890

    I have over 1000 audio files, all of which end in a mouse click. I would like to remove the last half second from all of them. The audio files have different length (i.e. 15sec, 5 sec ...) But one thing in common with all of them is the last half second has a mouse click sound. How do I trim in bulk the ending of the mp3 files within a folder using windows 10 command line ? I already have FFMPEG downloaded. Thank you !