
Recherche avancée
Autres articles (48)
-
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 ;
-
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 (3996)
-
PyQt6 6.7.0 - How to fix error : No QtMultimedia backends found
4 février, par Belleroph0NProblem on Windows 10 and Windows 11 using Anaconda.


Here is the full error message for PyQt6=6.7.0 :


No QtMultimedia backends found. Only QMediaDevices, QAudioDevice, QSoundEffect, QAudioSink, and QAudioSource are available.
Failed to initialize QMediaPlayer "Not available"
Failed to create QVideoSink "Not available"



Installed PyQt6 using a requirements file :


PyQt6
PyQt6-WebEngine
requests
pyserial
pynput



Here are a couple things I tried :


- 

- Reroll version back to PyQt6=6.6.1. This results in an error as well : ImportError : DLL load failed while importing QtGui : The specified procedure could not be found.
- I thought that missing ffmpeg might be the issue so I installed it, but the issue persists.
- Tried the setup on Ubuntu (WSL2) and the issue disappears, but there is just a black screen and nothing gets displayed in the widget. (EDIT : Got this up and running, the problem was with differences in file paths in linux vs windows.)








I am new to PyQt so any pointers will be helpful !


Edit : Here is generic code (taken from here) that gives the same error :


from PyQt6.QtGui import QIcon, QFont
from PyQt6.QtCore import QDir, Qt, QUrl, QSize
from PyQt6.QtMultimedia import QMediaPlayer
from PyQt6.QtMultimediaWidgets import QVideoWidget
from PyQt6.QtWidgets import (QApplication, QFileDialog, QHBoxLayout, QLabel, QStyleFactory,
 QPushButton, QSizePolicy, QSlider, QStyle, QVBoxLayout, QWidget, QStatusBar)


class VideoPlayer(QWidget):

 def __init__(self, parent=None):
 super(VideoPlayer, self).__init__(parent)

 self.mediaPlayer = QMediaPlayer()

 btnSize = QSize(16, 16)
 videoWidget = QVideoWidget()

 openButton = QPushButton("Open Video") 
 openButton.setToolTip("Open Video File")
 openButton.setStatusTip("Open Video File")
 openButton.setFixedHeight(24)
 openButton.setIconSize(btnSize)
 openButton.setFont(QFont("Noto Sans", 8))
 openButton.setIcon(QIcon.fromTheme("document-open", QIcon("D:/_Qt/img/open.png")))
 openButton.clicked.connect(self.abrir)

 self.playButton = QPushButton()
 self.playButton.setEnabled(False)
 self.playButton.setFixedHeight(24)
 self.playButton.setIconSize(btnSize)
 self.playButton.setIcon(self.style().standardIcon(QStyle.StandardPixmap.SP_MediaPlay))
 self.playButton.clicked.connect(self.play)

 self.positionSlider = QSlider(Qt.Orientation.Horizontal)
 self.positionSlider.setRange(0, 0)
 self.positionSlider.sliderMoved.connect(self.setPosition)

 self.statusBar = QStatusBar()
 self.statusBar.setFont(QFont("Noto Sans", 7))
 self.statusBar.setFixedHeight(14)

 controlLayout = QHBoxLayout()
 controlLayout.setContentsMargins(0, 0, 0, 0)
 controlLayout.addWidget(openButton)
 controlLayout.addWidget(self.playButton)
 controlLayout.addWidget(self.positionSlider)

 layout = QVBoxLayout()
 layout.addWidget(videoWidget)
 layout.addLayout(controlLayout)
 layout.addWidget(self.statusBar)

 self.setLayout(layout)

 #help(self.mediaPlayer)
 self.mediaPlayer.setVideoOutput(videoWidget)
 self.mediaPlayer.playbackStateChanged.connect(self.mediaStateChanged)
 self.mediaPlayer.positionChanged.connect(self.positionChanged)
 self.mediaPlayer.durationChanged.connect(self.durationChanged)
 self.mediaPlayer.errorChanged.connect(self.handleError)
 self.statusBar.showMessage("Ready")

 def abrir(self):
 fileName, _ = QFileDialog.getOpenFileName(self, "Select Media",
 ".", "Video Files (*.mp4 *.flv *.ts *.mts *.avi)")

 if fileName != '':
 self.mediaPlayer.setSource(QUrl.fromLocalFile(fileName))
 self.playButton.setEnabled(True)
 self.statusBar.showMessage(fileName)
 self.play()

 def play(self):
 if self.mediaPlayer.playbackState() == QMediaPlayer.PlaybackState.PlayingState:
 self.mediaPlayer.pause()
 else:
 self.mediaPlayer.play()

 def mediaStateChanged(self, state):
 if self.mediaPlayer.playbackState() == QMediaPlayer.PlaybackState.PlayingState:
 self.playButton.setIcon(
 self.style().standardIcon(QStyle.StandardPixmap.SP_MediaPause))
 else:
 self.playButton.setIcon(
 self.style().standardIcon(QStyle.StandardPixmap.SP_MediaPlay))

 def positionChanged(self, position):
 self.positionSlider.setValue(position)

 def durationChanged(self, duration):
 self.positionSlider.setRange(0, duration)

 def setPosition(self, position):
 self.mediaPlayer.setPosition(position)

 def handleError(self):
 self.playButton.setEnabled(False)
 self.statusBar.showMessage("Error: " + self.mediaPlayer.errorString())

if __name__ == '__main__':
 import sys
 app = QApplication(sys.argv)
 player = VideoPlayer()
 player.setWindowTitle("Player")
 player.resize(900, 600)
 player.show()
 sys.exit(app.exec())



The videos I want to play are in the same folder as this .py file.
The conda env (python 3.9.2) I am working on has the following packages :


certifi 2024.6.2
charset-normalizer 3.3.2
idna 3.7
pip 24.0
pynput 1.7.6
PyQt6 6.7.0
PyQt6-Qt6 6.7.1
PyQt6-sip 13.6.0
PyQt6-WebEngine 6.7.0
PyQt6-WebEngine-Qt6 6.7.1
PyQt6-WebEngineSubwheel-Qt6 6.7.1
pyserial 3.5
requests 2.31.0
setuptools 69.5.1
six 1.16.0
urllib3 2.2.1
wheel 0.43.0



PS : MacOS seems to have the same issue.


-
ffmpeg fast seek large MP4 over HTTP
28 juillet 2024, par GmanicusI'm attempting to download snapshots from a video provided by the U.S House of Representatives :


https://houseliveprod-f9h4cpb9dyb8gegg.a01.azurefd.net/east/2024-04-11T08-55-12_Download/video_3000000_1.mp4



I am using
fluent-ffmpeg
in Node to execute this command :

ffmpeg('https://houseliveprod-f9h4cpb9dyb8gegg.a01.azurefd.net/east/2024-04-11T08-55-12_Download/video_3000000_1.mp4')
 .inputOption(`-ss 03:33:33`)
 .outputOptions([
 '-vframes 1'
 ])
 .output('test.png')

// Effectively:
// ffmpeg -ss 03:33:33 -i -y -vframes 1 test.png



My intention is to fast-seek to the desired timestamp and take a snapshot over HTTP. However, when doing so, the performance is not great. A snapshot takes about 10s per 3hrs of video and seems to increase fairly linearly at that rate.


However, when using ffmpeg on the same video locally, it's super fast ! Sub-500ms regardless of the desired timestamp.


Is there some magic that could be done via ffmpeg options or perhaps some sort of technique with manual requests to get a snapshot at the desired segment of video more efficiently ?


-
Moviepy not updating FFmpeg Version after FFmpeg Install ?
31 mai 2024, par The_ Game12I've been toying around with MoviePy, and recently switched a project to a new computer at home to continue messing around with it. However, I tried running what I had previously written (which ran perfectly fine on the other computer) and I get this :


OSError: MoviePy error: failed to read the first frame of video file ./Gameplay/minecraft-
gameplay2.mp4. That might mean that the file is corrupted. That may also mean that you are using 
a deprecated version of FFMPEG. On Ubuntu/Debian for instance the version in the repos is 
deprecated. Please update to a recent version from the website.




After reading the error, I did as it instructed, and updated my FFmpeg :


$ ffmpeg
ffmpeg version N-115387-g8e27bd025f-20240525 Copyright (c) 2000-2024 the FFmpeg developers
 built with gcc 13.2.0 (crosstool-NG 1.26.0.65_ecc5e41)
 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux --enable-gpl --enable-version3 --disable-debug --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-openssl --enable-fontconfig --enable-libharfbuzz --enable-libvorbis --enable-opencl --enable-libpulse --enable-libvmaf --enable-libxcb --enable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --enable-libdvdread --enable-libdvdnav --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libaribcaption --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --disable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-libs='-ldl -lgomp' --extra-ldflags=-pthread --extra-ldexeflags=-pie --cc=x86_64-ffbuild-linux-gnu-gcc --cxx=x86_64-ffbuild-linux-gnu-g++ --ar=x86_64-ffbuild-linux-gnu-gcc-ar --ranlib=x86_64-ffbuild-linux-gnu-gcc-ranlib --nm=x86_64-ffbuild-linux-gnu-gcc-nm --extra-version=20240525
 libavutil 59. 20.100 / 59. 20.100
 libavcodec 61. 5.104 / 61. 5.104
 libavformat 61. 3.104 / 61. 3.104
 libavdevice 61. 2.100 / 61. 2.100
 libavfilter 10. 2.102 / 10. 2.102
 libswscale 8. 2.100 / 8. 2.100
 libswresample 5. 2.100 / 5. 2.100
 libpostproc 58. 2.100 / 58. 2.100
Universal media converter
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...



And I continued getting the same error. So I looked at what version my moviepy was using, and it was still 4.X. I read somewhere that your FFmpeg version is determined on the first use, which made sense, so I uninstalled and reinstalled, to get the same error.


I am honestly lost at this point, as I have the newest version of FFmpeg, but I still get this from moviepy :


>>> import moviepy
>>> print(moviepy.config.FFPMEG_BINARY)
ffmpeg : /home/<username>/.local/lib/python3.9/site-packages/imageio_ffmpeg/binaries/ffmpeg-linux64-v4.2.2
</username>


Any Ideas as to what I'm doing wrong ?


(Note : I'm using Crostini which I believe is using an Ubuntu or Ubuntu-Like shell)


Thanks :)