
Recherche avancée
Médias (1)
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
Autres articles (71)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
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
Sur d’autres sites (7045)
-
convert a normal video to youtube short
28 mai 2022, par Un1xCr3whello i have videos with width of 1920px and height of 1080 and i wanna crop it at the center and create a youtube short with it


iam using youtube dl wrap node js library
here is my code example


var ffmpeg = require("fluent-ffmpeg");
const fs = require("fs");
let rawdata = fs.readFileSync("./json-files/small.json");
let clips = JSON.parse(rawdata);

function convertIt(fileName) {
 return new Promise((resolve, reject) => {
 ffmpeg(`./media-new/${fileName}`)
 .size("480x640")
 .aspect("9:16")
 .autopad()
 .videoBitrate("4000k")
 .on("end", function () {
 console.log("file has been converted succesfully");
 resolve("foo");
 })
 .on("error", function (err) {
 console.log("an error happened: " + err.message);
 reject(err);
 })
 // save to file
 .save(`./lib/${fileName}`);
 });
}

async function convertToShorts() {
 for (const iterator of clips) {
 await convertIt(`${iterator.id}.mp4`);
 }
}

convertToShorts();



-
youtube-dl doesn't see ffmpeg in the executable
30 novembre 2019, par Михаил МуратовI am writing a program to download music and videos via youtube-dl in python. Next, I pack the script into an executable file via pyinstaller.
The problem is that youtube-dl (in the executable) doesn’t see ffmpeg and ffprobe, even though I add them to the spec file.
As far as I know youtube-dl has the
ffmpeg_location
parameter, but that’s only in the console version. Maybe it is also for python ? But I didn’t find any information about it.How do I solve the problem ?
command to create executable :
pyinstaller --upx-dir=c:\users\exe-builder c:\users\exe-builder\youtubedownloader\main.spec
.spec file :
# -*- mode: python -*
block_cipher = None
a = Analysis(['C:\\Users\\Exe-Builder\\YoutubeDownloader\\main.py'],
pathex=['C:\\Users\\Exe-Builder\\YoutubeDownloader'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
a.binaries += [('ffmpeg.exe','C:\\Users\\Exe-Builder\\YoutubeDownloader\\ffmpeg.exe', "Binary"),
('ffprobe.exe','C:\\Users\\Exe-Builder\\YoutubeDownloader\\ffprobe.exe', "Binary")]
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='MediaDownloader',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=['vcruntime140.dll'],
runtime_tmpdir=None,
console=True)very small example :
import youtube_dl
url = 'https://www.youtube.com/watch?v=MIk55C1s0ns'
outtmpl = '\\%(title)s.%(ext)s'
ydl_opts = {'format': 'bestaudio/best',
'outtmpl': outtmpl,
'postprocessors': [{'key': 'FFmpegExtractAudio',
'preferredcodec': 'mp3',
'preferredquality': '128'}]}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
info_dict = ydl.extract_info(url, download=True)error message :
youtube_dl.utils.DownloadError: ERROR: ffprobe/avprobe and ffmpeg/avconv not found. Please install one.
-
PiCamera stream to youtube with ffmpeg and capture image every second
9 octobre 2020, par MisterGrayI'm sending a livestream with a Python script on a Raspberry Pi 4 to Youtube with ffmpeg.


Additionally I want to check the stream for movements. Therefore I want to compare two frames with each other. Since this is relatively computationally intensive, I wanted to limit myself to "only" compare single frames every second.


The camera.capture() command, however, seems to take very long, so the stream hangs again and again.


What is the best way to get a raw frame during the stream ?


Is there a better alternative to detect movements while creating a stream with ffmpeg ?


#!/usr/bin/env python3
import subprocess
from picamera.array import PiRGBArray
from picamera import PiCamera
import time
import cv2
import numpy as np

YOUTUBE = 'rtmp://a.rtmp.youtube.com/live2/'
KEY = 'MyYoutubeKey'
stream_cmd = 'ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv ' + YOUTUBE + KEY

avg = None
stream_pipe = subprocess.Popen(stream_cmd, shell=True, stdin=subprocess.PIPE)
resolution = (1280,720)
with PiCamera(resolution = resolution) as camera:

 rawCapture = PiRGBArray(camera, size = resolution)

 camera.framerate = 25
 camera.vflip = True
 camera.hflip = True
 camera.start_recording(stream_pipe.stdin, format='h264', bitrate = 6000000)
 while True:
 camera.wait_recording(1)

 # this command takes a long time to finish
 frame = camera.capture(stream_pipe.stdin, 'rgb')

 """
 further calculations
 """

 rawCapture.truncate(0)

 camera.stop_recording()
 stream_pipe.stdin.close()
 stream_pipe.wait()