
Recherche avancée
Médias (1)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
Autres articles (82)
-
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 -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users.
Sur d’autres sites (7324)
-
ValueError When Reading Video Frame
27 juin 2016, par BassieI am following this article, from where I got this code :
FFMPEG_BIN ="Z:\ffmpeg\bin\ffmpeg.exe"
import subprocess as sp
command = [ FFMPEG_BIN,
'-i', 'video.mp4',
'-f', 'image2pipe',
'-pix_fmt', 'rgb24',
'-vcodec', 'rawvideo', '-']
pipe = sp.Popen(command, stdout = sp.PIPE, bufsize=10**8, shell=True)
import numpy
# read 420*360*3 bytes (= 1 frame)
raw_image = pipe.stdout.read(420*360*3)
# transform the byte read into a numpy array
image = numpy.fromstring(raw_image, dtype='uint8')
image = image.reshape((360,420,3))
# throw away the data in the pipe's buffer.
pipe.stdout.flush()When I run it I see this error :
Traceback (most recent call last):
File "Z:\py\ffmtest\test.py", line 16, in <module>
image = image.reshape((360,420,3))
ValueError: total size of new array must be unchanged
</module>Where line 16 is
image = image.reshape((360,420,3))
. I think this error is produced bynumpy
, but probably because I am calculating the values for my video incorrectly.Output :
raw_image
: b’ ’len(raw_image)
: 0image
: [ ]len(image)
: 0I am not sure whether I am passing in the correct values for
read
orreshape
functions - any help at all is much appreciated ! -
avformat/format : Stop reading data at EOF during probing
10 mai 2023, par Michael Niedermayer -
Not reading the first character of every second line in a file [duplicate]
13 janvier 2024, par Monki MajikIn a BASH script (latest Xubuntu) this successfully reads and prints every line in mp4.txt


ls *.mp4 > mp4.txt
while read F ; do
 echo $F
 echo ${F/mp4}mkv
# ffmpeg -i "$F" -map 0 -c copy "${F/mp4}mkv"
done < ./mp4.txt



Uncommenting the ffmpeg line causes the first character from every other line in mp4.txt to not be in F.


I'm expecting every file line to be read consistently.


I've tried Bash : Special characters lost when reading file