Opened 7 years ago
Closed 7 years ago
#6770 closed enhancement (fixed)
RTP streaming does not support 24-bit audio
Reported by: | steeley | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | avformat |
Version: | git-master | Keywords: | rtp |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
'FFmpeg can only stream 16-bit audio i.e
ffmpeg -re -i 16bitAudioFile.wav -codec copy -f rtp rtp://239.255.0.10:5004 OK
24 bit produces an 'unsupported' codec error.
24 bit 48k audio has been around for years, about time FFmpeg supported it.
Attachments (1)
Change History (7)
comment:1 by , 7 years ago
Component: | undetermined → avformat |
---|---|
Keywords: | audio removed |
Priority: | normal → wish |
Version: | unspecified → git-master |
by , 7 years ago
Attachment: | patchsdpl24.diff added |
---|
comment:3 by , 7 years ago
Reproduced by developer: | set |
---|---|
Status: | new → open |
Please test attached patch.
follow-up: 5 comment:4 by , 7 years ago
Thanks cehoyos - good work :)
A quick test seems to work for big-endian format. I had to specify pcm_s24be as my file is pcm24le.
Might be good to add support for that as well.
Also tried VLC 2.2.4 but it would not play using the SDP file.
Method:
Test machine = macbook pro OSX 10.11.6. Everything below works without error.
FFmpeg from git and apply your patch.
./configure --prefix=/usr/local --enable-gpl --enable-nonfree
make
make install
Test string:
ffmpeg -re -i voice2448.wav -codec pcm_s24be -f rtp rtp://239.255.0.10:5004
Play with FFplay:( SDP info. from FFmpeg into file 'astream.sdp')
ffplay -protocol_whitelist file,udp,rtp -i astream.sdp
Play using rtpdump with sox play:
rtpdump -F payload 239.255.0.10/5004 | play -c 2 -r 48000 -b 24 -e signed-integer -B -t raw -
comment:5 by , 7 years ago
Replying to steeley:
Thanks cehoyos - good work :)
A quick test seems to work for big-endian format. I had to specify pcm_s24be as my file is pcm24le.
Might be good to add support for that as well.
To quote the RFC:
The samples are packed contiguously into payload octets starting with the most significant bit.
Also tried VLC 2.2.4 but it would not play using the SDP file.
Method:
Test machine = macbook pro OSX 10.11.6. Everything below works without error.
FFmpeg from git and apply your patch.
./configure --prefix=/usr/local --enable-gpl --enable-nonfree
make
make install
Test string:
ffmpeg -re -i voice2448.wav -codec pcm_s24be -f rtp rtp://239.255.0.10:5004
Play with FFplay:( SDP info. from FFmpeg into file 'astream.sdp')
The idea would of course be to test with anything but FFmpeg ...
ffplay -protocol_whitelist file,udp,rtp -i astream.sdp
Play using rtpdump with sox play:
rtpdump -F payload 239.255.0.10/5004 | play -c 2 -r 48000 -b 24 -e signed-integer -B -t raw -
... without specifying all parameters on the command line.
comment:6 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
Pushed as 75bd01090f5b93eb1d2b4543d1c01031281879a4
Which rfc describes how to send 24bit audio over rtp?