Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (103)

  • D’autres logiciels intéressants

    12 avril 2011, par

    On ne revendique pas d’être les seuls à faire ce que l’on fait ... et on ne revendique surtout pas d’être les meilleurs non plus ... Ce que l’on fait, on essaie juste de le faire bien, et de mieux en mieux...
    La liste suivante correspond à des logiciels qui tendent peu ou prou à faire comme MediaSPIP ou que MediaSPIP tente peu ou prou à faire pareil, peu importe ...
    On ne les connais pas, on ne les a pas essayé, mais vous pouvez peut être y jeter un coup d’oeil.
    Videopress
    Site Internet : (...)

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

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (5939)

  • How can I sync the frames of multiple videos from a multi-camera capture system using FFMPEG

    9 février 2023, par user9114146

    I have a multi-camera capture setup with 2 canon cameras. Each of these cameras have a tentacle sync e timecode generator connected to them.

    


    After a video capture with these 2 cameras, the generated timecode (SMPTE format) is stored in the video files metadata.

    


    It looks like this 00:00:53;30

    


    Is there a bash script that uses FFmpeg to trim the start time of the video that started earlier (based on timecode) to match the other and then trim the end time of the video that ended last to match the one that ended first ?

    


    The two trimmed output videos should be synced based on the timecode and have the same duration.

    


    So far, my bash script looks like this :

    


    file1="A001C002_220101EB_CANON.MXF"
file2="A001C002_220101US_CANON.MXF"

# Get the SMPTE timecodes of the two files
timecode1=$(ffmpeg -i "$file1" 2>&1 | sed -n 's/timecode.*: \(.*\)/\1/p')
timecode2=$(ffmpeg -i "$file2" 2>&1 | sed -n 's/timecode.*: \(.*\)/\1/p')

# Convert the SMPTE timecode to start time in seconds
start_time_1=$(echo "$timecode1" | awk -F ':' '{print 3600*$1 + 60*$2 + $3}')
start_time_2=$(echo "$timecode2" | awk -F ':' '{print 3600*$1 + 60*$2 + $3}')

# Trim the start of the video with the earlier start timecode so that both videos have the same start time
if [ "$start_time_1" -lt "$start_time_2" ]; then
  ffmpeg -i "$file1" -ss "$start_time_2" -c:v libx264 -crf 18 -preset veryfast trimmed_file1.mp4
  ffmpeg -i "$file2" -c:v libx264 -crf 18 -preset veryfast trimmed_file2.mp4
else
  ffmpeg -i "$file2" -ss "$start_time_1" -c:v libx264 -crf 18 -preset veryfast trimmed_file2.mp4
  ffmpeg -i "$file1" -c:v libx264 -crf 18 -preset veryfast trimmed_file1.mp4
fi

# Get the duration of both files
duration_1=$(ffmpeg -i trimmed_file1.mp4 2>&1 | grep "Duration" | cut -d ' ' -f 4 | sed s/,//)
duration_2=$(ffmpeg -i trimmed_file2.mp4 2>&1 | grep "Duration" | cut -d ' ' -f 4 | sed s/,//)

# Convert the duration to seconds
duration_1_secs=$(echo $duration_1 | awk -F: '{ print ($1 * 3600) + ($2 * 60) + $3 }')
duration_2_secs=$(echo $duration_2 | awk -F: '{ print ($1 * 3600) + ($2 * 60) + $3 }')

# Trim the end time of the video that ended last to match the one that ended first
if [ "$duration_1_secs" -gt "$duration_2_secs" ]; then
  echo "Trimming end time of file1 to match file2"
  ffmpeg -i trimmed_file1.mp4 -t "$duration_2" -c:v libx264 -c:a aac trimmed_file1.mp4
else
  echo "Trimming end time of file2 to match file1"
  ffmpeg -i trimmed_file2.mp4 -t "$duration_1" -c:v libx264 -c:a aac trimmed_file2.mp4
fi


    


    But this does not make the videos have matching frames.

    


    Thanks !

    


  • Process vide files to take screen grabs in java spring boot

    10 octobre 2023, par Haleema Khan

    I am using JavaCV library with ffmpeg bindings to process video files and taking screen grabs at specific frames.
Adding JavaCV library dependency to my spring project increases the size of my jar file from around 90Mb > 1+ Gb.
This is a big issue becuase my project is deployed on AWS elastic beanstalk that accepts a max size of 500 Mb for a jar file.

    


    Need help to resolve this issue with the jar file or else any other alternate library that could do this.

    


    What I tried : I have removed all accept the abosultely necessary dependencies in my project to reduce the jar size.
I have also tried to find alternate solutions but couldnt get anything.
My pom file looks like

    


    <dependencies>&#xA;        &#xA;        <dependency>&#xA;            <groupid>org.springframework.boot</groupid>&#xA;            <artifactid>spring-boot-starter-data-jpa</artifactid>&#xA;        </dependency>&#xA;        <dependency>&#xA;            <groupid>com.google.oauth-client</groupid>&#xA;            <artifactid>google-oauth-client</artifactid>&#xA;            <version>1.32.1</version>&#xA;        </dependency>&#xA;        <dependency>&#xA;            <groupid>com.google.http-client</groupid>&#xA;            <artifactid>google-http-client</artifactid>&#xA;            <version>1.32.1</version>&#xA;        </dependency>&#xA;        &#xA;        <dependency>&#xA;            <groupid>org.springframework.boot</groupid>&#xA;            <artifactid>spring-boot-starter-oauth2-client</artifactid>&#xA;        </dependency>&#xA;        <dependency>&#xA;            <groupid>org.springframework.boot</groupid>&#xA;            <artifactid>spring-boot-starter-web</artifactid>&#xA;        </dependency>&#xA;        <dependency>&#xA;            <groupid>org.springframework.boot</groupid>&#xA;            <artifactid>spring-boot-starter-test</artifactid>&#xA;            <scope>test</scope>&#xA;        </dependency>&#xA;        &#xA;        <dependency>&#xA;            <groupid>org.bytedeco</groupid>&#xA;            <artifactid>javacv</artifactid>&#xA;            <version>1.5.9</version>&#xA;        </dependency>&#xA;        <dependency>&#xA;            <groupid>org.springframework.boot</groupid>&#xA;            <artifactid>spring-boot-starter-validation</artifactid>&#xA;        </dependency>&#xA;        <dependency>&#xA;            <groupid>org.apache.commons</groupid>&#xA;            <artifactid>commons-csv</artifactid>&#xA;            <version>1.10.0</version>&#xA;        </dependency>&#xA;        <dependency>&#xA;            <groupid>io.jsonwebtoken</groupid>&#xA;            <artifactid>jjwt</artifactid>&#xA;            <version>0.9.1</version>&#xA;        </dependency>&#xA;        &#xA;        <dependency>&#xA;            <groupid>mysql</groupid>&#xA;            <artifactid>mysql-connector-java</artifactid>&#xA;        </dependency>&#xA;        <dependency>&#xA;            <groupid>org.springframework.boot</groupid>&#xA;            <artifactid>spring-boot-devtools</artifactid>&#xA;        </dependency>&#xA;        <dependency>&#xA;            <groupid>org.projectlombok</groupid>&#xA;            <artifactid>lombok</artifactid>&#xA;        </dependency>&#xA;        <dependency>&#xA;            <groupid>org.springframework.boot</groupid>&#xA;            <artifactid>spring-boot-configuration-processor</artifactid>&#xA;            <optional>true</optional>&#xA;        </dependency>&#xA;        <dependency>&#xA;            <groupid>com.amazonaws</groupid>&#xA;            <artifactid>aws-java-sdk-s3</artifactid>&#xA;            <version>1.12.550</version>&#xA;        </dependency>&#xA;        &#xA;        <dependency>&#xA;            <groupid>commons-io</groupid>&#xA;            <artifactid>commons-io</artifactid>&#xA;            <version>2.6</version>&#xA;        </dependency>&#xA;        &#xA;        &#xA;        &#xA;        <dependency>&#xA;            <groupid>com.github.ozlerhakan</groupid>&#xA;            <artifactid>poiji</artifactid>&#xA;            <version>3.0.3</version>&#xA;        </dependency>&#xA;        <dependency>&#xA;            <groupid>org.springframework.cloud</groupid>&#xA;            <artifactid>spring-cloud-starter-aws</artifactid>&#xA;            <version>2.2.6.RELEASE</version>&#xA;        </dependency>&#xA;        <dependency>&#xA;            <groupid>org.springframework.cloud</groupid>&#xA;            <artifactid>spring-cloud-starter-aws-messaging</artifactid>&#xA;            <version>2.2.6.RELEASE</version>&#xA;        </dependency>&#xA;    </dependencies>```&#xA;

    &#xA;

  • ffmpeg - concatenate large set of video files - file names

    5 avril 2023, par bunnyisblack

    I'm trying to concatenate multiple video files. They all use the same codec and frame rate. Anyway concatenation isn't a problem. I've done it before.

    &#xA;

    The problem is to automate it ?

    &#xA;

    The answer here shows method 2 to be used in windows to concatenate files.&#xA;It's really easy :

    &#xA;

    (echo file &#x27;first file.mp4&#x27; &amp; echo file &#x27;second file.mp4&#x27; )>list.txt&#xA;ffmpeg -safe 0 -f concat -i list.txt -c copy output.mp4&#xA;

    &#xA;

    First, we make a list of video files (by manually tying them out). Second, we execute.

    &#xA;

    The problem is that I have multiple video files located in a single directory. The video files are named similar to this :

    &#xA;

    \450_01_videoName.mp4&#xA;\450_02_videoNameFoo.mp4&#xA;\450_04_videoNameMoo.mp4&#xA;\451_01_videoNameRoo.mp4&#xA;\451_02_videoNameHoo.mp4&#xA;

    &#xA;

    Now look at the above list and imagine that it's 200 lines big in a single folder. I'm trying to concatenate video 450 into 1, then video 451 into 1 file, etc.

    &#xA;

    I'm trying to automate this process with a good thousand video files.

    &#xA;

    I can do it semi manually. Use cmd to create a list of file and folder path. But then I would manually, file by file, have to copy and paste it to create that list.txt.

    &#xA;

    Is there a way to automate this ? I've done this manually with 20 video files and it was painful (but better then using a stand alone software, as all the videos were done in a batch after all was set up).

    &#xA;

    Cheers.

    &#xA;

    I've done the process semi manually. It worked, but took more time that it needs to take.

    &#xA;

    ------UPDATE

    &#xA;

    This is how I tackled the problem. It was slow and painful.

    &#xA;

    Firslty, I used cmd "dir /b > file.txt" to extract all the names of video files in that directory.

    &#xA;

    Then I painfully wrote the BAT file manually (for videos up to 500) for each video I wanted to merge. I used a few notepad++ shortcuts, for example, replacing the number '45' with 'echo file 45', this ensured I didn't need to type 'echo file' manually for every line. Then I also copy-pasted manually for every line '>>list.txt'. I painfully had to write out the output file name 50 different times.

    &#xA;

    h:&#xA;cd "h:\video directory"&#xA;echo file 450_01_video.mp4 > list.txt&#xA;echo file 450_02_videoMoo.mp4 >> list.txt&#xA;echo file 450_03_videoFoo.mp4 >> list.txt&#xA;echo file 450_04_videoLoo.mp4 >> list.txt&#xA;ffmpeg -safe 0 -f concat -i list.txt -c copy 450Video.mp4&#xA;echo file 451_01_video.mp4 > list.txt&#xA;echo file 451_02_videoMoo.mp4 >> list.txt&#xA;ffmpeg -safe 0 -f concat -i list.txt -c copy 451Video.mp4&#xA;

    &#xA;

    Now imagine a line for every single video file that I had to do manually.

    &#xA;

    There has to be a simple for loop solution.

    &#xA;

    ANSWER - SOLVED

    &#xA;

    I've used Armali's solution.

    &#xA;

    h:&#xA;cd "h:\video directory"&#xA;&#xA;SETLOCAL ENABLEDELAYEDEXPANSION&#xA;set number=999&#xA;for %%f in (???_*.mp4) do (&#xA;    set name=%%f&#xA;    set before=!number!&#xA;    set number=!name:~0,3!&#xA;    if !number! gtr !before! call :concat&#xA;    echo file !name! >>list.txt&#xA;)&#xA;&#xA;:concat&#xA;    ffmpeg -safe 0 -f concat -i list.txt -c copy %before%Video.mp4&#xA;    del list.txt&#xA;

    &#xA;

    The output video files were named 412Video.mp4. I used the dir /b file.txt command to extract the list of original files. I then copied them into excel, delimited them and used the tricks to extract the number, name, and remove duplicates etc. I then combined each record with output video as a ren command. E.g. ren 412video.mp4 412.name.location.mp4. I copied that into cmd for a fast rename.

    &#xA;