Getting native video file framerate & muting alsasink
Nicolas Dufresne
nicolas.dufresne at gmail.com
Tue Mar 15 13:20:00 UTC 2016
Le mardi 15 mars 2016 à 01:12 +0100, Gottfried Haider a écrit :
> Hello,
>
> I am working on integrating current GStreamer into Processing
> (Java-land). There are two things I am currently struggling with -
> any
> advice would be much appreciated!
>
>
> Is there a straightforward way to get the native framerate of a
> video-file, which is playing via playbin? I found a code snippet
> online that looked for a double named "framerate" in the caps, but
> this doesn't seem to work for me [1].
If it's not in the caps, that means the framerate is unknown and can
only be estimated. Make sure you check for the raw caps near the
videosink. If you want to know it without playing the file, I would
suggest using GstDiscoverer. You can see the result you would get with
the API by running:
gst-discoverer-1.0 -v myfile
>
>
> Is there a way to change the volume or even completely mute the audio
> track that is using alsasink (via playbin)? I natively tried setting
> the "volume" or "mute" properties of playbin on the fly, but this
> doesn't seem to have an effect [2], whether the pipeline is paused or
> not. A limitation of alsasink, or am I doing something wrong?
There is a playbin flag called soft-volume, that should make use of the
software "volume" element (I believe if needed). That should always
work. Not sure why it didn't work for you, you may force an audio
filter using the audio-filter property. You could set volume as a
filter, and control the volume directly on that element.
cheers,
Nicolas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160315/e8f20e37/attachment.sig>
More information about the gstreamer-devel
mailing list