
Recherche avancée
Médias (21)
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Lights in the Sky
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Head Down
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (104)
-
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras. -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
Librairies et logiciels spécifiques aux médias
10 décembre 2010, parPour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)
Sur d’autres sites (7323)
-
Show progress bar of a ffmpeg video convertion
13 juin 2022, par stackexchange.com-upvm25mzI'm trying to print a progress bar while executing ffmpeg but I'm having trouble getting the total number of frames and the current frame being processed. The error I get is
AttributeError: 'NoneType' object has no attribute 'groups'
. I've copied the function from this program and for some reason it works there but not here, even though I haven't changed that part.



pattern_duration = re.compile(
 'duration[ \t\r]?:[ \t\r]?(.+?),[ \t\r]?start', re.IGNORECASE)
pattern_progress = re.compile('time=(.+?)[ \t\r]?bitrate', re.IGNORECASE)

def execute_ffmpeg(self, manager, cmd):
 proc = expect.spawn(cmd, encoding='utf-8')
 self.update_progress_bar(proc, manager)
 self.raise_ffmpeg_error(proc)

def update_progress_bar(self, proc, manager):
 total = self.get_total_frames(proc)
 cont = 0
 pbar = self.initialize_progress_bar(manager)
 try:
 proc.expect(pattern_duration)
 while True:
 progress = self.get_current_frame(proc)
 percent = progress / total * 100
 pbar.update(percent - cont)
 cont = percent
 except expect.EOF:
 pass
 finally:
 if pbar is not None:
 pbar.close()

def raise_ffmpeg_error(self, proc):
 proc.expect(expect.EOF)
 res = proc.before
 res += proc.read()
 exitstatus = proc.wait()
 if exitstatus:
 raise ffmpeg.Error('ffmpeg', '', res)

def initialize_progress_bar(self, manager):
 pbar = None
 pbar = manager.counter(
 total=100,
 desc=self.path.rsplit(os.path.sep, 1)[-1],
 unit='%',
 bar_format=BAR_FMT,
 counter_format=COUNTER_FMT,
 leave=False
 )
 return pbar

def get_total_frames(self, proc):
 return sum(map(lambda x: float(
 x[1])*60**x[0], enumerate(reversed(proc.match.groups()[0].strip().split(':')))))

def get_current_frame(self, proc):
 proc.expect(pattern_progress)
 return sum(map(lambda x: float(
 x[1])*60**x[0], enumerate(reversed(proc.match.groups()[0].strip().split(':')))))



-
How correctly show video with transparency in Qt with OpenCV + FFMpeg
11 avril 2022, par TheEnigmistI'm trying to show a video with transparency in a Qt6 application using OpenCV + FFMPEG.
Actually those are tool versions :


- 

- Win 11
- Qt 6.3.0
- OpenCV 4.5.5 (built with CMake)
- FFMPEG 2022-04-03-git-1291568c98-full_build-www.gyan.dev










I've used a base .mov video with transparency as test (link provided below).
First of all I've converted .mov video to .webm video (VP9) and I see in output text that alpha channel remains




ffmpeg -i '.\Retro Bars.mov' -c:v libvpx-vp9 -crf 30 -b:v 0 output.webm




Input #0, mov,mp4,m4a,3gp,3g2,mj2,
 ...
 Stream #0:0[0x1](eng): Video: qtrle (rle / 0x20656C72), argb(progressive),
 ...

Output #0, webm, 
 ...
 Stream #0:0(eng): Video: vp9, yuva420p(tv, progressive),
 ...



But when I show info of output file with ffmpeg it loses alpha channel :




ffmpeg -i .\output.webm




Input #0, matroska,webm,
 ...
 Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv, progressive),
 ...



If I open output.webm with OBS it is shown correctly without a background, as shown in picture :



If I try to open it with OpenCV + FFMPEG it shows a black background under bars, as shown in picture :



This is how I load video in Qt :


cv::VideoCapture capture;
capture.open(filename, cv::CAP_FFMPEG);
capture.set(cv::CAP_PROP_CONVERT_RGB, false); // try forcing load alpha channel
... //in a thread
while (capture.read(frame)) {
 qDebug() << "c" << frame.channels() << "t" << frame.type() << "d" << frame.depth(); // output: c 3 t 16 d 0
 cv::cvtColor(frame, frame, cv::COLOR_BGR2RGBA); //useless since no alpha channel is detected
 img = QImage(frame.data, frame.cols, frame.rows, QImage::Format_RGBA8888);
 emit processedImage(img); // to show image in a QLabel with QPixmap::fromImage(img)
}



I think the problem is when I load the video with OpenCV, it doens't detect alpha channel, since I can load correctly in other player (obs, html5, etc.)


What I'm wrong with all process to show this video in Qt with transparency ?


EDIT : Added dropbox link with test video + ffmpeg outputs :
sample items


-
avdevice/dshow : list_devices : show media type(s) per device
21 décembre 2021, par Diederick Niehorsteravdevice/dshow : list_devices : show media type(s) per device
the list_devices option of dshow didn't indicate whether a specific
device provides audio or video output. This patch iterates through all
media formats of all pins exposed by the device to see what types it
provides for capture, and prints this to the console for each device.
Importantly, this now allows to find devices that provide both audio and
video, and devices that provide neither.Signed-off-by : Diederick Niehorster <dcnieho@gmail.com>
Reviewed-by : Roger Pack <rogerdpack2@gmail.com>