Recherche avancée

Médias (91)

Autres articles (73)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (12124)

  • FFMPEG optimal cmd for large filter_complex

    19 novembre 2019, par Artem Kuznetsov

    I need to mount complex video scenes from several files.
    Many trims, atrims, overlays, amix.
    Maybe it needs to be divided into several calls ?

    And I use something like this :

    ffmpeg -y -i 1.mp4 -i 2.mp4 -i 3.mp4 -i 4.mp4 -i 5.mp4 -i 6.mp4 -i 7.mp4 -i 8 -i 9.mp4 -i 10.mp4 -i 11.mp4 -i 12.mp4 -i 13.mp4 -f lavfi -i anullsrc \
    -filter_complex "[0:v]trim=end=0.456, setpts=PTS-STARTPTS[out0]; \
    [0:a]atrim=end=0.456, asetpts=PTS-STARTPTS[a_out0]; \
    [0:v]trim=0.456:969.456, setpts=PTS-STARTPTS, scale=iw*180/ih:180[out1]; \
    [1:v][out1]overlay=main_w-overlay_w-0:main_h-overlay_h:eof_action=pass[out2]; \
    [0:a]atrim=0.456:969.456, asetpts=PTS-STARTPTS[a_out1]; \
    [0:v]trim=969.456:974.138, setpts=PTS-STARTPTS[out3]; \
    [0:a]atrim=969.456:974.138, asetpts=PTS-STARTPTS[a_out2]; \
    [0:v]trim=974.138:1382.138, setpts=PTS-STARTPTS, scale=iw*180/ih:180[out4]; \
    [2:v][out4]overlay=main_w-overlay_w-0:main_h-overlay_h:eof_action=pass[out5]; \
    [0:a]atrim=974.138:1382.138, asetpts=PTS-STARTPTS[a_out3]; \
    [2:a][a_out3]amix=inputs=2:duration=first[a_out4]; \
    [0:v]trim=1382.138:1408.739, setpts=PTS-STARTPTS[out6]; \
    [0:a]atrim=1382.138:1408.739, asetpts=PTS-STARTPTS[a_out5]; \
    [0:v]trim=1408.739:2089.758, setpts=PTS-STARTPTS, scale=iw*180/ih:180[out7]; \
    [3:v][out7]overlay=main_w-overlay_w-0:main_h-overlay_h:eof_action=pass[out8]; \
    [0:a]atrim=1408.739:2089.758, asetpts=PTS-STARTPTS[a_out6]; \
    [3:a][a_out6]amix=inputs=2:duration=first[a_out7]; \
    [0:v]trim=2089.758:2112.511, setpts=PTS-STARTPTS[out9]; \
    [0:a]atrim=2089.758:2112.511, asetpts=PTS-STARTPTS[a_out8]; \
    [0:v]trim=2112.511:2358.528, setpts=PTS-STARTPTS, scale=iw*180/ih:180[out10]; \
    [4:v][out10]overlay=main_w-overlay_w-0:main_h-overlay_h:eof_action=pass[out11]; \
    [0:a]atrim=2112.511:2358.528, asetpts=PTS-STARTPTS[a_out9]; \
    ...
    [9:v]trim=18.184:36.184, setpts=PTS-STARTPTS, scale=iw*180/ih:180[out26]; \
    [10:v][out26]overlay=main_w-overlay_w-0:main_h-overlay_h:eof_action=pass[out27]; \
    [9:a]atrim=18.184:36.184, asetpts=PTS-STARTPTS[a_out18]; \
    [9:v]trim=36.184:90.237, setpts=PTS-STARTPTS[out28]; \
    [9:a]atrim=36.184:90.237, asetpts=PTS-STARTPTS[a_out19]; \
    [9:v]trim=90.237:345.237, setpts=PTS-STARTPTS, scale=iw*180/ih:180[out29]; \
    [11:v][out29]overlay=main_w-overlay_w-0:main_h-overlay_h:eof_action=pass[out30]; \
    [9:a]atrim=90.237:345.237, asetpts=PTS-STARTPTS[a_out20]; \
    [9:v]trim=345.237:414.306, setpts=PTS-STARTPTS[out31]; \
    [9:a]atrim=345.237:414.306, asetpts=PTS-STARTPTS[a_out21]; \
    [9:v]trim=414.306:585.314, setpts=PTS-STARTPTS, scale=iw*180/ih:180[out32]; \
    [12:v][out32]overlay=main_w-overlay_w-0:main_h-overlay_h:eof_action=pass[out33]; \
    [9:a]atrim=414.306:585.314, asetpts=PTS-STARTPTS[a_out22]; \
    [12:a][a_out22]amix=inputs=2:duration=first[a_out23]; \
    [9:v]trim=start=585.314, setpts=PTS-STARTPTS[out34]; \
    [9:a]atrim=start=585.314, asetpts=PTS-STARTPTS[a_out24]; \
    [out0][a_out0][out2][a_out1][out3][a_out2][out5][a_out4][out6][a_out5][out8][a_out7][out9][a_out8][out11][a_out10][out12][a_out11][out14][a_out12][out15][a_out13][out18][a_out14][out19][silence0][out20][a_out15][out23][a_out16][out24][silence1][out25][a_out17][out27][a_out18][out28][a_out19][out30][a_out20][out31][a_out21][out33][a_out23][out34][a_out24]concat=n=23:v=1:a=1[out][a_out]" \
    -map [out] -map [a_out] \
    -c:v libx264 -crf 18 -pix_fmt yuv420p \
    -c:a aac \
    output.mp4

    Is this optimal ? Can this be written somehow differently ?
    Now I have this problem :

    [out_0_1 @ 0x7fb2b8ca96c0] 100 buffers queued in out_0_1, something may be wrong. speed=8.51x      
    [out_0_1 @ 0x7fb2b8ca96c0] 1000 buffers queued in out_0_1, something may be wrong.
  • How to cut video properly with this ffmpeg python script

    11 décembre 2019, par exoboyyeet

    I am trying to write a python script that breaks a video into chunks of less than 64 mb each. This is my for loop that convert each chunk of broken up video :

    for part in range(parts):
       print(start, end)
       subprocess.run(f"ffmpeg -i {filename} -vcodec copy -acodec copy -ss {start} -t {end} {newfile}\OutputPart{part}.mp4", shell=True)
       start = end
       end += partlength

    I defined start to be 0 originally, and the end marker to be the length of each part.

    For example, if the video file is 139 mb and 20 mins long, it takes the size divided by 64 [2.171875] turns it into an integer plus 1 in order to add a third part for any amount of video after the last 64 mb marker. Then, it takes that number of parts and divides the length of the video (in our case 20 mins = 1200 seconds) by the number of parts (the variable set previously as parts) which would get us (1200 seconds divided by 3 parts = ) 400 which is the length each part should be (partlength). Now, it runs a loop for the number of parts, to convert a video with the start point (denoted in the ffmpeg command as -ss) originally 0, and the end point (-t), originally the length of 1 part (in our case 400). after the first run through, to make sure the start and endpoints are correct, it prints the start and end points. All the runs say the correct start and endpoints (0-400 ;400-800 ;800-1200). The first and third files convert perfectly, while the second file of the three has from 400-1200 (it includes the third file).

    Is there a reason why it won’t copy the correct segment ?

  • FFMPEG : Generate mastered m3u8 playlist

    22 octobre 2019, par Сергей Барахтенко

    Tell the command line for FFMPEG to generate a playlist of the following format :

    #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=380000,RESOLUTION=640x360,CODECS="mp4a.40.2,avc1.77.30",CLOSED-CAPTIONS=NONE
    https://myurl/media/manifest/[input_file_name]-360.m3u8
    #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1510000,RESOLUTION=1920x1080,CODECS="mp4a.40.2,avc1.77.30",CLOSED-CAPTIONS=NONE
    https://myurl/media/manifest/[input_file_name]-1080.m3u8
    #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=890000,RESOLUTION=1280x720,CODECS="mp4a.40.2,avc1.77.30",CLOSED-CAPTIONS=NONE
    https://myurl/media/manifest/[input_file_name]-720.m3u8
    #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=250000,RESOLUTION=320x180,CODECS="mp4a.40.2,avc1.77.30",CLOSED-CAPTIONS=NONE
    https://myurl/media/manifest/[input_file_name]-180.m3u8

    As you can see from the example, the file contains links to other m3u8 playlists, which are downloaded depending on the network bandwidth (BANDWIDTH parameter)

    An example of an internal m3u8 playlist (playlist [input_file_name]-360.m3u8)

    #EXTM3U
    #EXT-X-VERSION:3
    #EXT-X-PLAYLIST-TYPE:VOD
    #EXT-X-MEDIA-SEQUENCE:0
    #EXT-X-TARGETDURATION:4
    #EXTINF:4.000,
    https://myurl/media/conversion/[input_file_name]-360.mp4-1.ts
    #EXTINF:4.000,
    https://myurl/media/conversion/[input_file_name]-360.mp4-2.ts
    #EXTINF:4.000,
    https://myurl/media/conversion/[input_file_name]-360.mp4-3.ts
    #EXTINF:4.000,
    https://myurl/media/conversion/[input_file_name]-360.mp4-4.ts
    #EXTINF:4.000,
    https://myurl/media/conversion/[input_file_name]-360.mp4-5.ts
    #EXTINF:4.000,
    https://myurl/media/conversion/[input_file_name]-360.mp4-6.ts
    #EXTINF:4.000,
    https://myurl/media/conversion/[input_file_name]-360.mp4-7.ts
    #EXTINF:4.000,
    https://myurl/media/conversion/[input_file_name]-360.mp4-8.ts
    ...
    #EXT-X-ENDLIST

    As you can see from it, the source file was divided into 8 TS segments