Recherche avancée

Médias (1)

Mot : - Tags -/biographie

Autres articles (38)

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

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

  • Les images

    15 mai 2013

Sur d’autres sites (4219)

  • Trouble trimming video by frame number with ffmpeg

    8 décembre 2023, par jgore200377

    I want to trim/split a video with ffmpeg using frames. The reason why is because I am using a Shot Transition Detection model which returns a probability of transition for every frame in the video.

    


    Using timestamps to cut the video has yielded bad results as the precision is not 100%.

    


    Ive tried this command which just outputs the entire video which is DEFINITELY not what I want

    


    ffmpeg -i video.mp4 -vf "trim=start_frame=100:end_frame=200,setpts=PTS-STARTPTS" -c:a copy output.mp4


    


    Ive also tried using python bindings with ffmpeg-python

    


    import ffmpeg

input_file = ffmpeg.input('video.mp4')
output_file = ffmpeg.output(input_file.trim(start_frame=1300, end_frame=1500), 'test_output.mp4')
ffmpeg.run(output_file)


    


    This doesnt work either and outputs a video with half of it being still with unpredictable length

    



    


    Ive visited some other sites but none seem to have this nailed down and it would be much appreciated if someone can answer how to use frames to trim/split a video with ffmpeg.

    


  • Segmenting a video and adding text that differs in each segment [FFMPEG]

    31 octobre 2023, par Kal-Toh

    I have a folder full of videos I want to segment, resize and add text to. So far I've managed to segment and resize them.

    


    I'm trying to add text in a TikTok Style : [Kind of like][1] this but black text in a white background. (If that isn't possible, I'd be fine with just white text).

    


    I already have the font file(.oft file type, is that ok or does it need to be .ttf ?)
The video is being converted to 720x1280 (9:16) and I'd like the text to display at the top centre of the video, taking up roughly the top 25%.

    


    Further to this, and this is where I'm having trouble understanding the process :

    


    I'd like text at the bottom of the video in the same style, that would change each segment.

    


    For example :

    


    I have a 10 minute long video. I want to split this video into 60 second segments. Each segment will have a title (the same across each segment) and a sub title at the bottom that would differ for each segment (for example 'Part 1/10', 'Part 2/10' etc)

    


    I know I could run one command to segment each video, add the title and change the aspect ratio and a second command to add the bottom text, feeding in a variable based on the number of mp4 files in the folder, however that doesn't seem like the most efficient process. Is there a way to do this all in one command ?

    


    This is the command I'm using so far :

    


    ffmpeg_command = [
            'ffmpeg',
            '-i', os.path.join(input_folder, video_file),
            '-vf', f'scale=720:1280:force_original_aspect_ratio=decrease,pad=720:1280:(ow-iw)/2:(oh-ih)/2
            ,drawtext=text=\'{text}\':x=(w-tw)/2:y=(h/4)-th:fontsize=24:fontfile={font_path}:fontcolor=black:box=1:boxcolor=white',
            '-threads', '100',
            "-c:a", "copy",
            '-t', str(duration),
            '-segment_time', '160',  # 3 minutes
            '-reset_timestamps', '1',
            '-f', 'segment',
            os.path.join(output_subfolder, f'{video_name}_%03d.mp4')
        ]


    


    Although not styled the way I want it to be, it's a decent start and all else works fine.

    


    It's just the bottom text I can't figure.
[1] : https://i.insider.com/61aa608a983f360019c854a5?width=1300&format=jpeg&auto=webp

    


  • Streaming protocol relay without involving codec

    4 décembre 2015, par kiran_g

    I am trying to use libav to relay an RTSP stream. It involves PULLing the stream from an IP camera and then PUSHing to wowza.

    The video encoding in the IP camera stream is h264. To enable h264 in my libav application I need to enable x264. But as x264 is GPL, it will not work with my business plan.

    My questions is whether libav (ffmpeg) can be made to work like a dumb relay which is encoding-agnostic ? so that I dont need to integrate x264 with ffmpeg.

    This SO post says that I can use the "copy" argument, but does that allow me to exclude x264 ?

    BTW, is x264 actually needed by ffmpeg for decoding h264 ? Is x264 only used in encoding ?

    See here for my current code.