
Recherche avancée
Médias (91)
-
Spoon - Revenge !
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
My Morning Jacket - One Big Holiday
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Zap Mama - Wadidyusay ?
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
David Byrne - My Fair Lady
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Beastie Boys - Now Get Busy
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Granite de l’Aber Ildut
9 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (54)
-
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...) -
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community. -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
Sur d’autres sites (4528)
-
Python UnicodeEncodeError : 'charmap' codec can't encode when using GEOPY
23 février 2021, par Tony RoczzI have been fiddling with python geopy and I tried the basic commands given in the documentation. But I am getting the UnicodeEncodeError when trying the
raw
command(to geolocate a query to an address and coordinates)


print(location.raw)




Error
UnicodeEncodeError: 'charmap' codec can't encode character '\xa9' in position 83: character maps to <undefined></undefined>



Then I tried the other way around (To find the address corresponding to a set of coordinates)



print(location.address) 




I am getting the same error
UnicodeEncodeError: 'charmap' codec can't encode character '\u0101' in position 10: character maps to <undefined></undefined>



I tried
print((location.address).encode("utf-8"))
, now am not getting any error but the output printed is like thisb'NH39, Mirz\xc4\x81pur



and when using
print((location.raw).encode("utf-8"))
I am getting error


AttributeError: 'dict' object has no attribute 'encode'




Can anyone tell me what is going on here and what I should do to get a proper output ?



Edit :(After being marked as duplicate)



Based on the solution given in this problem I am reporting on how it does not solve my problem



What I wanted to know is why do I get the UnicodeEncodeError when trying out the basic sample codings given in the documentation and it did answer for that.



If I want to use it an application how do I solve the error and I cannot have the application running on separate IDE or send the output to a external file since my application will function based on the output from geopy, I want the application to run in the terminal as my other applications do.


-
OpenCV Encoding to H264 changing original RGB pixel values for gray images
13 janvier 2020, par CristoJVI have the following issue :
I’m creating a uniform gray color video (for testing) using OpenCV VideoWriter. The output video will reproduce a constant image where all the pixels must have the same value x (25, 51, 76,... and so on).
When I generate the video using MJPG Encoder :vw = cv2.VideoWriter('./videos/input/gray1.mp4',
cv2.VideoWriter_fourcc(*'MJPG'),
fps,(resolution[1],resolution[0]))and read the output using the VideoCapture class, everything just works fine. I got a frame array with all pixel values set to (25,51,76 and so on).
However when I generate the video using HEV1 (H.265) or also H264 :vw = cv2.VideoWriter('./videos/input/gray1.mp4',
cv2.VideoWriter_fourcc(*'HEV1'),
fps,(resolution[1],resolution[0]))I run into the following issue. The frame I got in BGR format follows the next configuration :
- The blue channel value is the expected value (x) minus 4 (25-4=21, 51-4=47, 76-4=72, and so on).
- The green channel is the expected value (x) minus 1 (25-1=24, 51-1=50, 76-1=75).
- The red channel is the expected value (x) minus 3 (25-3=22, 51-3=48, 76-3=73).
Notice that the value is reduced with a constant value of 4,1,3, independently of the pixel value (so there is a constant effect).
What I could explain is a pixel value dependable feature, instead of a fixed one.
What is worse is that if I choose to generate a video with frames consisting in every color (pixel values [255 0 0],[0 255 0] and [0 0 255]) I get the corresponding outputs values ([251 0 0],[0 254 0] and [0 0 252])
I though that this relation was related to the grayscale Y value, where :Y = 76/256 * RED + 150/256 * GREEN + 29/256 * BLUE
But this coefficients are not related with the output obtained. Maybe the problem is the reading with VideoCapture ?
EDIT :
In case that I want to have the same output value for the pixels (Ej : [10,10,10] experimentally I have to create a img where the red and blue channel has the green channel value plus 2 :value = 10
img = np.zeros((resolution[0],resolution[1],3),dtype=np.uint8)+value
img[:,:,2]=img[:,:,2]+2
img[:,:,1]=img[:,:,1]+0
img[:,:,0]=img[:,:,0]+2Anyone has experience this issue ? It is related to the encoding process or just that OpenCV treats the image differently, prior encoding, depending on the fourcc parameter value ?
-
FFmpeg add caption to top of video like memes
25 juin 2018, par Praveen TamilI’m trying to add a top section to a video like we do for image memes. I’m using drawtext option for that but the text is wrapped in output video.
Let’s say I have a video and I need to add the caption like this to the whole video. How can i achieve this ?
I use below command for above result
ffmpeg -ss 20 -i D:\21-03-2018\15271618235b06a3df9d5cb.mp4 -filter_complex "[0:v]pad=iw:ih+50:0:50:color=white, drawtext=text='Meme Top Text will go here but it\\\\\'s a long text with multi line option. Line 1 text \n line 2 text \n line 3 text':fix_bounds=true:fontfile=Arial.ttf:fontsize=30:fontcolor=black:x=(w-tw)/2:y=(50-th)/2" -vframes 1 D:\21-03-2018\output.jpg