Getting native video file framerate & muting alsasink

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting native video file framerate & muting alsasink

Gottfried Haider
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].


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?


Cheers
Gottfried

[1] https://github.com/gohai/processing-glvideo/blob/97162f6f59d8d663d0a5d735a833107c89b2aa89/src/native/impl.c#L524
[2] https://github.com/gohai/processing-glvideo/blob/97162f6f59d8d663d0a5d735a833107c89b2aa89/src/native/impl.c#L462
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Getting native video file framerate & muting alsasink

Nicolas Dufresne-4
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
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Getting native video file framerate & muting alsasink

Andy Robinson
> Le mardi 15 mars 2016 à 01:12 +0100, Gottfried Haider a écrit :
>> 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].

Isn't it a fraction? (not a double).

Regards,
Andy Robinson, Seventh String Software, www.seventhstring.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Getting native video file framerate & muting alsasink

Nicolas Dufresne-4
Le mardi 15 mars 2016 à 13:23 +0000, Andy Robinson a écrit :
> > Le mardi 15 mars 2016 à 01:12 +0100, Gottfried Haider a écrit :
> >> 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].
>
> Isn't it a fraction? (not a double).

It is, didn't notice the error while reading this message. Gottfried,
that's probably the why it does not work for you.

Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Getting native video file framerate & muting alsasink

Gottfried Haider
Thanks Andy & Nicolas - this did indeed the trick.

Best
Gottfried

On Tue, Mar 15, 2016 at 6:33 PM, Nicolas Dufresne <[hidden email]> wrote:
Le mardi 15 mars 2016 à 13:23 +0000, Andy Robinson a écrit :
> > Le mardi 15 mars 2016 à 01:12 +0100, Gottfried Haider a écrit :
> >> 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].
>
> Isn't it a fraction? (not a double).

It is, didn't notice the error while reading this message. Gottfried,
that's probably the why it does not work for you.

Nicolas

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel