Recherche avancée

Médias (3)

Mot : - Tags -/spip

Autres articles (29)

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

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

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (3751)

  • How to use Intel Quick Sync/iGPU in OVH dedicated server

    3 octobre 2022, par Meir

    I have a dedicated server with the following HW :

    


    CPU: Intel(R) Xeon(R) E-2386G CPU @ 3.50GHz
Motherboard: Manufacturer: ASRockRack, Product Name: E3C252D4U-2T/OVH


    


    According to the Intel website, E-2386G has Intel Quick Sync, and I want to use it.
I tried to check which VGA I have in the system (expected to see Intel + the local), and this is the output :

    


    05:00.0 VGA compatible controller: ASPEED Technology, Inc. ASPEED Graphics Family (rev 41)


    


    I.e., the Intel iGPU doesn't recognize at all in the system, I tried to check in /dev/dri what are the existing devices there, and this is the output :

    


    ls -alh /dev/dri
total 0
drwxr-xr-x  3 root root      80 Sep 19 10:28 .
drwxr-xr-x 18 root root    4.2K Sep 20 13:05 ..
drwxr-xr-x  2 root root      60 Sep 19 10:28 by-path
crw-rw----  1 root video 226, 0 Sep 19 10:28 card0


    


    When I tried to run vainfo tool, I get the following results :

    


    Vanilla run :

    


    vainfo
error: can't connect to X server!
libva info: VA-API version 1.7.0
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
vaInitialize failed with error code -1 (unknown libva error),exit


    


    Run after setting export LIBVA_DRIVER_NAME=i965 :

    


    vainfo
error: can't connect to X server!
libva info: VA-API version 1.7.0
libva info: User environment variable requested driver 'i965'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_6
libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit


    


    Run with sudo :

    


    sudo vainfo
error: XDG_RUNTIME_DIR not set in the environment.
error: can't connect to X server!
libva info: VA-API version 1.7.0
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
vaInitialize failed with error code -1 (unknown libva error),exit


    


    How can I use Intel Quick Sync ?

    


    --- edit ---

    


    Running the suggested commands :

    


    vainfo --display DRM
libva info: VA-API version 1.7.0
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
vaInitialize failed with error code -1 (unknown libva error),exit

vainfo --display wayland
error: failed to initialize display 'wayland'

vainfo --display help
Available displays:
  wayland
  x11
  DRM


sudo journalctl -b | grep i965  (no results)


    


  • Python code mutes whole video instead of sliding a song. What shall I do ?

    16 juillet 2023, par Armed Nun

    I am trying to separate a song into 4 parts and slide the parts in random parts of a video. The problem with my code is that the final output video is muted. I want to play parts of the song at random intervals and while the song is playing the original video shall be muted. Thanks to everyone who helps

    


    import random
from moviepy.editor import *

def split_audio_into_parts(mp3_path, num_parts):
    audio = AudioFileClip(mp3_path)
    duration = audio.duration
    part_duration = duration / num_parts

    parts = []
    for i in range(num_parts):
        start_time = i * part_duration
        end_time = start_time + part_duration if i < num_parts - 1 else duration
        part = audio.subclip(start_time, end_time)
        parts.append(part)

    return parts

def split_video_into_segments(video_path, num_segments):
    video = VideoFileClip(video_path)
    duration = video.duration
    segment_duration = duration / num_segments

    segments = []
    for i in range(num_segments):
        start_time = i * segment_duration
        end_time = start_time + segment_duration if i < num_segments - 1 else duration
        segment = video.subclip(start_time, end_time)
        segments.append(segment)

    return segments

def insert_audio_into_segments(segments, audio_parts):
    modified_segments = []
    for segment, audio_part in zip(segments, audio_parts):
        audio_part = audio_part.volumex(0)  # Mute the audio part
        modified_segment = segment.set_audio(audio_part)
        modified_segments.append(modified_segment)

    return modified_segments

def combine_segments(segments):
    final_video = concatenate_videoclips(segments)
    return final_video

# Example usage
mp3_file_path = "C:/Users/Kris/PycharmProjects/videoeditingscript124234/DENKATA - Podvodnica Demo (1).mp3"
video_file_path = "C:/Users/Kris/PycharmProjects/videoeditingscript124234/family.guy.s21e13.1080p.web.h264-cakes[eztv.re].mkv"
num_parts = 4

audio_parts = split_audio_into_parts(mp3_file_path, num_parts)
segments = split_video_into_segments(video_file_path, num_parts)
segments = insert_audio_into_segments(segments, audio_parts)
final_video = combine_segments(segments)
final_video.write_videofile("output.mp4", codec="libx264", audio_codec="aac")


    


    I tried entering most stuff into chatGPT and asking questions around forums but without sucess, so lets hope I can see my solution here

    


  • How do you run a ffmpeg command in Java, in MacOS, using a ProcessBuilder

    5 août 2020, par nottAbott

    I am writing a program in Java that uses ffmpeg to "snip" a video into several pieces and the stitch them back together again. I have everything working relatively smoothly in Windows, but I cannot get ffmpeg to work in Mac, or in Linux for that matter. I'm focusing on mac right now though. I thought that it might be a permissions problem, but when I run it with sudo I get an error that says (after typing in the password :

    


    sudo: ffmpeg: command not found


    


    when I run it without sudo I get :

    


    java.io.IOException: Cannot run program "ffmpeg": error=2, No such file or directory


    


    I think that it might be because the ffmpeg package, on the Mac machine, was downloaded with homebrew, and ffmpeg is stored in /usr/local/Cellar/ffmpeg instead of the default folder, wherever it may be. That may not be the problem though, because I deleted ffmpeg and re-downloaded it with homebrew. It may have been in its defaulter folder in my first tests as well. It would be great to figure this out. Most of my family uses Mac (not me) and I really want to share my work with them. That is why I chose to code this in Java. Oh, and I did try using the directory to the binary in the command. Here's the code :

    


        //snips out all the clips from the main video
    public void snip() throws IOException, InterruptedException {
        
        for(int i = 0; i < snippets.size(); i++) {
            //ffmpeg -i 20sec.mp4 -ss 0:0:1 -to 0:0:5 -c copy foobar.mp4
            String newFile = "foobar" + String.valueOf(i) + ".mp4";
            
            //THIS WORKS
            if(OS.isWindows()) {
                ProcessBuilder processBuilder = new ProcessBuilder("ffmpeg", "-i", videoName, "-ss",
                        snippets.get(i).getStartTime(), "-to", snippets.get(i).getEndTime(), newFile);
                            
                Process process = processBuilder.inheritIO().start();
                process.waitFor();
                System.out.println("Win Snip " + i + "\n");
            }
            
            else if (OS.isMac()) {
                //FFMPEG LOCATION: /usr/local/Cellar/ffmpeg
                //THE ERROR: sudo: ffmpeg: command not found
                //ERROR W/OUT SUDO: java.io.IOException: Cannot run program "ffmpeg": error=2, No such file or directory
                ProcessBuilder processBuilder = new ProcessBuilder("sudo", "-S", "ffmpeg", "-f", videoName, "-ss",
                        snippets.get(i).getStartTime(), "-to", snippets.get(i).getEndTime(), newFile);
                
                Process process = processBuilder.inheritIO().start();
                process.waitFor();
                System.out.println("Mac Snip " + i + "\n");
            }
            
            else if (OS.isUnix()) {
                System.out.println("Your operating system is not supported");
                //TODO
                //need to figure out if deb/red hat/whatever are different
            }
            
            else if (OS.isSolaris()) {
                System.out.println("Your operating system is not supported yet");
                //TODO probably won't do
            }
            
            else {
                 System.out.println("Your operating system is not supported");
            }
            //add to the list of files to be concat later
            filesToStitch.add(newFile);
            filesToDelete.add(newFile);
            
        }
        //System.out.println(stitchFiles);
    }