Comments (17)
Mybe I need to install VLC to the default path ?
Yes, or you can set an environment variable containing the full path to vlc.exe
:
https://github.com/rom1v/sndcpy/blob/master/README.md#environment-variables
Default value is C:\Program Files\VideoLAN\VLC\vlc.exe
:
Line 3 in dd76c6f
from sndcpy.
OK, so the Playback Capture API on your device does not capture the app sound. What app did you use when you captured these logs?
Oh!I just test again.
The yandex browser for android can play sound on PC.
youtube can play!
But Huawei's own browser can't.(Like the log above)
VLC for android can't.(Like the log above)
Wechat can't.(Like the log above)
I think the problem may be related to Huawei system.
from sndcpy.
yep, install vlc on your pc then work like charm~
from sndcpy.
Mybe I need to install VLC to the default path ?
Yes, or you can set an environment variable containing the full path to
vlc.exe
:
https://github.com/rom1v/sndcpy/blob/master/README.md#environment-variablesDefault value is
C:\Program Files\VideoLAN\VLC\vlc.exe
:Line 3 in dd76c6f
I try again,reinstall VLC to default path(C:\Program Files\VideoLAN\VLC\vlc.exe).
then I run the sndcpy.bat
Here is the display content:
Waiting for device...
Performing Streamed Install
Success
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.rom1v.sndcpy/.MainActivity }
Press Enter once audio capture is authorized on the device to start playing...
Playing audio...
I still can’t see VLC playing anything 😭
To be precise, vlc even did not appear!
from sndcpy.
To be precise, vlc even did not appear!
That's expected, it is started with -Idummy
.
Line 25 in dd76c6f
But the audio should still be played.
from sndcpy.
To be precise, vlc even did not appear!
That's expected, it is started with
-Idummy
. But the audio should still be played.Line 25 in dd76c6f
I can see TCP link established,but no audio played,maybe huawei‘s EMUI changes some system settings.
(Ps : miracast protocol can transfer audio with low delay.I have used it on win10 as an alternative)
Thank you for your answer !
from sndcpy.
I can see TCP link established,but no audio played
What application do you test? Some apps do not allow to capture their audio (this unfortunately includes Firefox and Chrome).
For example, try youtube or VLC for Android.
from sndcpy.
Unfortunately,still no sound
I can see TCP link established,but no audio played
What application do you test? Some apps do not allow to capture their audio (this unfortunately includes Firefox and Chrome).
For example, try youtube or VLC for Android.
Unfortunately,still no sound. l will try another phone in the future.
from sndcpy.
Try to remove -Idummy
for there:
Line 25 in dd76c6f
As a consequence, it will open the VLC gui. Maybe it will give a hint about the problem.
For example, press Ctrl+m in the VLC window to open the messages dialog.
from sndcpy.
Try to remove
-Idummy
for there:Line 25 in dd76c6f
As a consequence, it will open the VLC gui. Maybe it will give a hint about the problem.
For example, press Ctrl+m in the VLC window to open the messages dialog.
I can see VLC and timeline moving forward now,but no sound out from PC .
Ctrl+m No message log (whatever the detail level),but many thing can be seen in Module tree
from sndcpy.
main stream error: connection error: Connection refused
this is the error i get when i run ./sndcpy on my manjaro any idea what is happening tried removing -Idummy,can see VLC and timeline moving forward now,but no sound out from PC .
Ctrl+m No message log sound still coming from device
from sndcpy.
main stream error: connection error: Connection refused
I you get it once, it's expected (cf README).
but no sound out from PC
OK, so it seems several people have this problem.
Could you please build with these changes and run:
diff --git a/app/src/main/java/com/rom1v/sndcpy/RecordService.java b/app/src/main/java/com/rom1v/sndcpy/RecordService.java
index 8486332..f867724 100644
--- a/app/src/main/java/com/rom1v/sndcpy/RecordService.java
+++ b/app/src/main/java/com/rom1v/sndcpy/RecordService.java
@@ -155,6 +155,23 @@ public class RecordService extends Service {
return builder.build();
}
+ public static String buildPacketString(byte[] data, int offset, int len) {
+ int limit = Math.min(20, len);
+ StringBuilder builder = new StringBuilder();
+ builder.append('[').append(len).append(" bytes] ");
+ for (int i = 0; i < limit; ++i) {
+ if (i != 0) {
+ String sep = i % 4 == 0 ? " " : " ";
+ builder.append(sep);
+ }
+ builder.append(String.format("%02X", data[offset + i] & 0xff));
+ }
+ if (limit < len) {
+ builder.append(" ... +").append(len - limit).append(" bytes");
+ }
+ return builder.toString();
+ }
+
private void startRecording() {
final AudioRecord recorder = createAudioRecord(mediaProjection);
@@ -169,6 +186,7 @@ public class RecordService extends Service {
byte[] buf = new byte[SAMPLE_RATE * CHANNELS * BUFFER_MS / 1000];
while (true) {
int r = recorder.read(buf, 0, buf.length);
+ Log.i(TAG, buildPacketString(buf, 0, buf.length));
socket.getOutputStream().write(buf, 0, r);
}
} catch (IOException e) {
Then look at the output of adb logcat -s sndcpy
.
from sndcpy.
main stream error: connection error: Connection refused
I you get it once, it's expected (cf README).
but no sound out from PC
OK, so it seems several people have this problem.
Could you please build with these changes and run:
diff --git a/app/src/main/java/com/rom1v/sndcpy/RecordService.java b/app/src/main/java/com/rom1v/sndcpy/RecordService.java index 8486332..f867724 100644 --- a/app/src/main/java/com/rom1v/sndcpy/RecordService.java +++ b/app/src/main/java/com/rom1v/sndcpy/RecordService.java @@ -155,6 +155,23 @@ public class RecordService extends Service { return builder.build(); } + public static String buildPacketString(byte[] data, int offset, int len) { + int limit = Math.min(20, len); + StringBuilder builder = new StringBuilder(); + builder.append('[').append(len).append(" bytes] "); + for (int i = 0; i < limit; ++i) { + if (i != 0) { + String sep = i % 4 == 0 ? " " : " "; + builder.append(sep); + } + builder.append(String.format("%02X", data[offset + i] & 0xff)); + } + if (limit < len) { + builder.append(" ... +").append(len - limit).append(" bytes"); + } + return builder.toString(); + } + private void startRecording() { final AudioRecord recorder = createAudioRecord(mediaProjection); @@ -169,6 +186,7 @@ public class RecordService extends Service { byte[] buf = new byte[SAMPLE_RATE * CHANNELS * BUFFER_MS / 1000]; while (true) { int r = recorder.read(buf, 0, buf.length); + Log.i(TAG, buildPacketString(buf, 0, buf.length)); socket.getOutputStream().write(buf, 0, r); } } catch (IOException e) {Then look at the output of
adb logcat -s sndcpy
.
sorry,I'm not a programmer,so I don’t konw which file to change, and how to build....
from sndcpy.
Then look at the output of
adb logcat -s sndcpy
.
I did it with google !
here is the log:
$ adb logcat -s sndcpy
--------- beginning of crash
--------- beginning of system
--------- beginning of main
06-11 13:05:48.120 30633 1942 I sndcpy : [1440 bytes] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... +1420 bytes
06-11 13:05:48.164 30633 1942 I sndcpy : [1440 bytes] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... +1420 bytes
06-11 13:05:48.183 30633 1942 I sndcpy : [1440 bytes] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... +1420 bytes
06-11 13:05:48.186 30633 1942 I sndcpy : [1440 bytes] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... +1420 bytes
06-11 13:05:48.205 30633 1942 I sndcpy : [1440 bytes] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... +1420 bytes
06-11 13:05:48.312 30633 1942 I sndcpy : [1440 bytes] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... +1420 bytes
06-11 13:05:48.313 30633 1942 I sndcpy : [1440 bytes] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... +1420 bytes
06-11 13:05:48.332 30633 1942 I sndcpy : [1440 bytes] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... +1420 bytes
06-11 13:05:48.486 30633 1942 I sndcpy : [1440 bytes] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... +1420 bytes
06-11 13:05:48.504 30633 1942 I sndcpy : [1440 bytes] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... +1420 bytes
06-11 13:05:48.614 30633 1942 I sndcpy : [1440 bytes] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... +1420 bytes
06-11 13:05:48.633 30633 1942 I sndcpy : [1440 bytes] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... +1420 bytes
06-11 13:05:48.761 30633 1942 I sndcpy : [1440 bytes] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... +1420 bytes
06-11 13:05:48.780 30633 1942 I sndcpy : [1440 bytes] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... +1420 bytes
06-11 13:05:48.868 30633 1942 I sndcpy : [1440 bytes] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... +1420 bytes
06-11 13:05:48.889 30633 1942 I sndcpy : [1440 bytes] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... +1420 bytes
06-11 13:05:48.891 30633 1942 I sndcpy : [1440 bytes] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... +1420 bytes
06-11 13:05:48.891 30633 1942 I sndcpy : [1440 bytes] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... +1420 bytes
06-11 13:05:48.908 30633 1942 I sndcpy : [1440 bytes] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... +1420 bytes
06-11 13:05:49.018 30633 1942 I sndcpy : [1440 bytes] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... +1420 bytes
06-11 13:05:49.037 30633 1942 I sndcpy : [1440 bytes] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... +1420 bytes
Keep repeating until I close the server.
from sndcpy.
OK, so the Playback Capture API on your device does not capture the app sound. What app did you use when you captured these logs?
from sndcpy.
OK, so the Playback Capture API on your device does not capture the app sound. What app did you use when you captured these logs?
I think huawei provides different api,and I just use youtube which can work.
Maybe you can test what differences between these apps. Good luck.😀
from sndcpy.
Sound forwarding of Youtube Music and Youtube did work in my case.Testing on EMUI 10.1,a Huawei device.But Poweramp is not working.
from sndcpy.
Related Issues (20)
- apk and vlc has running ,but no sound HOT 1
- Change application id if not allowed to be installed on some devices for security issue. HOT 1
- Problem Parsing the Package
- Looks like sndcpy doesn't work with apps that have In-call volume function inside it. HOT 7
- is it possible to to passed microphone from the Host / Mac to Android ?
- 'C:\Program' is not recognized as an internal or external command
- Newbie Problems
- Phone tell
- audio forwarding is not working HOT 1
- miccpy? HOT 1
- How do i make a silent start for sndcpy?, (Not showing the console) HOT 1
- adb: failed to install sndcpy.apk: Security exception: You need the android.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS permission to use the PackageManager.INSTALL_GRANT_RUNTIME_PERMISSIONS flag HOT 2
- Waiting for device... HOT 2
- SNDCPY, adb: failed to stat sndcpy.apk: No such file or directory HOT 2
- can i ask something HOT 1
- Audio not working for android 10 HOT 4
- sndcpy does not transfer audio played by poweramp
- Got this issue with sndcpy. Also the app doesn't show up after being installed.
- Issue with Sndcpy, HOT 3
- Audio delay using sndcpy HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sndcpy.