
Advanced search
Medias (1)
-
The pirate bay depuis la Belgique
1 April 2013, by
Updated: April 2013
Language: français
Type: Picture
Other articles (53)
-
Keeping control of your media in your hands
13 April 2011, byThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Les images
15 May 2013 -
Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur
8 February 2011, byLa visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
Configuration de la boite multimédia
Dès (...)
On other websites (7695)
-
Variable fps (frame per second) in cv2
17 October 2022, by SepideI use
cv2
for creating videos from different frames that I have. When I create the video, I cannot change the fps (frame per second). I want the video be slow at the beginning but fast towards the end, meaning small fps at the beginning but large ones towards the end. However, when I instantiatecv2.VideoWriter
I cannot change the fps anymore. What should I do?

Replicable code


import numpy as np
import cv2, os
import matplotlib

image_size = 200
def create_image_array(image_size):
 image_array = np.random.randn(image_size, image_size)
 row = np.random.randint(0, image_size)
 image_array[row, :] = 100
 return image_array

frame_numbers = 200
for i in range(frame_numbers):
 image_array = create_image_array(image_size)
 matplotlib.image.imsave(f'./shots/frame_{i:03d}.png', image_array)

def make_a_video(shots_folder, video_path):

 shots_folder = 'shots'
 fps = 25
 images = [img for img in os.listdir(shots_folder) if img.endswith(".png")]

 images = sorted(images)[:]
 frame = cv2.imread(os.path.join(shots_folder, images[0]))
 height, width, layers = frame.shape

 video = cv2.VideoWriter(video_path, cv2.VideoWriter_fourcc(*'mp4v'), fps, (width, height))

 for image in images:
 video.write(cv2.imread(os.path.join(shots_folder, image)))

 cv2.destroyAllWindows()
 video.release()

shots_folder = 'shots'
video_path = 'video.mp4' 
make_a_video(shots_folder, video_path)



-
Mac Terminal (Bash) batch program to get multimedia file info using ffmpeg
7 December 2013, by julesverneI have a Mac computer. Usually all my batch programming is done on my PC. So I tried to create what I assumed would be a simple equivalent using a Mac shell. Obviously as you all know that was foolish of me to think that. After 2 days of scowering the web I found the closest thing I could to what I was looking for. But no, this doesn't work either.
All I'd like to do is throw a multimedia file onto the script, and have the terminal give me the ffmpeg info output. In my searching I did find this
"$@"
which as far as I can tell is the windows bat equivalent of%*
. Meaning you can throw files on the script and the script refers to those files as variables which can be processed. So I believe what I want to do is possible.Again the code at the bottom is just to look through the current directory of all .mov files and run ffmpeg. It doesn't work. But.. if no one can help me figure out the actual thing I'd like to do then I'd settle with something like below that does actually work.
#!/bin/bash
FFMPEG=/Applications/ffmpeg
FIND=/usr/bin/find
FILES=$(${FIND} . -type f -iname "*.mov")
if [ "$FILES" == "" ]
then
echo "There are no *.mov file in $(pwd) directory"
exit 1
fi
for f in *.mov
do
$FFMPEG -i "$f"
doneIf someone can please help me figure this out I'd really appreciate it. Thank you in advance! Jules
I just found this solution from the "similar questions" sidebar, which is similar to the script above, so again, not completely what I wanted but.. didn't matter, didn't work for me. How to batch convert mp4 files to ogg with ffmpeg using a bash command or Ruby
-
wrap h.264 stream in mp.4 container and stream it with nodejs
30 March 2017, by idoshI have a stream of h.264 data from a remote webcam. If i save it to a file i’m able to play it in VLC (meaning that the data arrives intact).
The final goal is to turn this stream into a virtual webcam. After looking around I found manyCam as a possible solution - therefor i want to serve the h.264 data on a local IP in MP4 format.
Two questions:
first, I’m trying to wrap the h.264 with the mp4 container using ffmpeg (using fluent-ffmpeg npm library that exposes the ffmpeg API to Nodejs).
Everything works well when i’m handling static files (not streams). e.g.`
var ffmpeg = rquire('fluent-ffmpeg')
var readH264 = fs.createReadStream('./vid.h264')
var proc = ffmpeg(readH264).clone().toFormat('mp4').output('./vid.mp4').run()`
But when I’m trying to feed a stream - it throws an error "ffmpeg exited with code 1: could not write header for output file.."
`var wrtieMp4 = fs.createWriteStream('./vid.mp4')
var proc = ffmpeg(readH264).clone().toFormat('mp4').output(wrtieMp4).run()`How can i add it a header..?
Second, I’m a bit confused about the transport layer (rtp, rtsp, etc.). After creating the mp4 stream - wouldn’t it be sufficient to serve the stream with MIME type video/mp4? It seem to work fine with static file.
`let read = fs.createReadStream('./vid.mp4')
let server = http.createServer(function (req, res) {
res.writeHead(200, {'Content-type': "video/mp4"})
read.pipe(res)
}).listen(9000)`