Playing separate Video and Audio network sources together.

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
Boltar
New Cone
New Cone
Posts: 2
Joined: 22 Mar 2020 11:11

Playing separate Video and Audio network sources together.

Postby Boltar » 22 Mar 2020 11:18

Hi all, thanks for reading this.

Question is pretty simple. Let's say there are two files located on some webserver.
mydomain.com/video5545.mp4
mydomain.com/audio5545.m4a

How do I configure VLC to play these resources together? I can obviously download them and combine with ffmpeg or something, but I don't want to do that for every video I want to watch.

Cheers
Bolt.

EDIT:
Currently I've found a way to use a browser with a local (generated) html file to do this, so I can now at least watch them without having to download and merge. It would however be nice if I can get VLC to do this.

Code: Select all

<html> <head> <title>Player</title> <script> var vplay = false; var aplay = false; function loaded() { var vplayer=document.getElementById("vid"); var aplayer=document.getElementById("aud"); vplayer.onplaying = function() { vplay=true; if(!aplay) { aplayer.currentTime=vplayer.currentTime; aplayer.play(); } }; aplayer.onplaying = function() { aplay=true; if(!vplay) { vplayer.currentTime=aplayer.currentTime; vplayer.play(); } }; vplayer.onpause = function() { vplay=false; if(aplay) { aplayer.pause(); } } aplayer.onpause = function() { aplay=false; if(vplay) { vplayer.pause(); } } vplayer.onstalled = function() { if(aplay) { aplayer.pause(); } } aplayer.onstalled = function() { if(vplay) { vplayer.pause(); } } } </script> </head> <body onload="loaded()"> <video id="vid" controls> <source src="https://mydomain.com/video5545.mp4" type="video/mp4"> </video> <video id="aud" width=0 height=0> <source src="https://mydomain.com/audio5545.m4a" type="audio/m4a"> </video> </body> </html>

Rémi Denis-Courmont
Developer
Developer
Posts: 15312
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Playing separate Video and Audio network sources together.

Postby Rémi Denis-Courmont » 22 Mar 2020 13:51

That's what the input-slave option is for.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Boltar
New Cone
New Cone
Posts: 2
Joined: 22 Mar 2020 11:11

Re: Playing separate Video and Audio network sources together.

Postby Boltar » 22 Mar 2020 14:02

Thanks, that option must be really well known. God knows how I missed it after hours of googling for a solution.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 48 guests