
Recherche avancée
Médias (1)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
Autres articles (111)
-
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...)
Sur d’autres sites (5825)
-
Using android FFMPEG library for limited video frames [duplicate]
5 septembre 2021, par Waris Ali RehmaniI have to show only 10 frames from the video, the below code is bringing all the frames of the video, is there any query set available in FFmpeg for a limited number of frames in android and display in video editing like WhatsApp.
A query in below like this is highly appreciated.


String[] complexCommand = "-y", "-i", yourRealPath, "-an", "-ss", "" + startMs / 1000, "-t", "" + (endMs - startMs) / 1000, dest.getAbsolutePath() ;


-
GPS information getting loss in video frames
1er octobre 2019, par Zaheer AbbasI have GoPro Hero6 black camera videos with GPS enabled. I want to get geotagged info of each frame, but when I convert video to frames using FFmPeg command "** ffmpeg -i GH012081.MP4 -vf fps=1 thumb%04d.jpg -hide_banner** " the GPS info got losses for each frame. How to retain GPS info in the frames ?
After this, I have to sync the specific frame into the video for 2 or 3 seconds after drawing some 2d objects ?
-
How to correctly encrypt the I-frames in video files ?
25 mai 2023, par BobI'm trying to encrypt only the I-frames of a video file so that the energy overhead is lessened compared to if I tried to encrypt the whole file. However, after encrypting what I thought were the I-frames, the video seems to play normally (except for the encrypted frames). I thought that the point of encrypting the I-frames was so that the other frames would be distorted, but that doesn't seem to be the case. I was wondering what seems to be wrong ? The file format is avi with codec MPEG-4 video (FMP4).


I used ffmpeg to identity the I frames of a certain video (named "video1") : "ffprobe -select_streams v -show_frames -of csv video1.avi > video_frame_info.csv". I got this table which seems to indicate that every 12th frame is an I-frame. I then used this python program to encrypt every 12th frame with chacha20 from the pycryptodome library :


from Crypto.Cipher import ChaCha20
from Crypto.Random import get_random_bytes
import cv2
import numpy as np

def read_frames(video_path):
 # Load the video file
 video = cv2.VideoCapture(video_path)

 # Initialize a list to hold frames
 frames = []

 # Loop until there are frames left in the video file
 while video.isOpened():
 ret, frame = video.read()
 if not ret:
 break

 frames.append(frame)

 video.release()

 return frames

def encrypt_iframes(frames, key):
 # Initialize the cipher
 cipher = ChaCha20.new(key=key)

 # Encrypt every 12th frame (considering the first frame as an I-frame)
 for i in range(0, len(frames), 12):
 frame = frames[i]
 # Flatten and bytes-encode the frame
 flat_frame = frame.flatten()
 bytes_frame = flat_frame.tobytes()

 # Encrypt the frame
 encrypted_frame = cipher.encrypt(bytes_frame)

 # Replace the original frame with the encrypted one
 frames[i] = np.frombuffer(encrypted_frame, dtype=flat_frame.dtype).reshape(frame.shape)

 return frames

def write_frames(frames, output_path):
 # Assume all frames have the same shape
 height, width, _ = frames[0].shape

 # Create a VideoWriter object
 out = cv2.VideoWriter(output_path, cv2.VideoWriter_fourcc(*'mpv4'), 30, (width, height))

 for frame in frames:
 out.write(frame)

 out.release()

def main():
 # Generate a random key
 key = get_random_bytes(32)

 # Read frames from video
 frames = read_frames('video1.avi')

 # Encrypt I-frames
 encrypted_frames = encrypt_iframes(frames, key)

 # Write encrypted frames to a new video file
 write_frames(encrypted_frames, 'reprise.avi')

if __name__ == "__main__":
 main()




When I play the video, every 12th frame there is just noise on the screen, which makes sense since it was encrypted. However, all the other frames seem to be completely normal, even thought they are P-frames and should depend on the I-frames. What am I doing wrong, and how can I make it so that it works as intended ?
Thanks in advance