
Recherche avancée
Autres articles (56)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
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 ;
-
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
Sur d’autres sites (8165)
-
Python subprocess or os.system not working with ffmpeg
13 février 2024, par confusedI've been trying to get this darn programming run since last night and cannot seem to get anything to work. I want to first trim the video and then resize the video. I'm reading which video and what to give the final name from a text file, over 780 lines long, quite a few videos.


Thus far with every idea under the sun I have tried, subprocess and os.system, I can't get anything more than error statements or right now all I get is no file creation of any kind. How the heck do I get this to work correctly ?


import ffmpeg
import subprocess
import os

os.chdir('/home/Downloads/SRs/')
a = open('SRt.txt', 'r')
b = a.readlines()
a.close()
for c in range(0, len(b)-1):
 words = list(b[c].split(" "))
 d = len(words)
 e = words[d-1]
 f = b[c].replace(e, 'FR' + str(c) + '.mp4')
 words[d-1] = 'FR' + str(c) + '.mp4'
 print(f)
 subprocess.call(f, shell=True)
 subprocess.call([
 'ffmpeg',
 '-i',
 "'FR' + str(c) + '.mp4'",
 '-vf scale=320:240',
 words[d-1],
 ])



Here are some examples of what the original file would look like :


ffmpeg -i SR.mp4 -ss 00:00:00 -to 00:01:22 -c:v copy -a copy CPH.mp4
 ffmpeg -i SR.mp4 -ss 00:01:24 -to 00:02:58 -c:v copy -a copy CG.mp4
 ffmpeg -i SR.mp4 -ss 00:02:59 -to 00:05:41 -c:v copy -a copy CSGP.mp4



Nothing fancy just separating video in its own individual segments and then resaving it before resizing it.


I tried :


z=subprocess.call(f, shell=True, stdout=subprocess.PIPE)
print(z)



But all I get is '1'.


When I changed it to :


z=subprocess.call(f, shell=True, stderr=subprocess.PIPE)
print(z)



All I get is '1'.


Maybe I'm doing something wrong.


-
lavf : Remove codec_tag from dashenc and smoothstreamingenc
30 juin 2017, par Martin Storsjölavf : Remove codec_tag from dashenc and smoothstreamingenc
Skip the codec_tag altogether here, to let the user (try to) set
whichever codec/tag is preferred ; the individual chained muxer will
reject invalid codecs anyway.(cherry picked from commit 61f589e31e84ae02d7ac6837f30f19c437b1fc2e)
Signed-off-by : Derek Buitenhuis <derek.buitenhuis@gmail.com> -
How to losslessly compress a sequence of slowly-changing images into a video ?
26 juillet 2023, par Claude CI have a sequence of jpeg images captured like a timelapse, with the same dimension and changing slowly in order. I want to compress the size of the whole sequence while still able to recover each individual image with their raw pixel information unchanged.


I googled and found that a possible solution is to compress it into a video, which exploits the strong temporal correlation (inter-frame redundancy) between consecutive frames, as suggested here. I tried ffmpeg libx264 but none of the option combinations seem to preserve frame quality and compress total size at the same time (
-crf 0
keeps the quality but the size of the video is even larger than the input sequence).

So my questions is,


- 

- What is the correct way to losslessly compress a sequence of slowly-changing images ?




I can accept using softwares other than ffmpeg (as long as it is on windows or linux), doing color space conversion on raw images (if necessary). It is OK if a the compression is done without converting to videos. Thank you.