
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (47)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Publier sur MédiaSpip
13 juin 2013Puis-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 -
Other interesting software
13 avril 2011, parWe 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 : (...)
Sur d’autres sites (9678)
-
bash script to handle 9000 lines of text by groups of 25
6 février 2023, par Robert DioI have an input file with 9095 lines of text. I need to take this list of filenames and use them as input to an ffmpeg command. I really would like to avoid running it all at once (line by line until end of file).


Is there a way in a bash script to take the first 25 lines, execute the ffmpeg command on them, then continue to the next 25 lines and execute the same command, until the end of the input file ?


Input file (example.txt) has list of 9095 filenames to be processed.


I have tried the following :


#!/bin/bash

while mapfile -n 25 convert < example.txt do
while read -r line || [[ -n "$line" ]]; do fn_out="w$line"; (/path/to/file/ffmpeg -report -nostdin -i /path/to/file/watermark.png -i /path/to/file/"$line" -filter_complex "scale2ref[a][b];[b][a]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2" /path/to/file/"$fn_out" -c:v libx265); done < $convert >> script.txt
done




This only gets me the first 25 files. How to account for all 9095 files in example.txt ?


Also, is there any way to "pause" the script in between each set of 25 filenames ? I am not familiar enough with mapfile and bash scripting to know how to handle this kind of iteration.


Basically, the output needs to be as follows :


- 

- Read first 25 lines of example.txt
- Run the ffmpeg command on those 25 files (some files are over 2GB. Will take time to do the ffmpeg command.
- Pause for about a minute or two. Let server rest/catch up/recover resources.
- Get the next 25 names from example.txt
- Run the ffmpeg conversion loop again in step 2
- Continue until EOF of example.txt














Any direction on this would be greatly appreciated !


Running CentOS 7 with bash 5.0.17.


-
First input link main timebase (1/15360) do not match the corresponding second input link xfade timebase (1/90000)
14 novembre 2023, par Rinocoders


I am new to ffmpeg and i am facing this error for more then 2 days.
This ffmpeg command :

!ffmpeg -i "{fromPath}" -i "{toPath}" -filter_complex "xfade=transition={chosenTransition}:duration={transitionDuration}:offset=-1.5" -c:v libx264 -crf 18 -preset veryfast "{outPath}"

I run that previous command 3 times in row where output of the previous command is input that is getting produced as 15360 timebase video i guess.

is giving me this error : "First input link main timebase (1/15360) do not match the corresponding second input link xfade timebase (1/90000)"


So when i merge two of my videos the output is video with (1/15360) timebase. Original videos has (1/90000) timebase.


Pls help what i wana archive is basicly multiple videos inside a folder called "clips" merge together using a random transition from xfade/ffmpeg.


On colab i tried all this ways :


!rm -rf chunks
!mkdir chunks
time.sleep(1)
folderPath = '/content/clips'
videoOutput = '/content/test.mp4'
transitionDuration = 6

videoFiles = [f"{folderPath}/{f}" for f in os.listdir(folderPath) if f.endswith('.mp4')]
random.shuffle(videoFiles)
fromPath = videoFiles[0]
toPath = ''
outPath = ''
transitions = ['fade', 'wipeup', 'slidedown', 'circleclose', 'radial' , 'hrslice', 'hblur', 'smoothleft', 'smoothright']

for videoIndex, videoName in enumerate(videoFiles):
 if videoIndex == 0:
 continue
 toPath = videoName
 chosenTransition = random.choice(transitions)
 print('chosenTransition', chosenTransition)
 clipDuration = int((imageio.get_reader(fromPath)).get_meta_data()['duration']) - transitionDuration
 # !echo -i /content/clips/clip0.mp4 -i /content/clips/clip1.mp4 -filter_complex xfade=transition={chosenTransition}:duration=3:offset={clipDuration} dissolveVideo.mp4

 if videoIndex == len(videoFiles) - 1:
 outPath = videoOutput
 else:
 outPath = f'/content/chunks/chunk{videoIndex}.mp4'
 time.sleep(2)
 
 # !echo -i "{fromPath}" -i "{toPath}" -filter_complex "[0:v]xfade=transition={chosenTransition}:duration=3:offset={clipDuration},settb=1/19000[v0];[0:a][1:a]acrossfade=d=3[aout]" -map "[v0]" -map "[aout]" -c:v libx264 -crf 18 -preset ultrafast "{outPath}"
 !ffmpeg -i "{fromPath}" -i "{toPath}" -filter_complex "xfade=transition={chosenTransition}:duration={transitionDuration}:offset=-1.5,settb=1/15360" -c:v libx264 -crf 18 -preset veryfast "{outPath}"
 # !ffmpeg -i "{fromPath}" -i "{toPath}" -filter_complex "[0:v]settb=1/15360,setpts=PTS-STARTPTS[v0];[1:v]settb=1/15360,setpts=PTS-STARTPTS[v1];[v0][v1]xfade=transition={chosenTransition}:duration={transitionDuration}:offset=-1.5[vout]" -map "[vout]" -c:v libx264 -crf 18 -preset ultrafast "{outPath}"
 # !ffmpeg -i "{fromPath}" -i "{toPath}" -filter_complex "[0]settb=AVTB [0v]; [1]settb=AVTB [1v]; [0v] [1v]xfade=transition={chosenTransition}:duration={transitionDuration}:offset=1" -c:v libx264 -crf 18 -preset ultrafast "{outPath}"
 # !ffmpeg -i "{fromPath}" -i "{toPath}" -filter_complex "[0:v]xfade=transition={chosenTransition}:duration=3:offset={clipDuration},settb=1/15360[v0];[0:a][1:a]acrossfade=d=3[aout]" -map "[v0]" -map "[aout]" -c:v libx264 -crf 18 -preset ultrafast "{outPath}"
 # !ffmpeg -y -progress .progressinfo.dat -i "{fromPath}" -i "{toPath}" -filter_complex "[0:v]settb=AVTB,setpts=PTS-STARTPTS[v0];[1:v]settb=AVTB,setpts=PTS-STARTPTS[v1];[v0][v1]xfade=transition={chosenTransition}:duration={transitionDuration}:offset={clipDuration}[vout];[0:a]asettb=AVTB,asetpts=PTS-STARTPTS[a0];[1:a]asettb=AVTB,asetpts=PTS-STARTPTS[a1];[a0][a1]acrossfade=d=3[aout]" -map "[vout]" -map "[aout]" -c:v libx264 -crf 18 -preset ultrafast "{outPath}"




-
How to keep personally identifiable information safe
23 janvier 2020, par Joselyn Khor