Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect if video has no audio in C++, preferable using Qt Phonon

Tags:

c++

qt

audio

I am creating a video player if Phonon and Qt. everything is working fine, but when I have a video in my playlist that does not have audio I wish to play another audio. how can I do that? I mean, how can I detect that the video has no audio?

EDIT: By no audio I meant "no audio channel"

like image 808
fredcrs Avatar asked Nov 19 '25 04:11

fredcrs


1 Answers

Qt 5 might help you out. Check out Phonon::Gstreamer::MediaObject. The API is similar to the ordinary MediaObject, but with some additional functions. The one you want is audioAvailable().

like image 200
Anthony Avatar answered Nov 20 '25 16:11

Anthony



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!