
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 (19)
-
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 -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
MediaSPIP Init et Diogène : types de publications de MediaSPIP
11 novembre 2010, parÀ l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...)
Sur d’autres sites (6027)
-
Convert multible files with threading ffmpeg in Python
21 mars 2020, par FlorianI’m trying to convert mp3 files to m4a. The files are in different folders like MainFolder(folder1, folder2,...)
It works already but is very slow because it is converting file by file.
import os
import sys
path = "/Users/flo/Desktop/test"
for root, dir, files in os.walk(path):
dir.sort()
files.sort()
for file in files:
if file.find('.mp3') != -1:
os.system('ffmpeg -i ' +'"' +root +'/' +file +'" ' +'-c:v copy -c:a libfdk_aac -b:a 300k ' +'"' +root +'/' +file[:-4] +'.m4b' +'"')Now I would like to implement multitasking.
import os
import sys
import threading
import queue
path = "/Users/flo/Desktop/test"
def convert(file):
if file.find('.mp3') != -1:
os.system('ffmpeg -i ' +'"' +root +'/' +file +'" ' +'-c:v copy -c:a libfdk_aac -b:a 300k ' +'"' +root +'/' +file[:-4] +'.m4b' +'"')
for root, dir, files in os.walk(path):
dir.sort()
files.sort()
q = queue.Queue
threads = [threading.Thread(target=convert(file)) for file in files]
for t in threads:
t.start()
for file in files:
q.put(file)
for file in files:
q.put('stop')
q.join()
for t in threads:
t.join()But I got the error message :
File "/var/folders/r6/z5f_jcf139b8fh2n8m4lznlm0000gn/T/atom_script_tempfiles/30127c90-6b13-11ea-af8a-432a34b059ac", line 31
threads = [threading.Thread(target=convert(file)) for file in files]
^
IndentationError: unexpected indent
[Finished in 0.028s] -
FFMPEG Batch Copy Metadata from "Folder1File1.mp3" to "Folder2File1.mp3" in different folders
27 février 2020, par VektorzI have two separate files in separate folders with the same name and I would like to transfer the metadata from the file in "folder1" to "folder2".
Then I would like to add a whole bunch of files fitting this same format and batch transfer all of the metadata information.From a stack exchange thread I’ve tried :
"The following script will loop through the the files in one directory, find corresponding files in a second directory and then combine these two files into a third output directory
dir1=FIRST DIRECTORY
dir2=SECOND DIRECTORY
output=OUTPUT DIRECTORY
for file in $(ls $dir1); do
ffmpeg -i "$dir1/$file" -i "$dir2/$file" -map 1 -c copy \
# copies all global metadata from in0.mkv to out.mkv
-map_metadata 0 \
# copies video stream metadata from in0.mkv to out.mkv
-map_metadata:s:v 0:s:v \
# copies audio stream metadata from in0.mkv to out.mkv
-map_metadata:s:a 0:s:a \
"$outdir/$file"
done"But for the life of me I cannot get this to work properly and it is a bit overkill. He continues on saying :
If you want to make something reuseable you could put this in a script with the following header (remove the assignment for dir1, dir2 and output in the script above). And then call it as script.sh dir1 dir2 outdir
#!/bin/bash
set -x errexit # exit immediately on error
dir1="$1"
dir2="$2"
output="$3"And I am totally lost. Can someone please help me to get this to work and walk me through it a bit easier as I’m fairly inexperienced with code/FFMPEG.
Thank you.
-
How to change mjpeg to yuyv422 from a webcam to a v4l2loopback ?
3 janvier 2020, par Dev NullBackstory : One livestreaming site I use isn’t smart enough to detect the capabilities of my webcam (Logitech Brio, 4k), and instead just uses the default frames per second settings, which is 5fps.
(full solution walk-through in the answer)
The best solution I could think of (besides changing livestream providers) was to create a loopback virtual webcam using v4l2loopback that I could force to have the exact settings I wanted to use on that livestream site.
For the brio, the higher frame rates come with mjpeg, not the default yuyv.
Problem 1 :
I could easily read mjpeg, but unfortunately kept banging my head against the wall because v4l2loopback evidently only wanted yuyv.
I tried things like :
ffmpeg -f v4l2 \
-input_format mjpeg \
-framerate 30 \
-video_size 1280x720 \
-i /dev/video0 \
-vcodec copy \
-f v4l2 /dev/video6and
ffmpeg -f v4l2 \
-input_format mjpeg \
-framerate 30 \
-video_size 1280x720 \
-i /dev/video0 \
-vcodec yuyv422 \ # this line changed (even tried "copy")
-f v4l2 /dev/video6But they wouldn’t work. I got errors like :
Unknown V4L2 pixel format equivalent for yuvj422p
and
...deprecated pixel format used, make sure you did set range correctly...
...V4L2 output device supports only a single raw video stream...
Eventually I got this to work :
ffmpeg -f v4l2 \
-input_format mjpeg \
-framerate 30 \
-video_size 1280x720 \
-i /dev/video0 \
-pix_fmt yuyv422 \ # The winning entry
-f v4l2 /dev/video6Problem 2
The next problem was getting chrome to see the virtual webcam. It worked correctly with guvcview, and on firefox I could use webcam testing sites and it would pick the virtual camera up without a problem.
Turns out google, in it’s overly-protective nature (while it’s siphoning off all our data, btw), doesn’t want to use webcams that can be read and written to.
So when starting v4l2loopback you have to tell it to announce that it’s "read only" to consumers like chrome.
Here’s the exact modprobe I use that works :
sudo modprobe v4l2loopback devices=1 exclusive_caps=1