Recherche avancée

Médias (91)

Autres articles (40)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (6717)

  • How To create .webm video from MP4 file while file uploaded in website [closed]

    28 août 2020, par Den Jarwo

    Can Someone help me how to create .webm video from MP4 file,(etc) while file uploaded from every users in my website.

    

    


    I Need Like this :

    


    1. i am uploaded MP4 or other file video format, and while uploaded the video automatically generateing .webm file.

    


    2. the generated (.webm) file will take 10sec duration for descripting video from start till end of video with small size file.

    


    3. and generating 1 or 4 .jpg image (optional for choice image for thumbnail video).

    

    

    


    I am work with framework Ci4, HTML5, CSS, Jquery and JavaScript

    


  • ffmpeg : adding an audio file to a video at specified delays

    15 juillet 2020, par JarsOfJam-Scheduler

    I have an array that may contain multiple occurrences of these terms : 'video, forest'. An audio file is added to the video file when the current element of this array I iterate is 'forest'. Otherwise, not. 'video and forest' elements will increment (of 5 seconds) the delay at which an audio file will be added. Example : the array contains "video, video, forest, video, forest". The first audio file will be added at delay=15000ms. The last one, at 25000ms. Computation details : 0 (initialization) + 5000 (video) + 5000 (video) + 5000 (forest) + 5000 (video) + 5000 (forest). 5000 + 5000 + 5000 = 15000. 5000*5 = 25000.

    


    I use ffmpeg to implement this program. The problem is that only one audio file is added, at the beginning of my video file. So the delays are not actually taken into account I think.

    


    Note that the video file also contains a music. The audio files that I try to add must be present in the video file in addition to this music. The first line of the following code adds the music to the video. The next lines try to add the audio files at good delays.

    


    subprocess.call(
    ['C:/Users/XYZ/Downloads/ffmpeg/bin/ffmpeg.exe', '-i', 'XYZ/my_XYZ_video.webm', '-stream_loop', '-1', '-i', 'tmp_music/original_music.wav',
     '-c:v', 'copy', '-shortest', '-fflags', '+shortest', '-max_interleave_delta', '100M',
     'XYZ/my_XYZ_video_with_music.webm']
    , cwd='C:/Users/XYZ/Desktop/XYZ/')

chosen_songs = ['video', 'forest', 'forest', 'video']

time_for_ffmpeg = 0
for chosen_song in chosen_songs:
    if chosen_song == 'video':
        print('video')
        print(time_for_ffmpeg)
        time_for_ffmpeg += 2000    

    elif chosen_song == 'forest':
        print('forest')
        print(time_for_ffmpeg)
        subprocess.call(
            ['C:/Users/XYZ/Downloads/ffmpeg/bin/ffmpeg.exe', '-i', 'XYZ/my_XYZ_video_with_music.webm', '-i', 'tmp_music/forest.mp3',
             '-filter_complex',
             '[1]adelay=' + str(time_for_ffmpeg) + '|' + str(time_for_ffmpeg) + '[a1];[0][a1]amix', '-c:v', 'copy',
             'XYZ/my_XYZ_video_with_music_with_songs.webm']
            , cwd='C:/Users/XYZ/Desktop/XYZ/')
        time_for_ffmpeg += 5000
    


    


    My question

    


    Why can't I add the audio files corresponding to the forest the specified delays (implemented by the variable time_for_ffmpeg`) ? How could I fix my code ?

    


  • ffmpeg resize logo depending on video resolution with multiple outputs

    30 août 2022, par Panama Jack

    I'm having a tough time trying to get a logo above text in the lower right corner of my videos. The problem is depending on the video size and resolution the logo (image) is too big or too small. Sometimes it overlaps the text. How can I make it so that no matter what the resolution or ratio is, it scales proportionately and always above the text ? For example, videos of 1920x1080 at 16:9 or 1080x1920 9:16, or 1280x720 16:9 or 720x1280 9:16 and so on. Basically, it will always scale correctly on all outputs. Sometimes there might be more outputs but in this code sample there are 3 hls files. I tried scale2ref but can't get that to work and it makes my file sizes much bigger.

    


    Here's my current code.

    


    


    -filter_complex "[1:v]scale=150 :-2[logo] ;[0:v][logo]overlay=main_w-overlay_w-10:main_h-overlay_h-35,drawtext=fontfile=/var/www/area51-process1.somesite.com/html/includes/helveticaneue/HelveticaNeueMed.ttf:text=@somesite:fontcolor=white@0.9:fontsize=(h/32):x=w-tw-15:y=h-th-6,format=yuv420p,split=3[s0][s1][s2] ;[s0]scale=640:360[360p] ;[s1]scale=854:480[480p] ;[s2]scale=1280:720[720p]"
-map "[360p]" -map "[480p]" -map "[720p]" -maxrate:v:0 3000000 -bufsize:v:0 3000000 -maxrate:v:1 4000000 -bufsize:v:1 4000000 -maxrate:v:2 8000000 -bufsize:v:2 8000000 -map 0:a -c:a libfdk_aac -ac 2 -async 1 -ar 48000 -b:a 128k -c:v libx264 -preset veryfast -crf:v:0
25 -profile:v:0 high -crf:v:1 24 -profile:v:1 high -crf:v:2 23
-profile:v:2 high -g 50 -keyint_min 50 -force_key_frames "expr:gte(t,n_forced*2)" -sc_threshold 0 -flags +global_header
-movflags +faststart -max_muxing_queue_size 4096 -threads 0 -f tee "[select='v:0,a':f=hls:start_number=0:hls_flags=single_file:hls_playlist_type=vod:hls_segment_type=fmp4:hls_time=4:hls_list_size=0:hls_segment_filename=/var/www/area51-process1.somesite.com/html/v/OHE4f9WSezA-078f9ec1-2f2b-4a6b-a34d-a8c9d4c39d7b-360p-segment.mp4]/var/www/area51-process1.somesite.com/html/v/OHE4f9WSezA-078f9ec1-2f2b-4a6b-a34d-a8c9d4c39d7b-360p.m3u8|[select='v:1,a':f=hls:start_number=0:hls_flags=single_file:hls_playlist_type=vod:hls_segment_type=fmp4:hls_time=4:hls_list_size=0:hls_segment_filename=/var/www/area51-process1.somesite.com/html/v/OHE4f9WSezA-078f9ec1-2f2b-4a6b-a34d-a8c9d4c39d7b-480p-segment.mp4]/var/www/area51-process1.somesite.com/html/v/OHE4f9WSezA-078f9ec1-2f2b-4a6b-a34d-a8c9d4c39d7b-480p.m3u8|[select='v:2,a':f=hls:start_number=0:hls_flags=single_file:hls_playlist_type=vod:hls_segment_type=fmp4:hls_time=4:hls_list_size=0:hls_segment_filename=/var/www/area51-process1.somesite.com/html/v/OHE4f9WSezA-078f9ec1-2f2b-4a6b-a34d-a8c9d4c39d7b-720p-segment.mp4]/var/www/area51-process1.somesite.com/html/v/OHE4f9WSezA-078f9ec1-2f2b-4a6b-a34d-a8c9d4c39d7b-720p.m3u8"