How To Fix No Sound on Ubuntu in Hyper-V
Hi, I've installed Ubuntu 22.04 on Hyper-V with Windows 10. As lots of guys, I've not got sound in my VM. So, I was looking to Jacob's trick, solution 3 < Use ffmpeg utility >. First, I've installed ffmpeg 6.0 both on VMUbuntu and the host machine Windows. Then under Windows Power Shell the command : ffplay -nodisp -ac 2 -acodec pcm_s16le -ar 48000 -analyzeduration 0 - probesize 32 -f s16le -i udp://0.0.0.0:18181?listen=1 I get lots of data (see below) My questions : 1. How could I know the ffmpeg server is really launched ? Via Task Manager, I dont see anything, neither Process, nor Services 2. is the IP right ? 0.0.0.0. :18181 looks odd, isn't it ? Thanks a lot for your help. Alain (from France)
It seems that a lot of concepts are being mixed here- What are you actually trying to do? Run ffmpeg in a VM or in windows? Serve content outbound or play something? On 8/26/2023 3:14 AM, aperry@free.fr wrote:
First, I've installed ffmpeg 6.0 both on VMUbuntu and the host machine Windows.
Then under Windows Power Shell the command : ffplay -nodisp -ac 2 -acodec pcm_s16le -ar 48000 -analyzeduration 0 -probesize 32 -f s16le -i udp://0.0.0.0:18181?listen=1
I get lots of data (see below) That's just the start-up message, there could be a -lot- more.
My questions :
1. How could I know the ffmpeg server is really launched ? Via Task Manager, I dont see anything, neither Process, nor Services 2. is the IP right ? 0.0.0.0. :18181 looks odd, isn't it ?
server? It you're trying to play something from a link it must point to the source (thus the IP is definitely wrong). If you're trying make it available to another player, nothing to play is specified. You don't need to use powershell to run the windows executables, cmd.exe is fine. What part does the VM ubuntu play in this? How does ffmpeg behave when running in the VM? (Please copy/paste the command output into the body of the email instead of doing screen captures, that's much easier for people to see). z!
On Sat, 26 Aug 2023 12:14:26 +0200 <aperry@free.fr> wrote:
1. How could I know the ffmpeg server is really launched ? Via Task Manager, I dont see anything, neither Process, nor Services It is running until it does not exit with or without error in your terminal. May use sockstat.exe to check for listening socket. 2. is the IP right ? 0.0.0.0. :18181 looks odd, isn't it ? Right. 0.0.0.0 dees mean accept incoming connections on all network interfaces of your machine.
Now connect from another ffmpeg and play something, like this ffmpeg -i in.wav -c:a pcm_s16le -f s16le udp://<your machine ip>:18181 That's all I can tell without knowning of what you're trying to achieve on Ubuntu side.
On 8/28/2023 5:58 AM, Anatoly wrote:
2. is the IP right ? 0.0.0.0. :18181 looks odd, isn't it ?
Right. 0.0.0.0 dees mean accept incoming connections on all network interfaces of your machine.
But you have '-i' before the URL, making it an input. What is this "Jacob's trick" mentioned in the first email? What are you actually trying to do? More into goes a long way to finding problems even if they seem simple or obvious. There are quite a lot of web pages that give examples of using ffmpeg to originate a stream. Later, z!
On Mon, 28 Aug 2023 20:45:32 +0000 Carl Zwanzig <cpz@tuunq.com> wrote:
On 8/28/2023 5:58 AM, Anatoly wrote:
2. is the IP right ? 0.0.0.0. :18181 looks odd, isn't it ?
Right. 0.0.0.0 dees mean accept incoming connections on all network interfaces of your machine.
But you have '-i' before the URL, making it an input. Yet, yes, this is input. ffplay will accept incoming UDP connection, It will act as a server, waiting for client connection and input stream from client.
What is this "Jacob's trick" mentioned in the first email? Probably it's about making somehow s16le UDP stream out of pulseaudio output on guest machine and sending that stream to listening ffplay on host machine. But we waiting what OP will tell us.
Hi, Sorry, I try to be more clear : 1. The ffplay command runs on my Windows 10 machine 2. The option -i udp://0.0.0.0:18181?listen=1 ? 0.0.0.0 does mean accept incoming connections on all network interfaces of your machine.==> OK, I've figured it 3. PowerShell versus cmd.exe on Windows machine ==> OK 4. What am I trying to do ? : let's have a look. On my Windows 10 machine, I've installed Hyper-V ==> OK Then I've installed a VM Ubuntu 22.04 ==> OK But no sound heared from my VM ; this fact seems to be very frequent (with Windows Hyper-V and Linux (Ubuntu and others)). Certainly, MS Support gives somme ways to solve this issue, but all are without any effect. Further more, I've looked for lot of tricks founded on the Web, all of then telling : "Wonderfull, nice, it's works : I get sound !!!" But unfortunately, for me all these tricks were irelevant ==> sob Luckily, one of the tricks propose to use ffmpeg to hold media streams. This strategy seems fine to me, as all the tricks I mentioned upwards used vain modifications of settings, either on the host Windows, or the VM UbuntU. That's were I am : use ffmpeg to get sound from my VM Ubuntu. And I go forward step by step : the current one is to test ffmpeg on my host Windows ; the test of ffmpeg on the VM will follow later 5. So, as I'm all new to manage media stream with ffmpeg, I need a simple way to know if the listener is efficient. Thanks a lot for advices your community sent me : a) It is running until it does not exit with or without error in your terminal ==> OK : no error b) May use sockstat.exe to check for listening socket. ==> sockstat.dll in not installed on my Windows machine, and as a miserable earthworm, I've not the skill to install it. I used "netstat" : many lines with my IP address but none with port 18181 c) Adapt command like "ffmpeg -i in.wav -c:a pcm_s16le -f s16le udp://<your machine ip>:18181 So I did with a "lion.wav" and my IP ==> well I hear some nose, not looking lion's one, but this could certainly be improved with right options which are so numerous in the package, but it is not the point : the command proves the listener receive a stream ==> That's all folks, now I can go further steps from VM Ubuntu side Well, thanks a lot, guys, for your lighted advices and Force be with you. Regards Alain -----Message d'origine----- De : ffmpeg-user <ffmpeg-user-bounces@ffmpeg.org> De la part de anatoly@kazanfieldhockey.ru Envoyé : mardi 29 août 2023 00:49 À : ffmpeg-user@ffmpeg.org Objet : Re: [FFmpeg-user] How To Fix No Sound on Ubuntu in Hyper-V On Mon, 28 Aug 2023 20:45:32 +0000 Carl Zwanzig <cpz@tuunq.com> wrote:
On 8/28/2023 5:58 AM, Anatoly wrote:
2. is the IP right ? 0.0.0.0. :18181 looks odd, isn't it ?
Right. 0.0.0.0 dees mean accept incoming connections on all network interfaces of your machine.
But you have '-i' before the URL, making it an input. Yet, yes, this is input. ffplay will accept incoming UDP connection, It will act as a server, waiting for client connection and input stream from client.
What is this "Jacob's trick" mentioned in the first email? Probably it's about making somehow s16le UDP stream out of pulseaudio output on guest machine and sending that stream to listening ffplay on host machine. But we waiting what OP will tell us.
ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
On Tue, 29 Aug 2023 16:05:58 +0200 <aperry@free.fr> wrote:
b) May use sockstat.exe to check for listening socket. ==> sockstat.dll in not installed on my Windows machine, and as a miserable earthworm, I've not the skill to install it. I used "netstat" : many lines with my IP address but none with port 18181 Oops, I've messed things up, sorry for that, sockstat is *BSD OSes tool. On Windows netstat -a -n -b should do.
le 30/08/2023 Hi, 1. I start the ffmpeg listener on my Windows machine ==> OK 2. I get sound with a command like ffmpeg -i in.wav -c:a pcm_s16le -f s16le udp://IP:18181 ==> Fine 3. netstat -a -n -b : nothing for protocole UDP, my IP, port 18181 (but yes for ports 137, 138, 1900) ==> sob How is it possible ? Regards Alain -----Message d'origine----- De : ffmpeg-user <ffmpeg-user-bounces@ffmpeg.org> De la part de Anatoly Envoyé : mercredi 30 août 2023 00:17 À : ffmpeg-user@ffmpeg.org Objet : Re: [FFmpeg-user] How To Fix No Sound on Ubuntu in Hyper-V On Tue, 29 Aug 2023 16:05:58 +0200 <aperry@free.fr> wrote:
b) May use sockstat.exe to check for listening socket. ==> sockstat.dll in not installed on my Windows machine, and as a miserable earthworm, I've not the skill to install it. I used "netstat" : many lines with my IP address but none with port 18181 Oops, I've messed things up, sorry for that, sockstat is *BSD OSes tool. On Windows netstat -a -n -b should do.
ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
On Wed, 30 Aug 2023 10:32:56 +0200 <aperry@free.fr> wrote:
2. I get sound with a command like ffmpeg -i in.wav -c:a pcm_s16le -f s16le udp://IP:18181 ==> Fine 3. netstat -a -n -b : nothing for protocole UDP, my IP, port 18181 (but yes for ports 137, 138, 1900) ==> sob How is it possible ? May it be that you've just overlooked that line? Maybe use netstat -a -n | findstr 18181 or netstat -a -n -b > C:\ns.txt and then search ns.txt in notepad? This is how it looks on my Windows 10 machine (relevant two lines): UDP 0.0.0.0:18181 *:* [ffplay.exe]
There is a free gui tool "CurrPorts" similar to netstat https://www.nirsoft.net/utils/cports.html On Tue, 29 Aug 2023 16:05:58 +0200 <aperry@free.fr> wrote:
On my Windows 10 machine, I've installed Hyper-V ==> OK Then I've installed a VM Ubuntu 22.04 ==> OK But no sound heared from my VM ; this fact seems to be very frequent (with Windows Hyper-V and Linux (Ubuntu and others)). Certainly, MS Support gives somme ways to solve this issue, but all are without any effect. Further more, I've looked for lot Hyper-Vof tricks founded on the Web, all of then telling : "Wonderfull, nice, it's works : I get sound !!!" But unfortunately, Btw, maybe use VirtualBox then? Instead of Hyper-V.
Hi Anatoly, 1. Oops : I've looked in ipconfig list with the string "1818" and it said "no" But looking for "18181" gives, as you said : UDP 0.0.0.0:18181 *:* ffplay.exe ==> good thanks 2. I get the gui tool "CurrPorts" and too, it gives a right line : ffplay.exe 1840 UDP 18181 0.0.0.0 my process path and in pink color ! as it is said in the readme.txt The tool "CurrPorts" gives lots of useful others commands So, I'm completely guaranteed to have the ffmpeg listener installed Again, thanks a lot Anatoly, and have a good day. Regards Alain -----Message d'origine----- De : ffmpeg-user <ffmpeg-user-bounces@ffmpeg.org> De la part de Anatoly Envoyé : jeudi 31 août 2023 01:35 À : ffmpeg-user@ffmpeg.org Objet : Re: [FFmpeg-user] How To Fix No Sound on Ubuntu in Hyper-V On Wed, 30 Aug 2023 10:32:56 +0200 <aperry@free.fr> wrote:
2. I get sound with a command like ffmpeg -i in.wav -c:a pcm_s16le -f s16le udp://IP:18181 ==> Fine 3. netstat -a -n -b : nothing for protocole UDP, my IP, port 18181 (but yes for ports 137, 138, 1900) ==> sob How is it possible ? May it be that you've just overlooked that line? Maybe use netstat -a -n | findstr 18181 or netstat -a -n -b > C:\ns.txt and then search ns.txt in notepad? This is how it looks on my Windows 10 machine (relevant two lines): UDP 0.0.0.0:18181 *:* [ffplay.exe]
There is a free gui tool "CurrPorts" similar to netstat https://www.nirsoft.net/utils/cports.html On Tue, 29 Aug 2023 16:05:58 +0200 <aperry@free.fr> wrote:
On my Windows 10 machine, I've installed Hyper-V ==> OK Then I've installed a VM Ubuntu 22.04 ==> OK But no sound heared from my VM ; this fact seems to be very frequent (with Windows Hyper-V and Linux (Ubuntu and others)). Certainly, MS Support gives somme ways to solve this issue, but all are without any effect. Further more, I've looked for lot Hyper-Vof tricks founded on the Web, all of then telling : "Wonderfull, nice, it's works : I get sound !!!" But unfortunately, Btw, maybe use VirtualBox then? Instead of Hyper-V.
ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
Hi, After a few groping, I've got sound in every media (sound, video) in the VM Ubuntu 22.04 on a Windows 10 platform using Hyper-V. That was my goal, blessing your community, I've reached it. Again, thank very much. Regards Alain -----Message d'origine----- De : ffmpeg-user <ffmpeg-user-bounces@ffmpeg.org> De la part de Anatoly Envoyé : jeudi 31 août 2023 01:35 À : ffmpeg-user@ffmpeg.org Objet : Re: [FFmpeg-user] How To Fix No Sound on Ubuntu in Hyper-V On Wed, 30 Aug 2023 10:32:56 +0200 <aperry@free.fr> wrote:
2. I get sound with a command like ffmpeg -i in.wav -c:a pcm_s16le -f s16le udp://IP:18181 ==> Fine 3. netstat -a -n -b : nothing for protocole UDP, my IP, port 18181 (but yes for ports 137, 138, 1900) ==> sob How is it possible ? May it be that you've just overlooked that line? Maybe use netstat -a -n | findstr 18181 or netstat -a -n -b > C:\ns.txt and then search ns.txt in notepad? This is how it looks on my Windows 10 machine (relevant two lines): UDP 0.0.0.0:18181 *:* [ffplay.exe]
There is a free gui tool "CurrPorts" similar to netstat https://www.nirsoft.net/utils/cports.html On Tue, 29 Aug 2023 16:05:58 +0200 <aperry@free.fr> wrote:
On my Windows 10 machine, I've installed Hyper-V ==> OK Then I've installed a VM Ubuntu 22.04 ==> OK But no sound heared from my VM ; this fact seems to be very frequent (with Windows Hyper-V and Linux (Ubuntu and others)). Certainly, MS Support gives somme ways to solve this issue, but all are without any effect. Further more, I've looked for lot Hyper-Vof tricks founded on the Web, all of then telling : "Wonderfull, nice, it's works : I get sound !!!" But unfortunately, Btw, maybe use VirtualBox then? Instead of Hyper-V.
ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
participants (4)
-
Anatoly -
anatoly@kazanfieldhockey.ru -
aperry@free.fr -
Carl Zwanzig