Recherche avancée

Médias (21)

Mot : - Tags -/Nine Inch Nails

Autres articles (50)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • 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

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

Sur d’autres sites (10113)

  • Play video using ffmpeg

    17 juin 2023, par MCD

    The following code stuck in the middle of the video. I want to play the video start at start_seconds and end at end_seconds.

    


    import subprocess
import cv2
import numpy as np
import subprocess

def play_video_with_ffmpeg(video_path, start_seconds, end_seconds):
print(start_seconds)

    # Set the desired frame size
    width = 920
    height = 600
    
    # Set the window position
    print("here")
    window_x = 600  # X position
    window_y = 10  # Y position
    cv2.namedWindow('Video Player', cv2.WINDOW_NORMAL)
    cv2.moveWindow('Video Player', window_x, window_y)
    
    # Build the ffmpeg command to skip to the desired start time and end time
    command = [
        'ffmpeg',
        '-ss', str(start_seconds),
        '-i', video_path,
        '-t', str((end_seconds - start_seconds)),
        '-vf', f'scale={width}:{height}',
        '-r', '30',
        '-f', 'image2pipe',
        '-pix_fmt', 'bgr24',
        '-vcodec', 'rawvideo',
        '-'
    ]
    
    # Open a subprocess to execute the ffmpeg command
    process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    
    # Create a buffer to hold the frame data
    buffer_size = width * height * 3
    frame_buffer = bytearray(buffer_size)
    
    while process.poll() is None:
        # Read the frame from the subprocess stdout into the buffer
        bytes_read = process.stdout.readinto(frame_buffer)
    
        if bytes_read == buffer_size:
            # Convert the frame buffer to a numpy array
            frame = np.frombuffer(frame_buffer, dtype='uint8').reshape((height, width, 3))
    
            # Resize the frame
            frame_resized = cv2.resize(frame, (width, height), interpolation=cv2.INTER_AREA)
    
            # Display the frame
            cv2.imshow('Video Player', frame_resized)
    
            if cv2.waitKey(1) & 0xFF == ord('q'):
                break
    
    process.stdout.close()
    process.stderr.close()
    cv2.destroyAllWindows()


    


    I expect to play the video start from start_second and end at end_second. I used cv2.set but it took long time to play from start_second.

    


  • Play audio out through specific output device with ffplay

    4 février 2018, par ComedicChimera

    I just have a quick question regarding ffplay (extension of ffmpeg) for Windows. I am trying to get it to allow me to play audio out of specific device (ie. a virtual audio cable), and I cannot find any documentation on how to do it.

    Here is my current command :

    "ffplay -loglevel panic -nodisp -volume volume -i url"

    I could not find any documentation of how to do this.

    If it is not possible to do this ffplay, I would like to ask if there is away to set a specific audio output device in Python 3 (as that is the language I am using to call ffplay)

    Thanks

  • System reboots during ffmpeg tool installation

    11 novembre 2016, par JeeBoomBaa

    I have enabled QSV with reference of the streambuilder’s enabling-iqsv docs.

    MACHINE DETAILS

    Server : Intel(R) Xeon(R) CPU E3-1285 v4 3.50GHz w/ Supermicro X10SLH-F

    Kernel : Linux 3.10.0-229.1.2.44985.MSSr7.el7.centos.x86_64 #1 SMP Wed Nov 9 16:26:25 PST 2016 x86_64 x86_64 x86_64 GNU/Linux

    I have installed ffmpeg with —enable-nonfree —enable-libmfx configurations, configuration command was successfully done.Then, I invoke make and our server gets hanged in few seconds and it will gets rebooted automatically.

    I feel it might be compilation issue with make script.

    ./configure --prefix="/usr/ffmpeg" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --bindir="$HOME/bin" --pkg-config-flags="--static" --enable-nonfree --enable-libmfx
    make
    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2068, si_status=0, si_utime=0, si_stime=0} ---
    rt_sigreturn()                          = 2068
    rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT TERM XCPU XFSZ], NULL, 8) = 0
    rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
    stat("libavcodec/intrax8dsp.o", {st_mode=S_IFREG|0644, st_size=82840, ...}) = 0
    stat("libavcodec/ituh263dec.o", 0x7ffff86affb0) = -1 ENOENT (No such file or directory)
    stat("libavcodec/ituh263dec.c", {st_mode=S_IFREG|0644, st_size=38617, ...}) = 0
    rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT TERM XCPU XFSZ], NULL, 8) = 0
    vfork()                                 = 2072
    rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
    wait4(-1, CC libavcodec/ituh263dec.o

    I have attached config.log and FFMPEG-MAKE-TRACE.log file.