-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vlc can not run #1
Comments
yep, install vlc on your pc then work like charm~ |
Yes, or you can set an environment variable containing the full path to Default value is Line 3 in dd76c6f
|
I try again,reinstall VLC to default path(C:\Program Files\VideoLAN\VLC\vlc.exe).
I still can’t see VLC playing anything 😭 |
That's expected, it is started with Line 25 in dd76c6f
But the audio should still be played. |
I can see TCP link established,but no audio played,maybe huawei‘s EMUI changes some system settings. |
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
Unfortunately,still no sound. l will try another phone in the future. |
Try to remove Line 25 in dd76c6f
As a consequence, it will open the VLC gui. Maybe it will give a hint about the problem. |
I can see VLC and timeline moving forward now,but no sound out from PC . |
main stream error: connection error: Connection refused |
I you get it once, it's expected (cf README).
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 |
sorry,I'm not a programmer,so I don’t konw which file to change, and how to build.... |
I did it with google !
Keep repeating until I close the server. |
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. I think the problem may be related to Huawei system. |
I think huawei provides different api,and I just use youtube which can work. |
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. |
I’m using huawei‘s EMUI 10.1 and Notification bar shows forwarding (Microphone permission has been given).But nothing happened after “playing audio” has occurred.
I have changed the vlc to the correct path on my win10 without changing other configs.
Mybe I need to install VLC to the default path ?
The text was updated successfully, but these errors were encountered: