Recherche avancée

Médias (2)

Mot : - Tags -/plugins

Autres articles (20)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • 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

Sur d’autres sites (6286)

  • Running FFMPEG from Shell Script /bin/sh

    19 octobre 2015, par Chris James Champeau

    I am trying to setup a Shell Script to work within an automator watch folder...

    Everything works with the exception of the Run Shell Scrip portion...

    Essentially when a file shows up in the watch folder, it runs the shell scrip which calls FFMPEG and then will move the file to an archive folder for safe keeping. However right now automator is telling me everything worked but now file is being created.

    I have the Shell set to /bin/sh and Pass input set to as arguments

    Here is my script :

    for f in "$@"
    do
    name=$(basename "$f")
    dir=$(dirname "$f")
    ffmpeg -i "$f" -b 250k -strict experimental -deinterlace -vcodec h264 -acodec aac "$dir/mp4/${name%.*}.mp4"
    echo "$dir/mp4/${name%.*}.mp4"
    done

    it does echo the correct filename, but does not actually run ffmpeg

    I have tried adding -exec before it like I have seen in some scripts but still nothing...

  • OpenCV is able to read the stream but VLC not

    25 avril 2023, par Ahmet Çavdar

    I'm trying to stream my webcam frames to an UDP address. Here is my sender code.

    


    cmd = ['ffmpeg', '-y', '-f', 'rawvideo', '-pixel_format', 'bgr24', '-video_size', f'{width}x{height}', 
       '-i', '-', '-c:v', 'mpeg4','-preset', 'ultrafast', '-tune', 'zerolatency','-b:v', '1.5M',
       '-f', 'mpegts', f'udp://@{ip_address}:{port}']
p = subprocess.Popen(cmd, stdin=subprocess.PIPE)
camera = cv2.VideoCapture(0)
while True:
    ret, frame = camera.read()
    cv2.imshow("Sender",frame)
    if not ret:
        break
    p.stdin.write(frame.tobytes())
    p.stdin.flush()
    if cv2.waitKey(1) & 0xFF == ord('q'):
            break


    


    This Python code can make stream successfully. I can read the stream with this receiver code.

    


    q = queue.Queue()
def receive():
    cap = cv2.VideoCapture('udp://@xxx.x.xxx.xxx:5000')
    ret, frame = cap.read()
    q.put(frame)
    while ret:
        ret, frame = cap.read()
        q.put(frame)
def display():
    while True:
        if q.empty() != True:
            frame = q.get()
            cv2.imshow('Receiver', frame)
        k = cv2.waitKey(1) & 0xff
        if k == 27:  # press 'ESC' to quit
            break
tr = threading.Thread(target=receive, daemon=True)
td = threading.Thread(target=display)
tr.start()
td.start()
td.join()


    


    But I can not watch the stream from VLC. I'm going to Media->Open Network Stream->
udp ://@xxx.x.xxx.xxx:5000 to watch stream. After some seconds, the timer that located bottom left of VLC starts to increase but there are no frames in screen, just VLC icon.

    


    I checked firewall rules, opened all ports to UDP connections. I am using my IP address to send frames and watch them.
Also, I tried other video codecs like h264, hvec, mpeg4, rawvideo.
Additionally, I tried to watch stream by using Windows Media Player but it didn't work.

    


    What should I do to fix this issue ?

    


  • ffmpeg extract first subtitle for given language or fix mismapped tracks

    11 mars 2023, par iarwain8a

    I'm developing a server to encode any given video and I need to extract its subtitles.

    


    I've tried something like this which worked :

    


    ffmpeg -i pipe:0 -map 0:s:1 -c:s webvtt -f segment -segment_list_flags +live -segment_time 60 -segment_list subs_eng.m3u8 -segment_format webvtt subs_eng.vtt -loglevel debug


    


    This encodes from srt, into webvtt, the second track which happens to be in this video an English subtitle. But very quickly I ran into a problem in which the tracks mappings are not numbered correctly for this video, for example, the (eng) track should be "-map 0:s:2", but it's "-map 0:s:1" as I've said before, and the (bul) track, which should be "-map 0:s:4" is actually "-map 0:s:2".

    


    Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn (default)
  Stream #0:1(eng): Audio: eac3, 48000 Hz, 5.1(side), fltp, 768 kb/s (default)
  Stream #0:2(eng): Subtitle: subrip
    Metadata:
      title           : English
  Stream #0:3(eng): Subtitle: subrip
    Metadata:
      title           : English [SDH]
  Stream #0:4(bul): Subtitle: subrip
    Metadata:
      title           : Bulgarian (Bulgaria)


    


    Given said problem I tried something like this :

    


    ffmpeg -i pipe:0 -map 0:s:m:language:eng -c:s webvtt -f segment -segment_list_flags +live -segment_time 60 -segment_list subs_eng.m3u8 -segment_format webvtt subs_eng.vtt -loglevel debug


    


    Which didn't work because I can't or don't know how, to actually select the first result of this "-map 0:s:m:language:eng" if there is more than 1 "eng" sub track. Is there a way to do this ?
Or the alternative should be : Is there a reason why the metadata of this file is mismapped ? If so is there a way to detect it, to then do something about it ? or have it fixed ?