Skip to content

add whipinto/whepfrom audio support#224

Merged
a-wing merged 10 commits intobinbat:mainfrom
Marsyew:main
Oct 1, 2024
Merged

add whipinto/whepfrom audio support#224
a-wing merged 10 commits intobinbat:mainfrom
Marsyew:main

Conversation

@Marsyew
Copy link
Copy Markdown
Contributor

@Marsyew Marsyew commented Sep 29, 2024

Completed by the way #140

@a-wing
Copy link
Copy Markdown
Member

a-wing commented Sep 29, 2024

WhipInto

RTP

Only video

ffmpeg -re -f lavfi -i testsrc=size=640x480:rate=30 \
-vcodec libvpx -f rtp 'rtp://127.0.0.1:5003' -sdp_file stream.sdp

Failed

Error: Unknown codec: unknown

Only audio

ffmpeg -re -f lavfi -i sine=frequency=1000 \
-acodec libopus -f rtp 'rtp://127.0.0.1:5005' -sdp_file stream.sdp

Failed

Error: Unknown codec: unknown

Audio and Video

ffmpeg -re \
-f lavfi -i sine=frequency=1000 \
-f lavfi -i testsrc=size=640x480:rate=30 \
-acodec libopus -vn -f rtp rtp://127.0.0.1:11111 \
-vcodec libvpx -an -f rtp rtp://127.0.0.1:11113 -sdp_file stream.sdp

success

RTSP Client

Only video

ffmpeg -re -f lavfi -i testsrc=size=640x480:rate=30 \
-vcodec libvpx -f rtsp 'rtsp://127.0.0.1:8554'

Only audio

ffmpeg -re -f lavfi -i sine=frequency=1000 \
-acodec libopus -f rtsp 'rtsp://127.0.0.1:8554'

Audio and Video

ffmpeg -re \
-f lavfi -i sine=frequency=1000 \
-f lavfi -i testsrc=size=640x480:rate=30 \
-acodec libopus -vcodec libvpx \
-f rtsp 'rtsp://127.0.0.1:8554'
2024-09-29T15:06:31.056958Z  WARN ThreadId(11) whipinto: tools/whipinto/src/main.rs:275: Error reading RTCP packet from remote peer: DataChannel is not opened
2024-09-29T15:06:31.056989Z  WARN ThreadId(11) whipinto: tools/whipinto/src/main.rs:275: Error reading RTCP packet from remote peer: DataChannel is not opened
2024-09-29T15:06:31.057002Z  WARN ThreadId(11) whipinto: tools/whipinto/src/main.rs:275: Error reading RTCP packet from remote peer: DataChannel is not opened
2024-09-29T15:06:31.057015Z  WARN ThreadId(11) whipinto: tools/whipinto/src/main.rs:275: Error reading RTCP packet from remote peer: DataChannel is not opened
2024-09-29T15:06:31.057027Z  WARN ThreadId(11) whipinto: tools/whipinto/src/main.rs:275: Error reading RTCP packet from remote peer: DataChannel is not opened
2024-09-29T15:06:31.057069Z  WARN ThreadId(11) whipinto: tools/whipinto/src/main.rs:275: Error reading RTCP packet from remote peer: DataChannel is not opened
2024-09-29T15:06:31.057080Z  WARN ThreadId(11) whipinto: tools/whipinto/src/main.rs:275: Error reading RTCP packet from remote peer: DataChannel is not opened
2024-09-29T15:06:31.057092Z  WARN ThreadId(11) whipinto: tools/whipinto/src/main.rs:275: Error reading RTCP packet from remote peer: DataChannel is not opened
2024-09-29T15:06:31.057103Z  WARN ThreadId(11) whipinto: tools/whipinto/src/main.rs:275: Error reading RTCP packet from remote peer: DataChannel is not opened
2024-09-29T15:06:31.057112Z  WARN ThreadId(11) whipinto: tools/whipinto/src/main.rs:275: Error reading RTCP packet from remote peer: DataChannel is not opened
2024-09-29T15:06:31.057183Z  WARN ThreadId(11) whipinto: tools/whipinto/src/main.rs:275: Error reading RTCP packet from remote peer: DataChannel is not opened
2024-09-29T15:06:31.057195Z  WARN ThreadId(11) whipinto: tools/whipinto/src/main.rs:275: Error reading RTCP packet from remote peer: DataChannel is not opened
2024-09-29T15:06:31.057205Z  WARN ThreadId(11) whipinto: tools/whipinto/src/main.rs:275: Error reading RTCP packet from remote peer: DataChannel is not opened
2024-09-29T15:06:31.057214Z  WARN ThreadId(11) whipinto: tools/whipinto/src/main.rs:275: Error reading RTCP packet from remote peer: DataChannel is not opened
2024-09-29T15:06:31.057258Z  WARN ThreadId(11) whipinto: tools/whipinto/src/main.rs:275: Error reading RTCP packet from remote peer: DataChannel is not opened
2024-09-29T15:06:31.057268Z  WARN ThreadId(11) whipinto: tools/whipinto/src/main.rs:275: Error reading RTCP packet from remote peer: DataChannel is not opened
2024-09-29T15:06:31.057278Z  WARN ThreadId(11) whipinto: tools/whipinto/src/main.rs:275: Error reading RTCP packet from remote peer: DataChannel is not opened
2024-09-29T15:06:31.057288Z  WARN ThreadId(11) whipinto: tools/whipinto/src/main.rs:275: Error reading RTCP packet from remote peer: DataChannel is not opened
2024-09-29T15:06:31.057299Z  WARN ThreadId(11) whipinto: tools/whipinto/src/main.rs:275: Error reading RTCP packet from remote peer: DataChannel is not opened
2024-09-29T15:06:31.057319Z  WARN ThreadId(02) whipinto: tools/whipinto/src/main.rs:275: Error reading RTCP packet from remote peer: DataChannel is not opened
2024-09-29T15:06:31.057334Z  WARN ThreadId(11) whipinto: tools/whipinto/src/main.rs:275: Error reading RTCP packet from remote peer: DataChannel is not opened
2024-09-29T15:06:31.057338Z  WARN ThreadId(02) whipinto: tools/whipinto/src/main.rs:275: Error reading RTCP packet from remote peer: DataChannel is not opened
2024-09-29T15:06:31.057345Z  WARN ThreadId(11) whipinto: tools/whipinto/src/main.rs:275: Error reading RTCP packet from remote peer: Dat[1]    93017 killed     cargo run --package=whipinto -- -w http://localhost:7777/whip/777

pub video_rtcp_client: Option<u16>,
pub video_rtp_server: Option<u16>,
pub audio_rtp_client: Option<u16>,
pub audio_rtp_server: Option<u16>,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not no audio_rtcp_client?

})
.unwrap();

println!("recordrrrrr {:?}", self.media_info);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

......

fn describe(&self, req: &Request<Vec<u8>>) -> Response<Vec<u8>> {
fn describe(&mut self, req: &Request<Vec<u8>>) -> Response<Vec<u8>> {
if self.sdp.is_none() {
println!("sdp is none");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warn! or error!

/// Authentication basic to use, will be sent in the HTTP Header as 'Basic ' e.g.: admin:public
#[arg(long)]
auth_basic: Option<String>,
/// Authentication token to use, will be sent in the HTTP Header as 'Bearer '
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@a-wing a-wing added mod::whipinto whipinto mod::whepfrom whepfrom labels Oct 1, 2024
@a-wing a-wing added this to the 0.6.0 milestone Oct 1, 2024
@a-wing a-wing merged commit 3dae7cc into binbat:main Oct 1, 2024
@a-wing a-wing mentioned this pull request Oct 1, 2024
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants