Recherche avancée

Médias (2)

Mot : - Tags -/doc2img

Autres articles (28)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (7012)

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

    


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

    


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


    


    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.

    


    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 !

    


    enter image description here

    


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

    


  • Python ffmpeg does not save the mp4 clips to file

    30 janvier 2021, par oo92

    I'm using the ffmpeg Python library to save 60 second mp4 clips to file from Twitch livestreams 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, 1):
    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, to the name of the file. But the folder is empty after I take a look.