After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 671954 - removesilence: add a property to output buffer without timestamp gap
removesilence: add a property to output buffer without timestamp gap
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-03-12 23:31 UTC by Nicola
Modified: 2018-11-03 13:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add a property to output buffer without timestamp gap (4.84 KB, patch)
2012-03-12 23:31 UTC, Nicola
none Details | Review
Post bus message when silence is detected/finished (3.07 KB, patch)
2012-03-13 10:09 UTC, Nicola
none Details | Review
small enhancement (1.50 KB, patch)
2012-03-13 10:23 UTC, Nicola
none Details | Review
added a property to control bus msg (5.20 KB, patch)
2012-03-13 17:07 UTC, Nicola
none Details | Review
new property to remove silence only after n consecutive silence frame (4.67 KB, patch)
2012-03-13 21:53 UTC, Nicola
none Details | Review
add squash property (4.88 KB, patch)
2012-03-25 14:21 UTC, Nicola
none Details | Review
add bus messages (3.04 KB, patch)
2012-03-25 14:22 UTC, Nicola
none Details | Review
add silent property (4.90 KB, patch)
2012-03-25 14:22 UTC, Nicola
none Details | Review
add mimimun silence time/minum silence buffers properties (6.66 KB, patch)
2012-03-25 14:23 UTC, Nicola
none Details | Review
restore original behaviour if both the frame and time properties to detect silence are disabled (2.08 KB, patch)
2012-05-11 09:35 UTC, Nicola
none Details | Review
0.11 add squash property (4.72 KB, patch)
2012-06-30 14:47 UTC, Nicola
none Details | Review
0.11 add bus messages (2.60 KB, patch)
2012-06-30 14:48 UTC, Nicola
none Details | Review
0.11 add silent property (4.51 KB, patch)
2012-06-30 14:48 UTC, Nicola
none Details | Review
0.11 add minimum silence time/minimun silence buffers properties (6.35 KB, patch)
2012-06-30 14:49 UTC, Nicola
none Details | Review
add squash property (4.59 KB, patch)
2016-03-05 21:33 UTC, Nicola
none Details | Review
add bus messages (2.61 KB, patch)
2016-03-05 21:33 UTC, Nicola
none Details | Review
add silent property (4.68 KB, patch)
2016-03-05 21:34 UTC, Nicola
none Details | Review
add minimum silence time/buffers properties (6.37 KB, patch)
2016-03-05 21:34 UTC, Nicola
none Details | Review
new property for silence threshold (5.19 KB, patch)
2017-01-25 16:34 UTC, Nicola
none Details | Review

Description Nicola 2012-03-12 23:31:08 UTC
Created attachment 209553 [details] [review]
add a property to output buffer without timestamp gap

Please review the attached patch, thanks
Comment 1 Nicola 2012-03-13 10:09:23 UTC
Created attachment 209588 [details] [review]
Post bus message when silence is detected/finished

Post bus message when silence is detected/finished, this allow another use case, please review this patch too,

thanks
Nicola
Comment 2 Nicola 2012-03-13 10:23:04 UTC
Created attachment 209590 [details] [review]
small enhancement
Comment 3 Nicola 2012-03-13 11:43:43 UTC
maybe I could add a new property to enable/disable posting messages on bus, let me know what do you think about,

thanks
Nicola
Comment 4 Nicola 2012-03-13 17:07:58 UTC
Created attachment 209628 [details] [review]
added a property to control bus msg
Comment 5 Nicola 2012-03-13 21:53:44 UTC
Created attachment 209653 [details] [review]
new property to remove silence only after n consecutive silence frame

this is the last property ... promise,

this should cover all my use cases, please review
Comment 6 David Schleef 2012-03-17 20:51:20 UTC
<drakkan1000> recently I did some work on removesilence plugin to make it suitable for my use cases https://bugzilla.gnome.org/show_bug.cgi?id=671954 what do you think about? Can this changes be merged?
<ds> drakkan1000: could you deprecate the patches which are no longer valid?
<drakkan1000> ds, the posted patch are all valid
<drakkan1000> ds, they must be applied in the order I posted
<drakkan1000> if you want I can make a single patch but each one add a different feature
<ds> we have a standard property name for enabling/disabling bus messages.  it's called "silent", which is, uh, unfortunate
<drakkan1000> ds, ok I'll post a new patch renaming the property
<ds> there was some talk about doing this differently in 0.11
<ds> drakkan1000: i'd like to see the silence cutting configuration to be in time, and a bit more flexible
<ds> drakkan1000: I think of this sort of like a patch file:  you want a certain amount of context, and want to merge hunks if they're too close together
<drakkan1000> ds, ok I'll try to do what you ask, should be a matter to do sum the duration of each frame
<ds> so a property that determines how much silence to prepend to a hunk, append to a hunk, and the minimum gap, i think would be the minimal set of properties
<ds> and although I would want this to ultimately work with sample precision, frame precision is likely fine for now.  if someone wants sample precision, they can do the hard work themselves
<ds> (but make sure the API makes sense for sample precision)
<ds> also, as a side comment, please don't abbreviate property names ("msgs")
<drakkan1000> ds, thanks for your suggestions
<ds> i'm still trying to decide about 'continuous-timestamp'.  I think there's a better name out there, but 'squash' is the best I can think of, which fails the "better" criterium
<ds> ahem, criterion
Comment 7 Nicola 2012-03-17 21:07:35 UTC
I want to keep track of this too:

 so if silence is _, then something like this: _________AAA______B_____C______
 would get changed to .......__AAA__..__B__.__C__....
 with . being removed audio
<drakkan1000> ds, ok 
<ds> but B and C might be part of the same utterance, so you want to avoid the one-dot gap
 dunno, this might be getting more complicated than what people actually need for that kind of case
 er, "avoid removing the one-dot gap"
Comment 8 Nicola 2012-03-25 14:21:37 UTC
Created attachment 210569 [details] [review]
add squash property
Comment 9 Nicola 2012-03-25 14:22:06 UTC
Created attachment 210570 [details] [review]
add bus messages
Comment 10 Nicola 2012-03-25 14:22:29 UTC
Created attachment 210571 [details] [review]
add silent property
Comment 11 Nicola 2012-03-25 14:23:33 UTC
Created attachment 210572 [details] [review]
add mimimun silence time/minum silence buffers properties
Comment 12 Nicola 2012-05-11 09:35:25 UTC
Created attachment 213853 [details] [review]
restore original behaviour if both the frame and time properties to detect silence are disabled
Comment 13 Nicola 2012-06-30 14:47:48 UTC
Created attachment 217726 [details] [review]
0.11 add squash property

squash property for 0.11
Comment 14 Nicola 2012-06-30 14:48:20 UTC
Created attachment 217727 [details] [review]
0.11 add bus messages
Comment 15 Nicola 2012-06-30 14:48:54 UTC
Created attachment 217728 [details] [review]
0.11 add silent property
Comment 16 Nicola 2012-06-30 14:49:40 UTC
Created attachment 217729 [details] [review]
0.11 add minimum silence time/minimun silence buffers properties
Comment 17 Nicola 2012-06-30 14:53:23 UTC
added patchset against 0.11/1.0 please review, 

the patches can be tested with something like this (adding removing properties based on the test to perform):

gst-launch-1.0 -v -m -t alsasrc ! audioconvert  ! removesilence remove=true squash=false silent=false minimum-silence-buffers=10 minimum-silence-time=100000000 ! fakesink silent=true

to simulate silence is enough to mute the capture device with the os volume control,

Nicola
Comment 18 Sebastian Dröge (slomo) 2016-03-01 07:21:24 UTC
What's the status of this here?
Comment 19 Nicola 2016-03-01 08:06:26 UTC
the patch need to be tested/rebased to current git master, I used the 0.10 version

I'm a bit busy now, I'll try to find some time the next weekend
Comment 20 Nicola 2016-03-05 21:33:12 UTC
Created attachment 323174 [details] [review]
add squash property
Comment 21 Nicola 2016-03-05 21:33:39 UTC
Created attachment 323175 [details] [review]
add bus messages
Comment 22 Nicola 2016-03-05 21:34:04 UTC
Created attachment 323176 [details] [review]
add silent property
Comment 23 Nicola 2016-03-05 21:34:51 UTC
Created attachment 323177 [details] [review]
add minimum silence time/buffers properties

rebased against git master, please review
Comment 24 Nicola 2016-05-20 14:45:23 UTC
anything to do here? Are these patchs useful?
Comment 25 Nicola 2017-01-25 16:34:33 UTC
Created attachment 344247 [details] [review]
new property for silence threshold

an user asked for this some time ago,

I hope someone can review, thanks!
Comment 26 Nicola 2017-12-06 17:24:19 UTC
ping
Comment 27 Jose Luis Millan 2018-04-29 05:34:30 UTC
Hi,

I find really useful the feature of being able to set a maximum silence time after which the output is effectively dropped.

I think this is implemented in the following patch:

https://bugzilla.gnome.org/attachment.cgi?id=323177&action=edit

Is there any chance for that option to be added to mainstream?
Comment 28 gaodengming 2018-10-05 09:11:27 UTC
these patchs is really useful. great work.
Comment 29 GStreamer system administrator 2018-11-03 13:11:11 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/63.