Recherche avancée

Médias (3)

Mot : - Tags -/plugin

Autres articles (41)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

Sur d’autres sites (7822)

  • How can i make the dashjs player respect the stream window from ffmpeg ?

    7 mars 2021, par Octavia Kitsune

    I created the following command to i run on the serverside turn a source url into a cmaf dash stream :

    


    ffmpeg -loglevel error -re -i SOURCEURL -c copy -f dash -dash_segment_type mp4 -remove_at_exit 1 -seg_duration 2 -target_latency 1 -frag_type duration -frag_duration 0.1 -window_size 10 -extra_window_size 3 -streaming 1 -ldash 1 -use_template 1 -use_timeline 0 -index_correction 1 -tune zerolatency -fflags "+nobuffer+flush_packets" -format_options "movflags=cmaf" -adaptation_sets "id=0,streams=0 id=1,streams=1" -utc_timing_url "http://time.akamai.com/?iso&ms" stream/main.mpd


    


    And on the clientside i run a dashjs player with the following configuration :

    


      const video = document.getElementById('video')
  const player = dashjs.MediaPlayer().create()

  player.initialize(video, false, true)
  player.updateSettings({
    streaming: {
      stallThreshold: 0.05,
      lowLatencyEnabled: true,
      liveDelay: 1,
      liveCatchup: {
        minDrift: 1,
        playbackRate: 0.3,
        mode: 'liveCatchupModeDefault'
      },
      abr: {
        useDefaultABRRules: true,
        ABRStrategy: 'abrLoLP',
        fetchThroughputCalculationMode:
          'abrFetchThroughputCalculationMoofParsing'
      }
    }
  })


    


    My problem is, that dashjs loads a few segements and then tries to grab segments that error with a 404. It seems the segments it asks for fall out ot the window the stream defines.

    


    So i wonder how i can align my dashjs with my stream configuration so that it does respect the window defined by the stream, to basically simulate a livestream from any kind of videosource ?

    


  • How can i make the dashjs player respect the stream window ?

    6 mars 2021, par Octavia Kitsune

    I created the following command to i run on the serverside turn a source url into a cmaf dash stream :

    


    ffmpeg -loglevel error -re -i SOURCEURL -c copy -f dash -dash_segment_type mp4 -remove_at_exit 1 -seg_duration 2 -target_latency 1 -frag_type duration -frag_duration 0.1 -window_size 10 -extra_window_size 3 -streaming 1 -ldash 1 -use_template 1 -use_timeline 0 -index_correction 1 -tune zerolatency -fflags "+nobuffer+flush_packets" -format_options "movflags=cmaf" -adaptation_sets "id=0,streams=0 id=1,streams=1" -utc_timing_url "http://time.akamai.com/?iso&ms" stream/main.mpd


    


    And on the clientside i run a dashjs player with the following configuration :

    


      const video = document.getElementById('video')
  const player = dashjs.MediaPlayer().create()

  player.initialize(video, false, true)
  player.updateSettings({
    streaming: {
      stallThreshold: 0.05,
      lowLatencyEnabled: true,
      liveDelay: 1,
      liveCatchup: {
        minDrift: 1,
        playbackRate: 0.3,
        mode: 'liveCatchupModeDefault'
      },
      abr: {
        useDefaultABRRules: true,
        ABRStrategy: 'abrLoLP',
        fetchThroughputCalculationMode:
          'abrFetchThroughputCalculationMoofParsing'
      }
    }
  })


    


    My problem is, that dashjs loads a few segements and then tries to grab segments that error with a 404. It seems the segments it asks for fall out ot the window the stream defines.

    


    So i wonder how i can align my dashjs with my stream configuration so that it does respect the window defined by the stream, to basically simulate a livestream from any kind of videosource ?

    


  • Hide ffmpeg's console window when running YoutubeDL in GUI application

    27 février 2021, par Božo Stojković

    I'm developing a basic application which can download YouTube videos. Throughout the development, I had several quirks, including issues with formats.

    



    I decided to use a hopefully foolproof format syntax that youtube-dl will happily download for me in almost any case.

    



    Part of my YoutubeDL options look like this :

    



    self.ydl_opts = {
    'format': 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best',
    'quiet': True,
    'progress_hooks': [self.ydl_progress],
    'outtmpl': None
}


    



    The outtmpl is inserted later on when output folder is chosen by the user.

    



    Since I'm using this format string, youtube-dl uses ffmpeg to merge(?) the audio and video if they are downloaded separately.

    



    When it does that, it opens very annoying console windows that capture the focus and interrupt other things I might be doing while the videos are downloading.

    



    My question is, how can I prevent ffmpeg or youtube-dl from creating those console windows from appearing, aka. how can I hide them ?

    



    EDIT :

    



    I'll provide bare bones script that reproduces the problem :

    



    from __future__ import unicode_literals
from PyQt4 import QtGui, QtCore
import youtube_dl, sys

def on_progress(info):
    print info.get("_percent_str", "Finished")

ydl_opts = {
    'format': 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best',
    'progress_hooks': [on_progress],
    'quiet': True,
    'outtmpl': "C:/Users/Raketa/Desktop/%(title)s.%(ext)s"
}

ydl = youtube_dl.YoutubeDL(ydl_opts)

class DownloadThread(QtCore.QThread):
    def __init__(self):
        super(DownloadThread, self).__init__()
        self.start()

    def __del__(self):
        self.wait()

    def run(self):
        print "Download start"
        ydl.download(["https://www.youtube.com/watch?v=uy7BiiOI_No"])
        print "Download end"

class Application(QtGui.QMainWindow):
    def __init__(self):
        super(Application, self).__init__()
        self.dl_thread = DownloadThread()

    def run(self):
        self.show()

def main():
    master = QtGui.QApplication(sys.argv)

    app = Application()
    app.run()

    sys.exit(master.exec_())

if __name__ == '__main__':
    main()


    



    2(?) consoles appear at start of each download and 1 longer lasting console appears when both video and audio are downloaded. When downloading longer videos, the last console becomes unbearable.

    



    Is it possible to get rid of those ?