
Recherche avancée
Autres articles (111)
-
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Les notifications de la ferme
1er décembre 2010, parAfin d’assurer une gestion correcte de la ferme, il est nécessaire de notifier plusieurs choses lors d’actions spécifiques à la fois à l’utilisateur mais également à l’ensemble des administrateurs de la ferme.
Les notifications de changement de statut
Lors d’un changement de statut d’une instance, l’ensemble des administrateurs de la ferme doivent être notifiés de cette modification ainsi que l’utilisateur administrateur de l’instance.
À la demande d’un canal
Passage au statut "publie"
Passage au (...) -
Initialisation de MediaSPIP (préconfiguration)
20 février 2010, parLors de l’installation de MediaSPIP, celui-ci est préconfiguré pour les usages les plus fréquents.
Cette préconfiguration est réalisée par un plugin activé par défaut et non désactivable appelé MediaSPIP Init.
Ce plugin sert à préconfigurer de manière correcte chaque instance de MediaSPIP. Il doit donc être placé dans le dossier plugins-dist/ du site ou de la ferme pour être installé par défaut avant de pouvoir utiliser le site.
Dans un premier temps il active ou désactive des options de SPIP qui ne le (...)
Sur d’autres sites (7370)
-
Unable to connect pyqt5 ui and Python file
7 janvier 2021, par Education 4FunI followed some tutorials and its working for them but not for me the below code is the exact copy of one of their code giving same errors even when try to integrate int my application


I followed some tutorials and its working for them but not for me the below code is the exact copy of one of their code giving same errors even when try to integrate int my application


Python code


import sys
from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QDialog, QApplication, QFileDialog
from PyQt5.uic import loadUi

class MainWindow(QDialog):
 def __init__(self):
 super(MainWindow,self).__init__()
 loadUi("lolol.ui",self)
 self.browse.clicked.connect(self.browsefiles)

 def browsefiles(self):
 fname=QFileDialog.getOpenFileName(self, 'Open file', 'D:\Videos', 'Images (*.png, *.xmp *.jpg)')
 self.filename.setText(fname[0])

app=QApplication(sys.argv)
mainwindow=MainWindow()
widget=QtWidgets.QStackedWidget()
widget.addWidget(mainwindow)
widget.setFixedWidth(400)
widget.setFixedHeight(300)
widget.show()
sys.exit(app.exec_())



lolol.ui file


<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>Dialog</class>
 <widget class="QDialog">
 <property>
 <rect>
 <x>0</x>
 <y>0</y>
 <width>400</width>
 <height>300</height>
 </rect>
 </property>
 <property>
 <string>Dialog</string>
 </property>
 <widget class="QLineEdit">
 <property>
 <rect>
 <x>20</x>
 <y>130</y>
 <width>211</width>
 <height>22</height>
 </rect>
 </property>
 </widget>
 <widget class="QPushButton">
 <property>
 <rect>
 <x>260</x>
 <y>130</y>
 <width>93</width>
 <height>28</height>
 </rect>
 </property>
 <property>
 <string>Browse</string>
 </property>
 </widget>
 </widget>
 <resources></resources>
 <connections></connections>
</ui>



Error


Traceback (most recent call last):
 File "c:/Users/thota/OneDrive/Desktop/VET/lolii.py", line 17, in <module>
 mainwindow=MainWindow()
 File "c:/Users/thota/OneDrive/Desktop/VET/lolii.py", line 9, in __init__
 loadUi("lolol.ui",self)
 File "C:\Users\thota\AppData\Local\Programs\Python\Python37\lib\site-packages\PyQt5\uic\__init__.py", line 238, in loadUi
 return DynamicUILoader(package).loadUi(uifile, baseinstance, resource_suffix)
 File "C:\Users\thota\AppData\Local\Programs\Python\Python37\lib\site-packages\PyQt5\uic\Loader\loader.py", line 66, in loadUi
 return self.parse(filename, resource_suffix)
 File "C:\Users\thota\AppData\Local\Programs\Python\Python37\lib\site-packages\PyQt5\uic\uiparser.py", line 1020, in parse
 document = parse(filename)
 File "C:\Users\thota\AppData\Local\Programs\Python\Python37\lib\xml\etree\ElementTree.py", line 1197, in parse
 tree.parse(source, parser)
 File "C:\Users\thota\AppData\Local\Programs\Python\Python37\lib\xml\etree\ElementTree.py", line 587, in parse
 source = open(source, "rb")
</module>




-
Could not convert video to audio using ffmpeg or moviepy
5 avril 2021, par Parv JainI want to convert a mp4 video file to mp3/wav audio using python ffmpeg or moviepy.
when I run this command


ffmpeg -i vid.mp4 -ar 44100 -vn audio.wav



It returns


Output file #0 does not contain any stream



Here is the full Log


ffmpeg version N-55702-g920046a Copyright (c) 2000-2013 the FFmpeg developers
 built on Aug 21 2013 18:10:00 with gcc 4.7.3 (GCC)
 configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
 libavutil 52. 42.100 / 52. 42.100
 libavcodec 55. 29.100 / 55. 29.100
 libavformat 55. 14.101 / 55. 14.101
 libavdevice 55. 3.100 / 55. 3.100
 libavfilter 3. 82.100 / 3. 82.100
 libswscale 2. 5.100 / 2. 5.100
 libswresample 0. 17.103 / 0. 17.103
 libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'vid.mp4':
 Metadata:
 major_brand : dash
 minor_version : 0
 compatible_brands: iso6avc1mp41
 creation_time : 2021-03-12 14:13:58
 Duration: 00:07:28.87, start: 0.000000, bitrate: 1199 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 1197 kb/s, 23.98 tbr, 24k tbn, 47.95 tbc
 Metadata:
 creation_time : 2021-03-12 14:13:58
 handler_name : ISO Media file produced by Google Inc.
Output #0, wav, to 'audio.wav':
 Metadata:
 major_brand : dash
 minor_version : 0
 compatible_brands: iso6avc1mp41
Output file #0 does not contain any stream



I searched the internet for this but could not find a solution


Please tell if there is a way to do this with ffmpeg or another way


I also tried to use moviepy but it was not successful.


Here is moviepy log


Traceback (most recent call last):
 File "path\to\file\script.py", line 3, in <module>
 clip.audio.write_audiofile(r'audio.mp3')
AttributeError: 'NoneType' object has no attribute 'write_audiofile'
</module>


this is my code for moviepy


import moviepy.editor as mp
clip = mp.VideoFileClip('vid.mp4')
clip.audio.write_audiofile(r'audio.mp3')



-
Concatenating two.mov files results in identical sized file
2 février 2021, par CErI try to concatenate two video files a.mov & b.mov on Win 10 using ffmpeg with the following command :


ffmpeg -safe 0 -f concat -i list.txt -vcodec copy -acodec copy c.mov


There are no errors displayed however when I open the resulting file c it has the same length as file a with the last frame appering to be a frame of b.
File a is a longer video, file b are credits (couple of seconds) made with ffmpeg from an image file.
Both files have the same aspect ratio, size and framerate.


I try to concatenate two video files a.mov & b.mov on Win 10 using ffmpeg with the following command :


ffmpeg -safe 0 -f concat -i list.txt -vcodec copy -acodec copy c.mov


There are no errors displayed however when I open the resulting file c it has the same length as file a with the last frame appering to be a frame of b.
File a is a longer video, file b are credits (couple of seconds) made with ffmpeg from an image file.
Both files have the same aspect ratio, size and framerate.


Here the log :


ffmpeg -n -i a.mov -i b.mov 
 ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 9.3.1 (GCC) 20200523 configuration: --enable-gpl --enable-version3 --enable-sdl2
 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt libavutil 56. 31.100 / 56. 31.100 libavcodec 58. 54.100 /
 58. 54.100 libavformat 58. 29.100 / 58. 29.100 libavdevice 58. 8.100 / 58. 8.100 libavfilter 7. 57.100 / 7. 57.100 libswscale 5. 5.100 / 5. 5.100 libswresample 3. 5.100 / 
 3. 5.100 libpostproc 55. 5.100 / 55. 5.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'a.mov': Metadata:
 major_brand : qt
 minor_version : 512
 compatible_brands: qt
 encoder : Lavf58.62.100 Duration: 00:31:50.04, start: 0.000000, bitrate: 5309 kb/s
 Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 4151 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
 Metadata:
 handler_name : Core Media Video
 encoder : Lavc58.54.100 libx264
 Stream #0:1: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32 (24 bit), 1152 kb/s (default)
 Metadata:
 handler_name : SoundHandler Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'b.mov': Metadata:
 major_brand : qt
 minor_version : 512
 compatible_brands: qt
 encoder : Lavf58.29.100 Duration: 00:00:10.01, start: 0.000000, bitrate: 67 kb/s
 Stream #1:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 64 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc (default)
 Metadata:
 handler_name : VideoHandler
 encoder : Lavc58.54.100 libx264



Thank you.