
Recherche avancée
Autres articles (105)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
L’utiliser, en parler, le critiquer
10 avril 2011La première attitude à adopter est d’en parler, soit directement avec les personnes impliquées dans son développement, soit autour de vous pour convaincre de nouvelles personnes à l’utiliser.
Plus la communauté sera nombreuse et plus les évolutions seront rapides ...
Une liste de discussion est disponible pour tout échange entre utilisateurs. -
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (12166)
-
Revision 62463 : On va éviter de casser la table des types de documents à l’upgrade, de ...
13 juin 2012, par kent1@… — LogOn va éviter de casser la table des types de documents à l’upgrade, de toute manière le plugin medias gère ces documents maintenant
On utilise la popin comme pour la modification des infos de doc pour éditer les id3 des fichiers sons
Améliorations du formulaire -
Revision 62463 : On va éviter de casser la table des types de documents à l’upgrade, de ...
13 juin 2012, par kent1@… — LogOn va éviter de casser la table des types de documents à l’upgrade, de toute manière le plugin medias gère ces documents maintenant
On utilise la popin comme pour la modification des infos de doc pour éditer les id3 des fichiers sons
Améliorations du formulaire -
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.