Jump to content


Photo

PLay current service without audio


  • Please log in to reply
13 replies to this topic

#1 ziko

  • Senior Member
  • 29 posts

0
Neutral

Posted 13 January 2021 - 08:49

Hi i'm trying how to play the current service without audio , i found out that there is this method in the backend , this method called whenever i change the audio or the language

 

but the eDVBAudio class is not imported to enigma.py so i can call it in the frontend

void eDVBAudio::stop()
{
	if (m_fd >= 0)
	{
		eDebugNoNewLineStart("[eDVBAudio%d] AUDIO_STOP ", m_dev);
		if (::ioctl(m_fd, AUDIO_STOP) < 0)
			eDebugNoNewLine("failed: %m\n");
		else
			eDebugNoNewLine("ok\n");
	}
	if (m_fd_demux >= 0)
	{
		eDebugNoNewLineStart("[eDVBAudio%d] DEMUX_STOP ", m_dev);
		if (::ioctl(m_fd_demux, DMX_STOP) < 0)
			eDebugNoNewLine("failed: %m\n");
		else
			eDebugNoNewLine("ok\n");
	}
}

i want to know how this event is called how enigma knows when the audio change , back to my question now can i play the current service without audio ?

 

Thanks

 



Re: PLay current service without audio #2 littlesat

  • PLi® Core member
  • 56,245 posts

+691
Excellent

Posted 13 January 2021 - 10:40

Just hit the mute button? (hold it and the icon hides)????


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: PLay current service without audio #3 ziko

  • Senior Member
  • 29 posts

0
Neutral

Posted 13 January 2021 - 10:48

what a great community  :thumbs-up:



Re: PLay current service without audio #4 littlesat

  • PLi® Core member
  • 56,245 posts

+691
Excellent

Posted 13 January 2021 - 13:20

Maybe I misunderstood you....
But what exactly do you want to arrange and why?

Edited by littlesat, 13 January 2021 - 13:21.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: PLay current service without audio #5 ziko

  • Senior Member
  • 29 posts

0
Neutral

Posted 13 January 2021 - 15:02

Maybe I misunderstood you....
But what exactly do you want to arrange and why?

 

i want to play sound from url in the background using alsa device without stopping the current service , everything is okay for now i just need to figure out how to stop the audio of the current service i tried to play with apids and it worked but i want to do it automatically



Re: PLay current service without audio #6 littlesat

  • PLi® Core member
  • 56,245 posts

+691
Excellent

Posted 13 January 2021 - 16:55

Isn't PIP an option for you... it offers giving audio from one stream while watching another service.


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: PLay current service without audio #7 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 13 January 2021 - 16:57

And why is muting no option?

Or setting volume level to 0. You only have to do it once and audio is "off" also after restart. You can also do this via command line.

 

(I guess stopping audio in e2 was never tested and can have several side effects)


Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: PLay current service without audio #8 ziko

  • Senior Member
  • 29 posts

0
Neutral

Posted 13 January 2021 - 17:05

Isn't PIP an option for you... it offers giving audio from one stream while watching another service.

 

yeah , but i can't timeshift the video you can only do timeshift for playable service and with pip the playable service is the audio



Re: PLay current service without audio #9 ziko

  • Senior Member
  • 29 posts

0
Neutral

Posted 13 January 2021 - 17:09

And why is muting no option?

Or setting volume level to 0. You only have to do it once and audio is "off" also after restart. You can also do this via command line.

 

(I guess stopping audio in e2 was never tested and can have several side effects)

 

alsa and e2 audio uses the same level of sound they will be both muted at the same time



Re: PLay current service without audio #10 littlesat

  • PLi® Core member
  • 56,245 posts

+691
Excellent

Posted 13 January 2021 - 17:21

So you want to view a service and listen to a different service? The user interface does not really support this. In addition due to the hardware tries to sync it could be that you no not get picture and/or audio.... depending on drivers / hardware as well....

Edited by littlesat, 13 January 2021 - 17:23.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: PLay current service without audio #11 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 13 January 2021 - 17:25

You have a VU box?

Afaik not all boxes support alsa.

 

How do you playback the audio? gstreamer? Maybe use alsasink instead of dvbmediasink. But still we don't know how the box drivers output audio data. Eg. whether they use alsa or whatever and whether you can change there something.


Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: PLay current service without audio #12 Erik Slagter

  • PLi® Core member
  • 46,951 posts

+541
Excellent

Posted 13 January 2021 - 19:45

Also in general keep in mind that not everything is possible in practice. It could very well be that drivers of some manufacturers don't support opening the video decoder without opening the audio decoder or not doing so at the same time etc. A function like "mute" is already well-used and well-known to be working  ;). STB'es in general are not designed to play video from one service and audio from another, even though there is no real reason why it shouldn't be possible. I think indeed you will need to resolve to using the second ("PiP") decoder for the video and then just use the main video(+audio) decoder for the audio.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: PLay current service without audio #13 ziko

  • Senior Member
  • 29 posts

0
Neutral

Posted 13 January 2021 - 20:56

Thanks guys , my friends found a workaround we remove the pid of the current channel and we flag the service it's very heavy but it's a solution , now the problem is i have to change the channel and go back to it to apply the changes i don't know wich function to call to update the channel so the new apid will be set without switching channels i tried nav.stop and nav.play didn't do the job , and at __evEnd i rewrite to lamedb the original values 

 

here is the source : https://github.com/z...Audio/plugin.py

 

i know we should avoid using subprocess and os system in enigma but its just for testing right now



Re: PLay current service without audio #14 ziko

  • Senior Member
  • 29 posts

0
Neutral

Posted 13 January 2021 - 21:03

You have a VU box?

Afaik not all boxes support alsa.

 

How do you playback the audio? gstreamer? Maybe use alsasink instead of dvbmediasink. But still we don't know how the box drivers output audio data. Eg. whether they use alsa or whatever and whether you can change there something.

 

 

i use alsasink  , i have sf8008 and vu+solo both works but for the solo i need to remove apid if i want to timeshift the video only

 

for some boxes we need to update the /etc/asound.conf

pcm.!default {
    type hw
    card 0
    device 0
}

ctl.!default {
    type hw
    card 0
}



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users