roc-toolkit icon indicating copy to clipboard operation
roc-toolkit copied to clipboard

Can't disable resampling with rec-send command line

Open dashbad opened this issue 9 months ago • 0 comments

Platform: Debian Bookworm Raspbian on Raspberry Pi 4B roc-toolkit Version: 0.4.0

Command: roc-send -vv -s rtp+rs8m:/ipaddress:10001 -r rs8m://ipaddress:10002 -c rtcp://ipaddress:10003 --rate=48000 -i alsa://input

The receiver is an OSX machine running roc-vod with input setup with command:

roc-vad device add receiver --device-rate 48000 --device-buffer 256ms --name "receiver"

Logs show that while it graps 48k audio from the source, it is transcoding to 44.1 before transmitting. Is it possible to explicitly disable resampling for roc-send?:

19:33:26.205 [1404] [dbg] roc_sndio: [sndfile_backend.cpp:20] sndfile backend: initializing 19:33:26.225 [1404] [dbg] roc_sndio: [backend_map.cpp:22] backend map: initializing: n_backends=4 n_drivers=109 19:33:26.226 [1404] [dbg] roc_core: [slab_pool_impl.cpp:63] slab pool (packet_pool): initializing: slot_size=720 prealloc_size=8(0 slots) min_slab=8(1 slots) max_slab=0(0 slots) 19:33:26.226 [1404] [dbg] roc_core: [slab_pool_impl.cpp:63] slab pool (packet_buffer_pool): initializing: slot_size=11632 prealloc_size=8(0 slots) min_slab=8(1 slots) max_slab=0(0 slots) 19:33:26.226 [1404] [dbg] roc_core: [slab_pool_impl.cpp:63] slab pool (frame_buffer_pool): initializing: slot_size=4144 prealloc_size=8(0 slots) min_slab=8(1 slots) max_slab=0(0 slots) 19:33:26.226 [1404] [dbg] roc_core: [slab_pool_impl.cpp:63] slab pool (encoding_pool): initializing: slot_size=288 prealloc_size=4608(16 slots) min_slab=4608(16 slots) max_slab=0(0 slots) 19:33:26.226 [1405] [dbg] roc_netio: [network_loop.cpp:277] network loop: starting event loop 19:33:26.226 [1404] [dbg] roc_node: [context.cpp:26] context: initializing 19:33:26.227 [1404] [inf] roc_sndio: [sox_source.cpp:79] sox source: opening: driver=alsa path=stereo_in9_10 19:33:26.227 [1406] [dbg] roc_ctl: [control_task_queue.cpp:95] control task queue: starting event loop 19:33:26.237 [1404] [inf] roc_sndio: [sox_source.cpp:400] sox source: opened: bits=32 rate=48000 req_rate=48000 chans=2 req_chans=2 is_file=0 19:33:26.237 [1404] [dbg] roc_core: [slab_pool_impl.cpp:63] slab pool (slot_pool): initializing: slot_size=1152 prealloc_size=8(0 slots) min_slab=8(1 slots) max_slab=0(0 slots) 19:33:26.237 [1404] [dbg] roc_node: [sender.cpp:32] sender node: initializing 19:33:26.237 [1404] [dbg] roc_node: [sender.cpp:72] sender node: configuring audiosrc interface of slot 0 19:33:26.237 [1404] [inf] roc_pipeline: [sender_sink.cpp:71] sender sink: adding slot 19:33:26.237 [1404] [dbg] roc_rtp: [identity.cpp:50] rtp identity: ssrc=193660329 cname=754dc9dd-84ba-47bf-b5e7-3271abaef46a 19:33:26.237 [1404] [inf] roc_node: [sender.cpp:119] sender node: connecting audiosrc interface of slot 0 to rtp+rs8m://192.168.1.54:10001 19:33:26.238 [1405] [dbg] roc_netio: [udp_port.cpp:127] udp port: <udp 0x7FA4000B88 bind=0.0.0.0:48909>: opened port 19:33:26.239 [1404] [inf] roc_node: [sender.cpp:199] sender node: bound audiosrc interface to 0.0.0.0:48909 19:33:26.239 [1405] [dbg] roc_netio: [network_loop.cpp:425] network loop: starting sending packets on port <udp 0x7FA4000B88 bind=0.0.0.0:48909> 19:33:26.241 [1404] [dbg] roc_pipeline: [sender_slot.cpp:55] sender slot: adding audiosrc endpoint rtp+rs8m 19:33:26.241 [1404] [dbg] roc_node: [sender.cpp:72] sender node: configuring audiorpr interface of slot 0 19:33:26.241 [1404] [inf] roc_node: [sender.cpp:119] sender node: connecting audiorpr interface of slot 0 to rs8m://192.168.1.54:10002 19:33:26.241 [1404] [dbg] roc_node: [sender.cpp:494] sender node: sharing audiosrc interface port with audiorpr interface 19:33:26.241 [1404] [dbg] roc_pipeline: [sender_slot.cpp:55] sender slot: adding audiorpr endpoint rs8m 19:33:26.241 [1404] [dbg] roc_fec: [openfec_encoder.cpp:27] openfec encoder: initializing: codec=rs m=8 19:33:26.241 [1404] [dbg] roc_fec: [writer.cpp:82] fec writer: update block size: cur_sbl=0 cur_rbl=0 new_sbl=18 new_rbl=10 19:33:26.242 [1404] [dbg] roc_audio: [packetizer.cpp:53] packetizer: initializing: packet_length=5.000ms samples_per_packet=221 payload_size=884 sample_spec=<sspec rate=44100 fmt= chset=> 19:33:26.242 [1404] [dbg] roc_audio: [speex_resampler.cpp:100] speex resampler: initializing: profile=medium quality=5 frame_size=80 channels_num=2 19:33:26.243 [1404] [dbg] roc_audio: [latency_tuner.cpp:167] latency tuner: initializing: target_latency=0(0.000ms) latency_tolerance=0(0.000ms) stale_tolerance=0(0.000ms) scaling_interval=0(0.000ms) scaling_tolerance=0.000000 backend=niq profile=intact 19:33:26.243 [1404] [dbg] roc_node: [sender.cpp:72] sender node: configuring audioctl interface of slot 0 19:33:26.243 [1404] [inf] roc_node: [sender.cpp:119] sender node: connecting audioctl interface of slot 0 to rtcp://192.168.0.3:10003 19:33:26.243 [1404] [dbg] roc_node: [sender.cpp:494] sender node: sharing audiosrc interface port with audioctl interface 19:33:26.243 [1404] [dbg] roc_pipeline: [sender_slot.cpp:55] sender slot: adding audioctl endpoint rtcp 19:33:26.243 [1404] [dbg] roc_core: [slab_pool_impl.cpp:63] slab pool (stream_pool): initializing: slot_size=912 prealloc_size=7296(8 slots) min_slab=7296(8 slots) max_slab=0(0 slots) 19:33:26.243 [1404] [dbg] roc_core: [slab_pool_impl.cpp:63] slab pool (address_pool): initializing: slot_size=344 prealloc_size=1376(4 slots) min_slab=1376(4 slots) max_slab=0(0 slots) 19:33:26.244 [1404] [dbg] roc_rtcp: [reporter.cpp:63] rtcp reporter: initializing: local_ssrc=193660329 local_cname="754dc9dd-84ba-47bf-b5e7-3271abaef46a" report_mode=address report_addr=192.168.0.3:10003 timeout=5000.000ms 19:33:26.244 [1404] [dbg] roc_audio: [feedback_monitor.cpp:66] feedback monitor: start gathering feedback 19:33:26.244 [1405] [dbg] roc_netio: [network_loop.cpp:445] network loop: starting receiving packets on port <udp 0x7FA4000B88 bind=0.0.0.0:48909> 19:33:26.244 [1404] [dbg] roc_sndio: [pump.cpp:57] pump: starting main loop 19:33:26.487 [1404] [dbg] roc_audio: [speex_resampler.cpp:289] speex resampler: ratio=160/147 rates=48000/44100 latency=44 latency_diff=4 19:33:26.488 [1404] [dbg] roc_packet: [router.cpp:105] router: detected new stream: source_id=193660329 route_flags=[audio] packet_flags=[rtp,fec,audio,prepared,composed] 19:33:26.488 [1404] [dbg] roc_netio: [udp_port.cpp:575] udp port: <udp 0x7FA4000B88 bind=0.0.0.0:48909>: recv=0 send=1 send_nb=1 19:33:26.488 [1404] [dbg] roc_rtp: [timestamp_extractor.cpp:81] timestamp extractor: returning mapping: cts:1741088006488673769/sts:1161718319 19:33:26.488 [1404] [dbg] roc_rtcp: [reporter.cpp:1451] rtcp reporter: creating address: remote_addr=192.168.0.3:10003 19:33:26.488 [1404] [dbg] roc_rtcp: [reporter.cpp:1171] rtcp reporter: completed index rebuild: n_streams=0 n_addrs=1 19:33:26.488 [1404] [dbg] roc_rtcp: [communicator.cpp:849] rtcp communicator: generated_pkts=1 processed_pkts=0 proc_errs=0 19:33:26.489 [1404] [dbg] roc_pipeline: [pipeline_loop.cpp:472] pipeline loop: tasks=5 in_place=1.00 in_frame=0.00 preempts=0 sched=0/0 19:33:26.498 [1404] [dbg] roc_packet: [router.cpp:123] router: detected new stream: source_id=none route_flags=[repair] packet_flags=[fec,repair,prepared,composed] 19:33:46.487 [1404] [dbg] roc_audio: [speex_resampler.cpp:289] speex resampler: ratio=160/147 rates=48000/44100 latency=44 latency_diff=4

dashbad avatar Mar 04 '25 11:03 dashbad