Recherche avancée

Médias (3)

Mot : - Tags -/image

Autres articles (67)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Menus personnalisés

    14 novembre 2010, par

    MediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
    Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
    Menus créés à l’initialisation du site
    Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

Sur d’autres sites (8431)

  • 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 :

    &#xA;

    current_dir = os.getcwd()&#xA;&#xA;client = TwitchClient(client_id=&#x27;&#x27;)&#xA;streams_now = client.streams.get_live_streams(limit=100, offset=900)&#xA;epoch = str(math.ceil(time.time()))&#xA;&#xA;if not os.path.exists(current_dir &#x2B; &#x27;/twitch_videos/&#x27;):&#xA;    os.mkdir(current_dir &#x2B; &#x27;/twitch_videos/&#x27;)&#xA;&#xA;for i in range(0, 100):&#xA;    try:&#xA;        username = streams_now[i][&#x27;channel&#x27;][&#x27;name&#x27;]&#xA;        id = streams_now[i][&#x27;id&#x27;]&#xA;        game = streams_now[i][&#x27;game&#x27;]&#xA;        game = game.translate(str.maketrans({&#x27;:&#x27;: &#x27;-&#x27;, &#x27; &#x27;: &#x27;-&#x27;, "&#x27;": &#x27;&#x27;, &#x27;!&#x27;: &#x27;&#x27;, &#x27;&amp;&#x27;: &#x27;_&#x27;, &#x27;.&#x27;: &#x27;&#x27;, &#x27;&#x2B;&#x27;: &#x27;_&#x27;}))&#xA;        streaming = streamlink.streams(&#x27;http://twitch.tv/&#x27; &#x2B; username)&#xA;        stream = streaming["best"].url&#xA;&#xA;        twitch_stream = ffmpeg.input(stream)&#xA;&#xA;        twitch_stream = ffmpeg.filter(twitch_stream,&#xA;                                      &#x27;fps&#x27;,&#xA;                                      fps=1,&#xA;                                      round=&#x27;up&#x27;)&#xA;&#xA;        twitch_stream = ffmpeg.output(twitch_stream,&#xA;                                      current_dir &#x2B; &#x27;/twitch_videos/&#x27; &#x2B; &#x27;%d_&#x27; &#x2B; username &#x2B; &#x27;_&#x27; &#x2B; epoch &#x2B; &#x27;.mp4&#x27;,&#xA;                                      sc_threshold=&#x27;0&#x27;,&#xA;                                      g=&#x27;60&#x27;,&#xA;                                      f=&#x27;segment&#x27;,&#xA;                                      segment_time=&#x27;600&#x27;,&#xA;                                      segment_format_options=&#x27;movflags=&#x2B;faststart&#x27;,&#xA;                                      reset_timestamps=&#x27;1&#x27;)frl3dqgn21bbpp6tajjvg5pdevczac&#xA;        ffmpeg.run(twitch_stream)&#xA;&#xA;&#xA;    except:&#xA;        pass&#xA;

    &#xA;

    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.

    &#xA;

    Update

    &#xA;

    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.

    &#xA;

  • FFmpeg : Frame sizes of the generated video are extremely larger than the expected [closed]

    8 février 2021, par bbasaran

    I am recording frames (screen buffer) as NumPy arrays during the game which runs on the resolution of "400x225". Each frame array is a size of 270.1 kB.

    &#xA;

    After saving those frames, I create an mp4 file with the following bash command (The game runs in 35 FPS (frames/second)) :

    &#xA;

    ffmpeg -r 35 -f image2 -i frame%05d.png -vcodec libx264 -crf 1 video.mp4&#xA;

    &#xA;

    Then I have used a tool to generate a CSV file of frame data from the video created with the command above. The output is here below. The weird this is that, if we sum those first 35 frames (video was recorded with "-r 35" parameter because game runs in 35 FPS), we get approximately 18k kbit.

    &#xA;

    18k kbit/sec bitrate is super high for a 400x225 video. What am I doing wrong while generating the video ? I appreciate any help, thanks !

    &#xA;

    enter image description here

    &#xA;

  • FFMPEG - force webm clusters duration [closed]

    1er avril 2021, par Vlad Sineok

    in short, i'm modifying a game that uses a VP8 video format.&#xA;the original videos are at 25 fps and have all clusters of nice and perfect duration 0.96 seconds and contain 25 blocks each (except for that last cluster, which usually varies). also every cluster starts with a keyframe. (all that information i gathered using webm_info from google's libwebm repo)

    &#xA;

    unless all of the requirements are met, the game struggles to play the webm file smoothly, so my own webm files stutter most of the time, because ffmpeg fails to create the correct clusters and mkclean doesn't help either.&#xA;so my question is : how would i force ffmpeg to make all clusters have that perfect duration ?&#xA;here's what my command currently looks like

    &#xA;

    for %%f in (*.webm) do (&#xA;ffmpeg -y -i %%f -vcodec libvpx -cpu-used 1 -pass 1 -reserve_index_space 16384 -fflags &#x2B;genpts -crf 15 -slices 8 -g 25 -keyint_min 25 -vprofile 1 -auto-alt-ref 1 -arnr-maxframes 5 -arnr-strength 3 -deadline good -vf scale=512:384,setsar=1:1 -vb 4000k -an -r 25 -movflags use_metadata_tags -f webm NUL &amp;&amp; ^&#xA;ffmpeg -y -i %%f -vcodec libvpx -cpu-used 1 -pass 2 -reserve_index_space 16384 -fflags &#x2B;genpts -crf 15 -slices 8 -g 25 -keyint_min 25 -vprofile 1 -auto-alt-ref 1 -arnr-maxframes 5 -arnr-strength 3 -deadline good -vf scale=512:384,setsar=1:1 -vb 4000k -an -r 25 -movflags use_metadata_tags -f webm %%~nf.webm&#xA;)&#xA;

    &#xA;