
Recherche avancée
Autres articles (50)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (9937)
-
delay audio stream in ffmpeg python
2 janvier 2023, par snailoftheyearobjective :


I have separate audio and video streams. Audio stream length varies but video length is same around 60 seconds. For the first 34 seconds the audio should be empty and after 34 seconds i should play the audio according to its length and then the video should end. Generally audio length is around 15-20 seconds. I am trying to do this in ffmpeg python, i have already seen some answers on stackoverflow using itsoffset but they all were on using cmd and i can't get my head around it.
Code i am working


import ffmpeg
import textwrap

readAloudText = "The medical center issued a statement saying that patient care was not compromised while their data was unavailable. Still, it's unsettling to hear that a hospital is shut out of parts of its own computer systems and unable to communicate electronically."

wrapper = textwrap.TextWrapper(width=150) 
word_list = wrapper.wrap(text=readAloudText) 
caption_new = ''
for ii in word_list[:-1]:
 caption_new = caption_new + ii + '\n'
caption_new += word_list[-1]

in_video = ffmpeg.input('readaloud.mov')
in_audio = ffmpeg.input('readaloudaudio.wav')

(
 ffmpeg
 .drawtext(in_video, text=caption_new, fontcolor='black', fontsize='24', start_number=0, x=50, y= 600)
 .output(in_audio ,'output.mp4')
 .run()
)



Thanks in advance


-
How to quit pexpect launched ffmpeg with key q pressed
25 février 2014, par Shumani used pexpect to call ffmpeg which is a lengthy process. it took half an hour, how can i detect user has pressed q key to stop it ? just like when you press q when using ffmpeg command line tool
the ffmpeg command line is
ffmpeg -y -i url -c copy -absf aac_adtstoasc out.mp4
the last line of ffmpeg output is
...
Stream mapping:
Stream #0:1 -> #0:0 (copy)
Stream #0:2 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 84 fps= 77 q=-1.0 Lsize= 184626kB time=00:00:06.96 bitrate=217120.3kbits/sthe code i have now is
reo = re.compile("""\S+\s+(?P\d+) # frame
\s\S+\s+(?P<fps>\d+) # fps
\sq=(?P<q>\S+) # q
\s\S+\s+(?P<size>\S+) # size
\stime=(?P<time>\S+) # time
\sbitrate=(?P<bitrate>[\d\.]+) # bitrate
""", re.X)
durationReo = ('(?<=Duration:\s)\S+(?=,)')
cpl = thread.compile_pattern_list([
pexpect.EOF,
reo,
durationReo
])
while True:
i = thread.expect_list(cpl, timeout=None)
if i == 0: # EOF
print "the sub process exited"
break
elif i == 1:
frame_number = thread.match.group(0)
print frame_number
print reo.search(frame_number).groups()
# thread.close
elif i == 2:
durationLine = thread.match.group(0)
print 'Duration:', durationLine
# print "something :",thread.match.group(1)
pass
</bitrate></time></size></q></fps>with this code i can already get the frame info and duration info, the ultimate goal is to create a textual progress bar with another python progressbar module. but with the ability to send the 'q' pressed signal to ffmpeg child process.
-
lavc/vvc : Fix check whether QG is in first tile col
19 mars 2024, par Frank Plowmanlavc/vvc : Fix check whether QG is in first tile col
The second part of this condition is intended to check whether the
current quantisation group is in the first CTU column of the current
tile. The issue is that ctb_to_col_bd gives the x-ordinate of the first
column of the current tile *in CTUs*, while xQg gives the x-ordinate of
the quantisation group *in samples*. Rectify this by shifting xQg by
ctb_log2_size to get xQg in CTUs before comparing.Fixes FFVVC issues #201 and #203.