Recherche avancée

Médias (0)

Mot : - Tags -/diogene

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (59)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • 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

Sur d’autres sites (11106)

  • Video streaming FFMPEG - VLC video starts black

    7 novembre 2020, par xKedar

    I am trying to stream my webcam when an event occurs to another machine.
Giving the fact that FFMPEG needs around 2 seconds since I call it to when it starts streaming I'm running it in background sending everything to a local socket that consumes it until the event happens and then I reverse the data to the other machine

    


    Here I capture the camera

    


    class ffmpegThread (Thread):
    def __init__(self):
        Thread.__init__(self)
     
    def run(self):
        cam, mic = detect_devices()
        command = 'ffmpeg -f dshow -i video='+cam+':audio='+mic+' -profile:v high -pix_fmt yuvj420p -level:v 4.1 -preset ultrafast -tune zerolatency -vcodec libx264 -r 14 -b:v 512k -s 240x160 -acodec aac -ac 2 -ab 32k -ar 44100 -f mpegts -flush_packets 0 udp://127.0.0.1:'+str(config.ffmpeg_port)+'?pkt_size=1316'
        p = Popen(command , stderr=PIPE)
        for line in iter(p.stderr.readline,''):
           if config.end: break
        p.terminate()
        return 0


    


    This is where I receive and forward the video

    


    
class sendVideoThread (Thread):
    def __init__(self, UDPsenderSocket):
        Thread.__init__(self)
        self.UDPsenderSocket = UDPsenderSocket
 
    def run(self):
        sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        sock.bind(("127.0.0.1", config.ffmpeg_port))
        bufferSize  = 1348
        firstData = sock.recvfrom(bufferSize)
        while True:
            data = sock.recvfrom(bufferSize)
            if config.event == True:
                startTime = time.time()
                self.UDPsenderSocket.sendto(firstData[0], config.address)
                while time.time() - startTime < 14:
                    self.UDPsenderSocket.sendto(data[0], config.address) 
                    data = sock.recvfrom(bufferSize)                    
                config.event= False
            if config.end: sys.exit()



    


    And those are the vlc options on the other machine(not the whole code)

    


        def play(self):
        self.player = vlc.Instance(["--file-caching=0 --network-caching=0"]).media_player_new()
        self.player.set_mrl('udp://@0.0.0.0:'+str(config.vlcPlayer_port))
        self.player.set_hwnd(self.frame.winfo_id())
        self.player.audio_set_mute(False)
        self.player.play()



    


    The video reaches the other machine but it starts black with audio-only for some seconds then it starts working fine. I guess that by sending the video from a random moment(frame) when the event happens it may happen that vlc will miss some information about the video and needs the next frame with information to come in order to show the video, I was looking to something in order to have more frames with that info but I was not able to find it.

    


  • Produce an adaptive multi-resolution mpeg-dash file from an input video file

    1er mars 2021, par Tariq Hasan

    I can produce different resolution mpeg-dash videos from running these commands separately and get one .mpd file for each of the resolutions :

    


    ffmpeg -i /path/to/input.mp4 -vf scale=1920:1080 /path/to/output.mpd
ffmpeg -i /path/to/input.mp4 -vf scale=1280:720 /path/to/output.mpd
ffmpeg -i /path/to/input.mp4 -vf scale=720:480 /path/to/output.mpd
ffmpeg -i /path/to/input.mp4 -vf scale=640:360 /path/to/output.mpd


    


    The question is, how do I get a single .mpd file that maps to all these different resolution videos which would be adaptive in resolution when streamed over the network ?

    


  • ffmpeg - converting one audio track of a multi-track mp4

    30 décembre 2023, par Shaun.M

    I'm having a few mp4 with two audio tracks,
an english one in aac and a french one in dts.

    


    Now I want to convert only the french dts to eac3 with a single ffmpeg command.

    


    I use

    


    ffmpeg -hide_banner -i input.mp4 ^
             -map_metadata -1 ^
             -map 0:0 -c:v copy ^
             -map 0:1 -c:a copy ^
             -map 0:2 -c:a eac3 -b:a 1536k ^
             -metadata:s:a:0 language=eng ^
             -metadata:s:a:0 title="Stereo" ^
             -metadata:s:a:1 language=fra ^
             -metadata:s:a:1 title="Stereo" ^
output.mp4


    


    This works quite nice, but it converts both audio tracks to eac3, instead of leaving the first one untouched ...
What's wrong in the command ?

    


    (ffmpeg version 2023-12-23-git-f5f414d9c4-full_build-www.gyan.dev under Windows 10)