[FFmpeg-user] FEATURE REQUEST: add support for libsodium encryption library

James Howell james28909 at gmail.com
Sat Jun 25 01:23:52 EEST 2022

i think it would be a great idea to add support for the libsodium
encryption lib. and more and more high profile domains are requiring it,
like discord. an example would be sending voice/audio data to discord you
need to use libsodiums xsalsa20_poly1305 and etc to encrypt the audio
payload. the nonce is the rtp header padded to 24 bytes with null bytes (eg
12 byte header + 12 null bytes) and once you connect to the voice server,
they send you an encryption key via secure websocket. this encryption key +
the nonce forms the rtp opus packet.

i have been having a hard time (mostly because i am only an intermediate
programmer (i know just enough to really mess things up :D) trying to
understand ffmpegs pipe: output. i have a hand rolled program that i am
writing and i open ffmpeg with a pipe so i can read its output. in my while
loop i am receiving data from ffmpeg, and i have it setup that for 0..20
loops it writes its own individual file with ffmpegs output, and every one
ends with 0x0A. this may be each packet of audio, i am not sure. but i just
need to encrypt the audio and send it to which every domain requires it.
therefore i would say it would be a great idea and a blessing to add
support for libsodium and all of its encryption functions.


More information about the ffmpeg-user mailing list