[FFmpeg-devel] [PATCHv2 1/2] ffplay: add support for interactive volume control

Ganesh Ajjanagadde gajjanag at mit.edu
Sun Sep 27 16:40:42 CEST 2015


On Sun, Sep 27, 2015 at 10:12 AM, Ganesh Ajjanagadde <gajjanag at mit.edu> wrote:
> On Sun, Sep 27, 2015 at 9:57 AM, Clément Bœsch <u at pkh.me> wrote:
>> On Sat, Sep 26, 2015 at 11:36:42AM -0400, Ganesh Ajjanagadde wrote:
>> [...]
>>> -        memcpy(stream, (uint8_t *)is->audio_buf + is->audio_buf_index, len1);
>>> +        if (is->muted)
>>> +            memset(stream, 0, len1);
>>
>> This doesn't work with u8 sampling.
>
> Do you know of any clean alternative? For instance, is it possible to
> obtain the zero point of the stream from some stream field?

Found one myself, see updated patch. I tested against u8 sample file
tests/data/fate/acodec-pcm-u8.wav.

>
>>
>> Would it make sense to insert + reconfigure a volume filter instead or
>> it's too complicated?
>
> Yes, I consider the current usage terrible unless I am missing
> something. volume filter is static, so once set, I can't adjust the
> volume until I reinsert a new volume filter, etc. I can't simply
> adjust the volume like I can with vlc/mpv with a simple keybinding.
>
>>
>> [...]
>>
>> --
>> Clément B.
>>
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>


More information about the ffmpeg-devel mailing list