
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 (8)
-
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
D’autres logiciels intéressants
12 avril 2011, parOn ne revendique pas d’être les seuls à faire ce que l’on fait ... et on ne revendique surtout pas d’être les meilleurs non plus ... Ce que l’on fait, on essaie juste de le faire bien, et de mieux en mieux...
La liste suivante correspond à des logiciels qui tendent peu ou prou à faire comme MediaSPIP ou que MediaSPIP tente peu ou prou à faire pareil, peu importe ...
On ne les connais pas, on ne les a pas essayé, mais vous pouvez peut être y jeter un coup d’oeil.
Videopress
Site Internet : (...) -
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)
Sur d’autres sites (3689)
-
FFmpeg get frame rate
22 septembre 2021, par zhin dinsI have several images and I am reproducing them in 78.7ms, I am creating like the 80s video effect. But, I am unable to find the correct ms, and this images with the original videos are unsync.


I dumped the video to images using this command => ffmpeg -i *.mp4 the80effect/img-%d.jpg And now, I have 48622 frames. The video FPS is 24


So, 48622/24 = 2025 +- I cannot use 2025ms since those images will load very slow. And the and the approximate value is 78.7ms per frame/image


How can I find the correct value ? The video duration in seconds is 2026. I have tried all math to find this but I'm failing. How many images (one frame) per msCould you help me ? Thank you.


-
NumPy array of a video changes from the original after writing into the same video
29 mars 2021, par RashiqI have a video (
test.mkv
) that I have converted into a 4D NumPy array - (frame, height, width, color_channel). I have even managed to convert that array back into the same video (test_2.mkv
) without altering anything. However, after reading this new,test_2.mkv
, back into a new NumPy array, the array of the first video is different from the second video's array i.e. their hashes don't match and thenumpy.array_equal()
function returns false. I have tried using both python-ffmpeg and scikit-video but cannot get the arrays to match.

Python-ffmpeg attempt :


import ffmpeg
import numpy as np
import hashlib

file_name = 'test.mkv'

# Get video dimensions and framerate
probe = ffmpeg.probe(file_name)
video_stream = next((stream for stream in probe['streams'] if stream['codec_type'] == 'video'), None)
width = int(video_stream['width'])
height = int(video_stream['height'])
frame_rate = video_stream['avg_frame_rate']

# Read video into buffer
out, error = (
 ffmpeg
 .input(file_name, threads=120)
 .output("pipe:", format='rawvideo', pix_fmt='rgb24')
 .run(capture_stdout=True)
)

# Convert video buffer to array
video = (
 np
 .frombuffer(out, np.uint8)
 .reshape([-1, height, width, 3])
)

# Convert array to buffer
video_buffer = (
 np.ndarray
 .flatten(video)
 .tobytes()
)

# Write buffer back into a video
process = (
 ffmpeg
 .input('pipe:', format='rawvideo', s='{}x{}'.format(width, height))
 .output("test_2.mkv", r=frame_rate)
 .overwrite_output()
 .run_async(pipe_stdin=True)
)
process.communicate(input=video_buffer)

# Read the newly written video
out_2, error = (
 ffmpeg
 .input("test_2.mkv", threads=40)
 .output("pipe:", format='rawvideo', pix_fmt='rgb24')
 .run(capture_stdout=True)
)

# Convert new video into array
video_2 = (
 np
 .frombuffer(out_2, np.uint8)
 .reshape([-1, height, width, 3])
)

# Video dimesions change
print(f'{video.shape} vs {video_2.shape}') # (844, 1080, 608, 3) vs (2025, 1080, 608, 3)
print(f'{np.array_equal(video, video_2)}') # False

# Hashes don't match
print(hashlib.sha256(bytes(video_2)).digest()) # b'\x88\x00\xc8\x0ed\x84!\x01\x9e\x08 \xd0U\x9a(\x02\x0b-\xeeA\xecU\xf7\xad0xa\x9e\\\xbck\xc3'
print(hashlib.sha256(bytes(video)).digest()) # b'\x9d\xc1\x07xh\x1b\x04I\xed\x906\xe57\xba\xf3\xf1k\x08\xfa\xf1\xfaM\x9a\xcf\xa9\t8\xf0\xc9\t\xa9\xb7'



Scikit-video attempt :


import skvideo.io as sk
import numpy as np

video_data = sk.vread('test.mkv')

sk.vwrite('test_2_ski.mkv', video_data)

video_data_2 = sk.vread('test_2_ski.mkv')

# Dimensions match but...
print(video_data.shape) # (844, 1080, 608, 3)
print(video_data_2.shape) # (844, 1080, 608, 3)

# ...array elements don't
print(np.array_equal(video_data, video_data_2)) # False

# Hashes don't match either
print(hashlib.sha256(bytes(video_2)).digest()) # b'\x8b?]\x8epD:\xd9B\x14\xc7\xba\xect\x15G\xfaRP\xde\xad&EC\x15\xc3\x07\n{a[\x80'
print(hashlib.sha256(bytes(video)).digest()) # b'\x9d\xc1\x07xh\x1b\x04I\xed\x906\xe57\xba\xf3\xf1k\x08\xfa\xf1\xfaM\x9a\xcf\xa9\t8\xf0\xc9\t\xa9\xb7'



I don't understand where I'm going wrong and both the respective documentations do not highlight how to do this particular task. Any help is appreciated. Thank you.


-
dashenc : check pts to prevent division by zero error
30 janvier 2020, par Alfred E. Heggestaddashenc : check pts to prevent division by zero error
this usecase will cause a division by zero trap :
1. dashenc has received one frame
2. os->max_pts and os->start_pts have same value
3. delta between max_pts and start_pts is 0
4. av_rescale_q(0, x, y) returns 0
5. this value is used as denominator in division
6. Bang ! -> segfaultthis fix checks that max_pts > start_pts.
the fix has been tested and works.Signed-off-by : Alfred E. Heggestad <alfred.heggestad@gmail.com>
Reviewed-by : Jeyapal, Karthick <kjeyapal@akamai.com>
Signed-off-by : James Almer <jamrial@gmail.com>