
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (71)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
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 ) (...)
Sur d’autres sites (11510)
-
Windows - FFmpeg - How to map a jpg file to video stream 0:0 and include only audio stream 0:2 and not stream 0:1 and 0:2 together
21 juin 2020, par slyfox1186I am trying to write a batch script that begins by extracting a thumbnail "Cover.jpg" from an mkv video. My end goal is to have this script recursively loop a folder full of videos to encode them all in one go.



:: create cover art jpg
for %%G in (*.mkv) do (
%FF% -hide_banner -ss 30 -y -i "%%G" -vframes 1 -an Cover.jpg
)




Then I am trying to encode the 4K mkv video that I got the jpg thumbnail from to 1920x1080 resolution instead of it's native 4K to make it easier to play back on my home plex server.



I have surround sound 6 channel speaker system so I want to take audio stream 0:2 which is Dolby DTS 6 channel and save some HDD space by converting it to
-c:a ac3 -b:a 640k -ac 6
.


I have gotten stuck because I can achieve everything I want except I keep encoding 2 of the 4 audio streams available in the end. I only want to keep 1 audio stream to maximize my space savings.



Here is the entire script so far.



@echo off
setlocal enabledelayedexpansion
prompt $g
color 0a

pushd "%~dp0"

set FF=C:\MAB\local64\bin-video\ffmpeg.exe
set TITLE=MOVIETITLE

:: create cover art jpg file
for %%G in (*.mkv) do (
%FF% -hide_banner -ss 30 -y -i "%%G" -vframes 1 -an Cover.jpg
)

:: run ffmpeg x265
for %%I in (*.mkv) do (
set fname="%%~nxI"
set fout="%%~nI-temp.mkv"
call :runff !fname! !fout!
del /s /q *.jpg
pause
goto:eof
)

:runff
%FF% -ss 0 ^
-y ^
-i "%~1" ^
-attach "Cover.jpg" ^
-map_metadata 0 ^
-map_chapters 0 ^
-metadata title="%TITLE%" ^
-map 0:0 -metadata:s:v:0 language=eng ^
-map 0:2 -metadata:s:a:0 language=eng -metadata:s:a:0 title="Surround 5.1 (DTS)" ^
-map 0:3 -metadata:s:s:0 language=eng -metadata:s:s:0 title="English" -metadata:s:t:0 filename="Cover.jpg" -metadata:s:t:0 mimetype="image/jpeg" ^
-c:v libx265 -preset medium ^
-x265-params crf=18:qcomp=0.8:aq-mode=1:aq_strength=1.0:qg-size=16:psy-rd=0.7:psy-rdoq=5.0:rdoq-level=1:merange=44 ^
-c:a ac3 -b:a 640k -ac 6 ^
-t 3 ^
"%~2"
exit /b




Here are the output logs.
https://pastebin.com/hVMy3VJW



You can see towards the bottom that it is encoding both audio streams.



Any ideas guys ?


-
How to remove "wrting library" from an MP3 file using ffmpeg ?
3 septembre 2022, par aveceuxI tried to remove the "writing library" entry from some of my mp3 files with ffmpeg, and this is the command I used :



ffmpeg -i input.mp3 -map_metadata -1 -c copy output.mp3




The command removed all the other tags, but the "writing library" still remained intact.



I've also tried other mp3 tag editing tools, but none of them did the job.



Here's the mediainfo of an example mp3 file :



Format : MPEG Audio
File size : 32.1 MiB
Duration : 1 h 9 min
Overall bit rate mode : Variable
Overall bit rate : 64.0 kb/s
Writing library : LAMEUUULAME3.91
Cover : Yes
Cover MIME : image/jpeg

Audio
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Format settings : Joint stereo / MS Stereo
Duration : 1 h 9 min
Bit rate mode : Variable
Bit rate : 64.0 kb/s
Channel(s) : 2 channels
Sampling rate : 44.1 kHz
Frame rate : 38.281 FPS (1152 SPF)
Compression mode : Lossy
Stream size : 31.9 MiB (100%)
Writing library : LAMEUUULAME3.91




Any help would be greatly appreciated. Thank you.


-
How to use Python (For example, ffmpeg or moviePy) to split large video to display on multiple screen [on hold]
27 juillet 2019, par Chen ClarenceI am trying to find resources to split a very long (1080*15360) video into 8 1080p videos of the same time length. Is there anything that could achieve this, or even better allows control over each pixel(use a function to cover part of my video with a black circle). Right now I have to brute force it, such as the following, but I’m sure there are much more efficient methods. Thanks in advance !
cap=cv2.VideoCapture('sample.avi')
#inputs & check for error
numberOfScreens=8
screenArrangement=(1,8)
if (numberOfScreens!=(screenArrangement[0]*screenArrangement[1])):
raise ValueError('The screen arrangement does not match the number of scrrens')
exit(0)
currentFrame=0
originalFrames=[]
while(True):
#reading frames
ret,frame=cap.read()
if not ret:
break
height, width, layers = frame.shape
unitHeight=(int)(height/screenArrangement[0]) #reduce this to outside loop
unitWidth=(int)(width/screenArrangement[1])
#cutting frames into desired size
for i in range(screenArrangement[0]):
for j in range(screenArrangement[1]):
try:
if not os.path.exists('Screen'+str(i*screenArrangement[0]+j+1)):
os.makedirs('Screen'+str(i*screenArrangement[0]+j+1))
print('creating directory '+'Screen'+str(i*screenArrangement[0]+j+1))
except OSError:
print ("Error Creating Directory")
name='./Screen'+str(i*screenArrangement[0]+j+1)+'/frame'+str(currentFrame)+'.png'
cropImg = frame[(i*unitHeight):((i+1)*unitHeight), (j*unitWidth):((j+1)*unitWidth)]
print('creating'+name)
#saving cropeed frames
cv2.imwrite(name, cropImg,[cv2.IMWRITE_PNG_COMPRESSION, 0])
currentFrame+=1
Frames=currentFrame
#setting up the writer object
fourcc = cv2.VideoWriter_fourcc(*'XVID')
writer=cv2.VideoWriter('Screen1.avi', fourcc, 30, (unitWidth, unitHeight), True)
#write the video
for i in range(Frames):
img=cv2.imread('./Screen1/frame'+str(i)+'.png')
writer.write(img)
writer.release()
cap.release()
cv2.destroyAllWindows()