
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (103)
-
D’autres logiciels intéressants
12 avril 2011, parOn 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, parMediaSPIP 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, parUnlike 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 user9114146I 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 KhanI 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>
 
 <dependency>
 <groupid>org.springframework.boot</groupid>
 <artifactid>spring-boot-starter-data-jpa</artifactid>
 </dependency>
 <dependency>
 <groupid>com.google.oauth-client</groupid>
 <artifactid>google-oauth-client</artifactid>
 <version>1.32.1</version>
 </dependency>
 <dependency>
 <groupid>com.google.http-client</groupid>
 <artifactid>google-http-client</artifactid>
 <version>1.32.1</version>
 </dependency>
 
 <dependency>
 <groupid>org.springframework.boot</groupid>
 <artifactid>spring-boot-starter-oauth2-client</artifactid>
 </dependency>
 <dependency>
 <groupid>org.springframework.boot</groupid>
 <artifactid>spring-boot-starter-web</artifactid>
 </dependency>
 <dependency>
 <groupid>org.springframework.boot</groupid>
 <artifactid>spring-boot-starter-test</artifactid>
 <scope>test</scope>
 </dependency>
 
 <dependency>
 <groupid>org.bytedeco</groupid>
 <artifactid>javacv</artifactid>
 <version>1.5.9</version>
 </dependency>
 <dependency>
 <groupid>org.springframework.boot</groupid>
 <artifactid>spring-boot-starter-validation</artifactid>
 </dependency>
 <dependency>
 <groupid>org.apache.commons</groupid>
 <artifactid>commons-csv</artifactid>
 <version>1.10.0</version>
 </dependency>
 <dependency>
 <groupid>io.jsonwebtoken</groupid>
 <artifactid>jjwt</artifactid>
 <version>0.9.1</version>
 </dependency>
 
 <dependency>
 <groupid>mysql</groupid>
 <artifactid>mysql-connector-java</artifactid>
 </dependency>
 <dependency>
 <groupid>org.springframework.boot</groupid>
 <artifactid>spring-boot-devtools</artifactid>
 </dependency>
 <dependency>
 <groupid>org.projectlombok</groupid>
 <artifactid>lombok</artifactid>
 </dependency>
 <dependency>
 <groupid>org.springframework.boot</groupid>
 <artifactid>spring-boot-configuration-processor</artifactid>
 <optional>true</optional>
 </dependency>
 <dependency>
 <groupid>com.amazonaws</groupid>
 <artifactid>aws-java-sdk-s3</artifactid>
 <version>1.12.550</version>
 </dependency>
 
 <dependency>
 <groupid>commons-io</groupid>
 <artifactid>commons-io</artifactid>
 <version>2.6</version>
 </dependency>
 
 
 
 <dependency>
 <groupid>com.github.ozlerhakan</groupid>
 <artifactid>poiji</artifactid>
 <version>3.0.3</version>
 </dependency>
 <dependency>
 <groupid>org.springframework.cloud</groupid>
 <artifactid>spring-cloud-starter-aws</artifactid>
 <version>2.2.6.RELEASE</version>
 </dependency>
 <dependency>
 <groupid>org.springframework.cloud</groupid>
 <artifactid>spring-cloud-starter-aws-messaging</artifactid>
 <version>2.2.6.RELEASE</version>
 </dependency>
 </dependencies>```



-
ffmpeg - concatenate large set of video files - file names
5 avril 2023, par bunnyisblackI'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.


The problem is to automate it ?


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


(echo file 'first file.mp4' & echo file 'second file.mp4' )>list.txt
ffmpeg -safe 0 -f concat -i list.txt -c copy output.mp4



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


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


\450_01_videoName.mp4
\450_02_videoNameFoo.mp4
\450_04_videoNameMoo.mp4
\451_01_videoNameRoo.mp4
\451_02_videoNameHoo.mp4



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.


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


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.


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


Cheers.


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


------UPDATE


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


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


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.


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



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


There has to be a simple for loop solution.


ANSWER - SOLVED


I've used Armali's solution.


h:
cd "h:\video directory"

SETLOCAL ENABLEDELAYEDEXPANSION
set number=999
for %%f in (???_*.mp4) do (
 set name=%%f
 set before=!number!
 set number=!name:~0,3!
 if !number! gtr !before! call :concat
 echo file !name! >>list.txt
)

:concat
 ffmpeg -safe 0 -f concat -i list.txt -c copy %before%Video.mp4
 del list.txt



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.