pjsip pjsua USB SoundCard choopy - audio

the pjsua runs in openwrt, we use USB SoundCard.
When we answer a call, allways choopy, both the capture and the playback are not work well!
Tips:We have use auddemo tested my soundcard, recoreding/playing are good, and the capture id is 8, playback id is 1.
thank you~~
below is logs:
11:58:06.357 dlg0xdb687c .Received Request msg ACK/cseq=103 (rdata0xdb3ecc)
11:58:06.360 strm0xe038dc !Start talksprut..
11:58:06.361 speex warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:06.363 alsa_dev.c pb_thread_func: underrun!
11:58:06.587 Master/sound !160 samples reduced, buf_cnt=1888
11:58:06.587 Master/sound Buffer size adjusted from 2048 to 1888 (eff_cnt=1280)
11:58:06.588 alsa_dev.c ca_thread_func: overrun!
11:58:06.756 alsa_dev.c ca_thread_func: overrun!
11:58:06.968 Master/sound 228 samples reduced, buf_cnt=1980
11:58:06.968 Master/sound Buffer size adjusted from 2208 to 1980 (eff_cnt=1280)
11:58:06.968 alsa_dev.c ca_thread_func: overrun!
11:58:06.981 speex warning: No playback frame available (your application is buggy and/or got xruns)
11:58:07.083 Master/sound 317 samples reduced, buf_cnt=1983
11:58:07.083 alsa_dev.c ca_thread_func: overrun!
11:58:07.098 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:07.321 Master/sound !280 samples reduced, buf_cnt=1703
11:58:07.321 Master/sound Buffer size adjusted from 1983 to 1703 (eff_cnt=1280)
11:58:07.321 alsa_dev.c ca_thread_func: overrun!
11:58:07.493 alsa_dev.c ca_thread_func: overrun!
11:58:07.505 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:07.707 Master/sound !182 samples reduced, buf_cnt=2161
11:58:07.711 alsa_dev.c ca_thread_func: overrun!
11:58:07.506 alsa_dev.c !pb_thread_func: underrun!
11:58:07.936 Master/sound !376 samples reduced, buf_cnt=1785
11:58:07.937 Master/sound Buffer size adjusted from 2161 to 1785 (eff_cnt=1280)
11:58:07.937 alsa_dev.c ca_thread_func: overrun!
11:58:07.950 speex warning: No playback frame available (your application is buggy and/or got xruns)
11:58:08.001 speex warning: No playback frame available (your application is buggy and/or got xruns)
11:58:08.099 Master/sound 467 samples reduced, buf_cnt=1958
11:58:08.100 alsa_dev.c ca_thread_func: overrun!
11:58:08.108 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:08.331 Master/sound !390 samples reduced, buf_cnt=1568
11:58:08.332 Master/sound Buffer size adjusted from 1958 to 1568 (eff_cnt=1280)
11:58:08.332 alsa_dev.c ca_thread_func: overrun!
11:58:08.508 alsa_dev.c ca_thread_func: overrun!
11:58:08.521 speex warning: No playback frame available (your application is buggy and/or got xruns)
11:58:08.574 speex warning: No playback frame available (your application is buggy and/or got xruns)
11:58:08.677 Master/sound 320 samples reduced, buf_cnt=2208
11:58:08.677 alsa_dev.c ca_thread_func: overrun!
11:58:08.688 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:08.915 Master/sound !499 samples reduced, buf_cnt=2029
11:58:08.915 alsa_dev.c ca_thread_func: overrun!
11:58:09.128 Master/sound 193 samples reduced, buf_cnt=1836
11:58:09.128 Master/sound Buffer size adjusted from 2029 to 1836 (eff_cnt=1280)
11:58:09.129 alsa_dev.c ca_thread_func: overrun!
11:58:09.142 speex warning: No playback frame available (your application is buggy and/or got xruns)
11:58:09.197 speex warning: No playback frame available (your application is buggy and/or got xruns)
11:58:09.300 Master/sound 257 samples reduced, buf_cnt=2219
11:58:09.300 alsa_dev.c ca_thread_func: overrun!
11:58:09.308 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:09.309 alsa_dev.c pb_thread_func: underrun!
11:58:09.523 Master/sound !427 samples reduced, buf_cnt=1792
11:58:09.523 Master/sound Buffer size adjusted from 2219 to 1792 (eff_cnt=1280)
11:58:09.523 alsa_dev.c ca_thread_func: overrun!
11:58:09.718 alsa_dev.c ca_thread_func: overrun!
11:58:09.731 speex warning: No playback frame available (your application is buggy and/or got xruns)
11:58:09.832 Master/sound 297 samples reduced, buf_cnt=2135
11:58:09.833 alsa_dev.c ca_thread_func: overrun!
11:58:09.845 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:10.080 Master/sound !160 samples reduced, buf_cnt=1975
11:58:10.080 Master/sound Buffer size adjusted from 2135 to 1975 (eff_cnt=1280)
11:58:10.080 alsa_dev.c ca_thread_func: overrun!
11:58:10.316 Master/sound 110 samples reduced, buf_cnt=2185
11:58:10.316 alsa_dev.c ca_thread_func: overrun!
11:58:10.329 speex warning: No playback frame available (your application is buggy and/or got xruns)
11:58:10.427 Master/sound 527 samples reduced, buf_cnt=1978
11:58:10.427 speex warning: No playback frame available (your application is buggy and/or got xruns)
11:58:10.530 Master/sound 142 samples reduced, buf_cnt=2156
11:58:10.531 alsa_dev.c ca_thread_func: overrun!
11:58:10.538 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:10.768 Master/sound !169 samples reduced, buf_cnt=1987
11:58:10.768 Master/sound Buffer size adjusted from 2156 to 1987 (eff_cnt=1280)
11:58:10.769 alsa_dev.c ca_thread_func: overrun!
11:58:11.004 Master/sound 67 samples reduced, buf_cnt=2240
11:58:11.005 alsa_dev.c ca_thread_func: overrun!
11:58:11.017 speex warning: No playback frame available (your application is buggy and/or got xruns)
11:58:11.117 Master/sound 439 samples reduced, buf_cnt=2121
11:58:11.118 alsa_dev.c ca_thread_func: overrun!
11:58:11.124 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:11.125 alsa_dev.c pb_thread_func: underrun!
11:58:11.349 Master/sound !162 samples reduced, buf_cnt=1959
11:58:11.349 Master/sound Buffer size adjusted from 2121 to 1959 (eff_cnt=1280)
11:58:11.349 alsa_dev.c ca_thread_func: overrun!
11:58:11.574 Master/sound 39 samples reduced, buf_cnt=2240
11:58:11.575 alsa_dev.c ca_thread_func: overrun!
11:58:11.584 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:11.809 Master/sound !423 samples reduced, buf_cnt=1817
11:58:11.810 Master/sound Buffer size adjusted from 2240 to 1817 (eff_cnt=1280)
11:58:11.810 alsa_dev.c ca_thread_func: overrun!
11:58:11.984 alsa_dev.c ca_thread_func: overrun!
11:58:11.998 speex warning: No playback frame available (your application is buggy and/or got xruns)
11:58:12.106 Master/sound 224 samples reduced, buf_cnt=2233
11:58:12.106 alsa_dev.c ca_thread_func: overrun!
11:58:12.115 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:12.328 Master/sound !295 samples reduced, buf_cnt=1938
11:58:12.329 Master/sound Buffer size adjusted from 2233 to 1938 (eff_cnt=1280)
11:58:12.329 alsa_dev.c ca_thread_func: overrun!
11:58:12.564 Master/sound 31 samples reduced, buf_cnt=2227
11:58:12.565 alsa_dev.c ca_thread_func: overrun!
11:58:12.573 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:12.574 alsa_dev.c pb_thread_func: underrun!
11:58:12.803 Master/sound !368 samples reduced, buf_cnt=1859
11:58:12.804 Master/sound Buffer size adjusted from 2227 to 1859 (eff_cnt=1280)
11:58:12.804 alsa_dev.c ca_thread_func: overrun!
11:58:12.990 alsa_dev.c ca_thread_func: overrun!
11:58:13.002 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:13.223 Master/sound !568 samples reduced, buf_cnt=1931
11:58:13.223 alsa_dev.c ca_thread_func: overrun!
11:58:13.469 Master/sound 416 samples reduced, buf_cnt=1515
11:58:13.469 Master/sound Buffer size adjusted from 1931 to 1515 (eff_cnt=1280)
11:58:13.470 alsa_dev.c ca_thread_func: overrun!
11:58:13.474 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:13.658 alsa_dev.c !ca_thread_func: overrun!
11:58:13.826 alsa_dev.c ca_thread_func: overrun!
11:58:13.833 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:13.834 alsa_dev.c pb_thread_func: underrun!
11:58:14.041 Master/sound !450 samples reduced, buf_cnt=1385
11:58:14.041 Master/sound Buffer size adjusted from 1835 to 1385 (eff_cnt=1280)
11:58:14.041 alsa_dev.c ca_thread_func: overrun!
11:58:14.216 alsa_dev.c ca_thread_func: overrun!
11:58:14.223 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:14.433 Master/sound !169 samples reduced, buf_cnt=1536
11:58:14.434 Master/sound Buffer size adjusted from 1705 to 1536 (eff_cnt=1280)
11:58:14.434 alsa_dev.c ca_thread_func: overrun!
11:58:14.606 alsa_dev.c ca_thread_func: overrun!
11:58:14.613 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:14.843 Master/sound !459 samples reduced, buf_cnt=1397
11:58:14.843 Master/sound Buffer size adjusted from 1856 to 1397 (eff_cnt=1280)
11:58:14.844 alsa_dev.c ca_thread_func: overrun!
11:58:15.023 alsa_dev.c ca_thread_func: overrun!
11:58:15.032 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:15.033 alsa_dev.c pb_thread_func: underrun!
11:58:15.254 Master/sound !454 samples reduced, buf_cnt=1263
11:58:15.254 Master/sound Buffer size adjusted from 1717 to 1263 (eff_cnt=1280)
11:58:15.254 alsa_dev.c ca_thread_func: overrun!
11:58:15.448 alsa_dev.c ca_thread_func: overrun!
11:58:15.455 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:15.636 alsa_dev.c !ca_thread_func: overrun!
11:58:15.808 alsa_dev.c ca_thread_func: overrun!
11:58:15.814 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:16.029 Master/sound !300 samples reduced, buf_cnt=1603
11:58:16.030 Master/sound Buffer size adjusted from 1903 to 1603 (eff_cnt=1280)
11:58:16.030 alsa_dev.c ca_thread_func: overrun!
11:58:16.195 alsa_dev.c ca_thread_func: overrun!
11:58:16.204 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:16.205 alsa_dev.c pb_thread_func: underrun!
11:58:16.429 Master/sound !369 samples reduced, buf_cnt=1554
11:58:16.430 Master/sound Buffer size adjusted from 1923 to 1554 (eff_cnt=1280)
11:58:16.430 alsa_dev.c ca_thread_func: overrun!
11:58:16.609 alsa_dev.c ca_thread_func: overrun!
11:58:16.617 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:16.851 Master/sound !399 samples reduced, buf_cnt=1475
11:58:16.851 Master/sound Buffer size adjusted from 1874 to 1475 (eff_cnt=1280)
11:58:16.852 alsa_dev.c ca_thread_func: overrun!
11:58:17.037 alsa_dev.c ca_thread_func: overrun!
11:58:17.047 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:17.268 Master/sound !461 samples reduced, buf_cnt=1334
11:58:17.268 Master/sound Buffer size adjusted from 1795 to 1334 (eff_cnt=1280)
11:58:17.269 alsa_dev.c ca_thread_func: overrun!
11:58:17.460 alsa_dev.c ca_thread_func: overrun!
11:58:17.469 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:17.470 alsa_dev.c pb_thread_func: underrun!
11:58:17.681 Master/sound !215 samples reduced, buf_cnt=1439
11:58:17.681 Master/sound Buffer size adjusted from 1654 to 1439 (eff_cnt=1280)
11:58:17.682 alsa_dev.c ca_thread_func: overrun!
11:58:17.859 alsa_dev.c ca_thread_func: overrun!
11:58:17.867 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:18.089 Master/sound !350 samples reduced, buf_cnt=1409
11:58:18.089 Master/sound Buffer size adjusted from 1759 to 1409 (eff_cnt=1280)
11:58:18.089 alsa_dev.c ca_thread_func: overrun!
11:58:18.274 alsa_dev.c ca_thread_func: overrun!
11:58:18.284 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:18.511 Master/sound !254 samples reduced, buf_cnt=1475
11:58:18.511 Master/sound Buffer size adjusted from 1729 to 1475 (eff_cnt=1280)
11:58:18.512 alsa_dev.c ca_thread_func: overrun!
11:58:18.514 pjsua_acc.c !Sending 2 bytes keep-alive packet for acc 1 to 211.149.184.241:5060
11:58:18.515 tdta0xe088f8 Destroying txdata raw
11:58:18.689 alsa_dev.c !ca_thread_func: overrun!
11:58:18.701 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:18.881 alsa_dev.c !ca_thread_func: overrun!
11:58:18.888 alsa_dev.c !pb_thread_func: underrun!
11:58:19.105 Master/sound !283 samples reduced, buf_cnt=1832
11:58:19.105 Master/sound Buffer size adjusted from 2115 to 1832 (eff_cnt=1280)
11:58:19.105 alsa_dev.c ca_thread_func: overrun!
11:58:19.114 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:19.342 Master/sound !414 samples reduced, buf_cnt=1418
11:58:19.343 Master/sound Buffer size adjusted from 1832 to 1418 (eff_cnt=1280)
11:58:19.343 alsa_dev.c ca_thread_func: overrun!
11:58:19.517 alsa_dev.c ca_thread_func: overrun!
11:58:19.526 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:19.736 Master/sound !173 samples reduced, buf_cnt=1565
11:58:19.736 Master/sound Buffer size adjusted from 1738 to 1565 (eff_cnt=1280)
11:58:19.736 alsa_dev.c ca_thread_func: overrun!
11:58:19.924 alsa_dev.c ca_thread_func: overrun!
11:58:19.935 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:19.936 alsa_dev.c pb_thread_func: underrun!
11:58:20.115 alsa_dev.c !ca_thread_func: overrun!
11:58:20.132 strm0xe038dc !VAD re-enabled
11:58:20.331 Master/sound !460 samples reduced, buf_cnt=1745
11:58:20.337 Master/sound Buffer size adjusted from 2205 to 1745 (eff_cnt=1280)
11:58:20.337 alsa_dev.c ca_thread_func: overrun!
11:58:20.339 strm0xe038dc !Starting silence
11:58:20.340 speex warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:20.574 Master/sound !387 samples reduced, buf_cnt=1358
11:58:20.574 Master/sound Buffer size adjusted from 1745 to 1358 (eff_cnt=1280)
11:58:20.574 alsa_dev.c ca_thread_func: overrun!
11:58:20.760 alsa_dev.c ca_thread_func: overrun!
11:58:20.762 tsx0xdf545c !Timeout timer event
11:58:20.762 tsx0xdf545c .State changed from Completed to Terminated, event=TIMER
11:58:20.765 tsx0xdf545c Timeout timer event
11:58:20.765 tsx0xdf545c .State changed from Terminated to Destroyed, event=TIMER
11:58:20.766 tdta0xdf43f0 ..Destroying txdata Response msg 200/NOTIFY/cseq=102 (tdta0xdf43f0)
11:58:20.766 tsx0xdf545c Transaction destroyed!
11:58:20.948 alsa_dev.c !ca_thread_func: overrun!
11:58:20.958 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:20.960 alsa_dev.c pb_thread_func: underrun!
11:58:21.187 Master/sound !295 samples reduced, buf_cnt=1383
11:58:21.187 Master/sound Buffer size adjusted from 1678 to 1383 (eff_cnt=1280)
11:58:21.187 alsa_dev.c ca_thread_func: overrun!
11:58:21.378 alsa_dev.c ca_thread_func: overrun!
11:58:21.387 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:21.610 Master/sound !419 samples reduced, buf_cnt=1284
11:58:21.610 Master/sound Buffer size adjusted from 1703 to 1284 (eff_cnt=1280)
11:58:21.612 alsa_dev.c ca_thread_func: overrun!
11:58:21.804 alsa_dev.c ca_thread_func: overrun!
11:58:21.810 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:22.040 Master/sound !168 samples reduced, buf_cnt=1436
11:58:22.040 Master/sound Buffer size adjusted from 1604 to 1436 (eff_cnt=1280)
11:58:22.040 alsa_dev.c ca_thread_func: overrun!
11:58:22.053 alsa_dev.c !pb_thread_func: underrun!
11:58:22.230 alsa_dev.c !ca_thread_func: overrun!
11:58:22.414 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:22.440 alsa_dev.c !ca_thread_func: overrun!
11:58:22.619 alsa_dev.c ca_thread_func: overrun!
11:58:22.805 alsa_dev.c ca_thread_func: overrun!
11:58:22.815 alsa_dev.c !pb_thread_func: underrun!
11:58:23.039 Master/sound !232 samples reduced, buf_cnt=1524
11:58:23.039 Master/sound Buffer size adjusted from 1756 to 1524 (eff_cnt=1280)
11:58:23.039 alsa_dev.c ca_thread_func: overrun!
11:58:23.229 alsa_dev.c ca_thread_func: overrun!
11:58:23.237 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:23.470 Master/sound !341 samples reduced, buf_cnt=1503
11:58:23.470 Master/sound Buffer size adjusted from 1844 to 1503 (eff_cnt=1280)
11:58:23.471 alsa_dev.c ca_thread_func: overrun!
11:58:23.645 alsa_dev.c ca_thread_func: overrun!
11:58:23.652 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:23.860 Master/sound !167 samples reduced, buf_cnt=1656
11:58:23.861 Master/sound Buffer size adjusted from 1823 to 1656 (eff_cnt=1280)
11:58:23.861 alsa_dev.c ca_thread_func: overrun!
11:58:24.049 alsa_dev.c ca_thread_func: overrun!
11:58:24.056 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:24.057 alsa_dev.c pb_thread_func: underrun!
11:58:24.267 Master/sound !166 samples reduced, buf_cnt=1810
11:58:24.267 Master/sound Buffer size adjusted from 1976 to 1810 (eff_cnt=1280)
11:58:24.268 alsa_dev.c ca_thread_func: overrun!
11:58:24.505 Master/sound 450 samples reduced, buf_cnt=1360
11:58:24.505 Master/sound Buffer size adjusted from 1810 to 1360 (eff_cnt=1280)
11:58:24.505 alsa_dev.c ca_thread_func: overrun!
11:58:24.697 alsa_dev.c ca_thread_func: overrun!
11:58:24.708 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:24.883 alsa_dev.c !ca_thread_func: overrun!
11:58:25.121 Master/sound 209 samples reduced, buf_cnt=1791
11:58:25.121 Master/sound Buffer size adjusted from 2000 to 1791 (eff_cnt=1280)
11:58:25.122 alsa_dev.c ca_thread_func: overrun!
11:58:25.132 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:25.133 alsa_dev.c pb_thread_func: underrun!
11:58:25.354 Master/sound !319 samples reduced, buf_cnt=1472
11:58:25.354 Master/sound Buffer size adjusted from 1791 to 1472 (eff_cnt=1280)
11:58:25.354 alsa_dev.c ca_thread_func: overrun!
11:58:25.547 alsa_dev.c ca_thread_func: overrun!
11:58:25.557 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:25.790 Master/sound !320 samples reduced, buf_cnt=1472
11:58:25.791 Master/sound Buffer size adjusted from 1792 to 1472 (eff_cnt=1280)
11:58:25.791 alsa_dev.c ca_thread_func: overrun!
11:58:25.982 alsa_dev.c ca_thread_func: overrun!
11:58:25.990 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:26.218 Master/sound !201 samples reduced, buf_cnt=1591
11:58:26.218 Master/sound Buffer size adjusted from 1792 to 1591 (eff_cnt=1280)
11:58:26.218 alsa_dev.c ca_thread_func: overrun!
11:58:26.419 speex !warning: Auto-filling the buffer (your application is buggy and/or got xruns)
11:58:26.422 alsa_dev.c !ca_thread_func: overrun!
11:58:26.424 alsa_dev.c !pb_thread_func: underrun!
11:58:26.643 Master/sound !275 samples reduced, buf_cnt=1636
11:58:26.644 Master/sound Buffer size adjusted from 1911 to 1636 (eff_cnt=1280)
11:58:26.644 alsa_dev.c ca_thread_func: overrun!
11:58:26.646 sip_endpoint.c !Processing incoming message: Request msg INVITE/cseq=104 (rdata0xdb3ecc)
11:58:26.646 pjsua_core.c .RX 841 bytes Request msg INVITE/cseq=104 (rdata0xdb3ecc) from UDP 211.149.184.241:5060:
INVITE sip:192.168.199.246:30003 SIP/2.0
Via: SIP/2.0/UDP 211.149.184.241:5060;branch=z9hG4bK0ed27c3d;rport
Max-Forwards: 70
From: <sip:103009844960152#211.149.184.241>;tag=as47643774
To: <sip:8002#192.168.199.246:30003;ob>;tag=d7d7f583-6390-4a16-9b9c-2f35c8bef97f
Contact: <sip:103009844960152#211.149.184.241:5060>
Call-ID: 356bbaf75eabf6633e02135d7019b2e8#211.149.184.241:5060
CSeq: 104 INVITE
User-Agent: Asterisk PBX 11.7.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 238

Beforte I compling simple_pjsua.c I set the log level frome 4 to 5.After complied and I run it, I fond the same warnging as you, but have no effect to the session.when I set the log level from 5 back to 4,the waring disappeared.I didn't know the reasion that cause the waring but I know it dosn't have effect to the session.

Related

Calculate PTS and DTS for encoding new video and audio in ffmpeg

I encode a new H.264 video muxed with audio in MP4 file.
How to correctly calculate PTS and DTS for AVPacket and AVFrame for video and audio?
I generate new video frames and new audio from my source. There are no original PTS/DTS information. I know frame rate which I need to use (time_base).
Assuming your frame rate is constant. And after setting stream time bases correctly. Start both pts's from zero (0). Audio pts will increase by 'sample per frame' for each frame. This is typically audio_sample_rate / frame_rate (i.e. 48000/60 = 800).
For the video, things are different and somewhat simpler. Video pts will increase same amount of 'Video frame duration' per frame. Use this cheat sheet to calculate the duration:
FPS Frame duration
23.98 2002
24.00 2000
25.00 2000
29.97 2002
30.00 2000
50.00 1000
59.94 1001
60.00 1000
Yes these somewhat hacky but will work.

Converting m4a to highest quality wav and 320kbps mp3

I have a file .m4a audio file of size 805 kb which I wanted to convert it to wav. My purpose is to (1) get highest quality .wav audio file and (2) get 320 kbps .mp3 audio file.
I used an online service (https://www.online-convert.com) to convert it. When I converted directly without optional settings, the file size increased to 11.6 mb and when I converted the same audio with optional settings like, changing bit resolution to 32 Bit and changing sampling rate to 96000 Hz, the file size jumped to 50.7 mb
There are only two optional settings in the web service
Bit resolution - no change, 8 bit, 16 bit, 24 bit, 32 bit
Sampling rate - no change, 1000 hz, 8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000, 96000 hz
And one raido button for Normalize audio that can be checked and unchecked
Can someone explain why the file size increases and what settings I must keep to get the highest quality from the original 805 kb audio?
Thanks

Add running text to video stream with vdpau

I have a task to add running text to video stream (or file) on receive. Video need to be run on cubieboard with Armbian. I tested with mpv, with flag --hwdec=vdpau, and the video runs smoother that without it. To add running text I tried to use lavfi-drawtext filter, but when I use it, mpv falls back to software decoding and lag is seen. Here is one of the examples I used:
mpv --hwdec=vdpau Videos/VID* -vf lavfi=[drawtext=fontsize=40:fontcolor=yellow:x=w-50*t:y=h/2:textfile=livetext.txt:reload=1]
And an output from that command with --msg-level=vd=v, it is from my working PC, on cubieboard it also warns about audio/video desync:
Playing: Videos/VID_20180129_120726.mp4
(+) Video --vid=1 (*) (h264 1080x1920 30.000fps)
(+) Audio --aid=1 --alang=eng (*) (aac 2ch 44100Hz)
[vd] Container reported FPS: 30.000000
[vd] Codec list:
[vd] h264 - H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
[vd] h264_crystalhd (h264) - CrystalHD H264 decoder
[vd] h264_cuvid (h264) - Nvidia CUVID H264 decoder
[vd] Opening video decoder h264
[vd] Probing 'vdpau'...
[vd] Trying hardware decoding.
[vd] Selected video codec: h264 (H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10)
Opening video filter: [lavfi graph=drawtext=fontsize=40:fontcolor=yellow:x=w-50*t:y=h/2:textfile=/opt/mpv-text/livetext.txt:reload=1]
[vd] Pixel formats supported by decoder: vdpau vaapi_vld yuv420p
[vd] Codec profile: High (0x64)
[vd] Requesting pixfmt 'vdpau' from decoder.
Using hardware decoding (vdpau).
[vd] Decoder format: 1080x1920 vdpau[yuv420p] bt.709/bt.709/bt.1886/limited CL=mpeg2/4/h264
[ffmpeg] Impossible to convert between the formats supported by the filter 'src' and the filter 'auto_scaler_0'
[lavfi] Can't configure libavfilter graph.
Video filter chain:
[in] 1080x1920 vdpau[yuv420p] bt.709/bt.709/bt.1886/limited SP=1.000000 CL=mpeg2/4/h264
[lavfi] "lavfi.00" 1080x1920 vdpau[yuv420p] bt.709/bt.709/bt.1886/limited SP=1.000000 CL=mpeg2/4/h264 <---
[out] ???
Falling back to software decoding.
[vd] Detected 8 logical cores.
[vd] Requesting 9 threads for decoding.
AO: [pulse] 44100Hz stereo 2ch float
[vd] Decoder format: 1080x1920 yuv420p bt.709/bt.709/bt.1886/limited CL=mpeg2/4/h264
VO: [opengl] 1080x1920 yuv420p
AV: 00:00:03 / 00:00:36 (9%) A-V: 0.000
[vd] Uninit video.
After a long search I doubt that hardware acceleration with mpv here is possible. If so, maybe you could give advice on other tools to achieve that? I am a newbie in this sphere and maybe there is a more efficient way to add running text to video. Thanks.
I found a format of subtitles that can move text (ASS), so that no video filters are needed. Tag \move(x1,y1,x2,y2) can do that, reference to tags below:
http://docs.aegisub.org/3.2/ASS_Tags/

Freeswitch PJSIP client, PESQ score incorrect

I am trying to measure voice-quality (PESQ Score) by playing a file at server and recoding it at client-side and then passing both files to ITU implementation of PESQ score computation.
While the codec negotiated is PCMU(G.711) so I should get PESQ score of 4.1 (or something near that) but the score I am getting is in range of 3.4-3.7.
After computing score for more than 40 recordings PESQ Scores I am getting is:
AVG: 3.4278035714
MAX: 3.707
MIN: 3.343
I don't understand what is it that I am doing incorrectly. Why am I not getting scores close to 4.1 ??
Setup:
File (PCM#8000) --- FreeSwitch(PCMU#8000) ---PJSIPClient(PCMU#8000)---File(PCM#8000)
Server and client are on same server.
Server: Freeswitch
Client: PJSUA Python client
Audio file format (#Server): RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz
Audio file format (#cilent, recorded by client): RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz
Codec negotiated between client and server is PCMU#8000h
t=0 0
m=audio 28734 RTP/AVP 0 96
a=rtpmap:0 PCMU/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
a=ptime:20
a=rtcp:28735 IN IP4 192.168.1.236

How do I alter my FFMPEG command to make my HTTP Live Streams more efficient?

I want to reduce the muxing overhead when creating .ts files using FFMPEG.
Im using FFMPEG to create a series of transport stream files used for HTTP live streaming.
./ffmpeg -i myInputFile.ismv \
-vcodec copy \
-acodec copy \
-bsf h264_mp4toannexb \
-map 0 \
-f segment \
-segment_time 10\
-segment_list_size 999999 \
-segment_list output/myVarientPlaylist.m3u8 \
-segment_format mpegts \
output/myAudioVideoFile-%04d.ts
My input is in ismv format and contains a video and audio stream:
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 320x240, 348 kb/s, 29.97 tbr, 10000k tbn, 59.94 tbc
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 63 kb/s
There is an issues related to muxing that is causing a large amout of overhead to be added to the streams. This is how the issue was described to me for the audio:
So for a given aac stream, the overhead will be 88% (since 200 bytes will map to 2 x 188 byte packets).
For video, the iframe packets are quite large, so they translate nicely into .ts packets, however, the diffs can be as small as an audio packet, therefore they suffer from the same issue.
The solution is to combine several aac packets into one larger stream before packaging them into .ts. Is this possible out of the box with FFMPEG?
It is not possible. Codecs rely on the encapsulating container for framing, which means to signal the start and length of a frame.
Your graphic actually misses an element, which is the PES packet. Your audio frame will be put into a PES packet first (which indicates its length), then the PES packet will be cut into smaller chunks which will be TS packets.
By design you can not start a new PES packet (containing an audio frame in your case) in a TS packet which already contains data. A new PES packet will always start in a new TS packet. Otherwise it would be impossible to start playing mid-stream (broadcast sitation) - it would be impossible to know on which byte in the TS the new PES begins (remember you have missed the beginning of the current PES).
There are some mitigating factors, the FF FF FF padding will probably be compressed by the networking hardware. Also if you are using HTTP (instead of UDP or RDP), gzip compression can be enabled (but I doubt it would help much).
I've fixed the worst problem of syncing the TS output on each frame in http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=75c8d7c2b4972f6ba2cef605949f57322f7c0361 - please try a version after that.

Resources