SPDIF on tvOs

iOS, iPad, iPhone, tvOS specific usage questions
Supercorp
Blank Cone
Blank Cone
Posts: 34
Joined: 24 Jan 2016 20:26

SPDIF on tvOs

Postby Supercorp » 27 Jul 2016 17:32

Hi everyone,
Can someone tell me how to activate this option on TVVLCKit ?
Do I have to add a key on the media dictionary and what key ?
Or do I have to set another option on the player itself ?

Thank you for your help.

fkuehne
Developer
Developer
Posts: 7264
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: SPDIF on tvOs

Postby fkuehne » 28 Jul 2016 13:40

We don't have this feature exposed as public API in TVVLCKit as of yet. This will probably come later this summer.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

Supercorp
Blank Cone
Blank Cone
Posts: 34
Joined: 24 Jan 2016 20:26

Re: SPDIF on tvOs

Postby Supercorp » 28 Jul 2016 17:35

Ok thank you very much.
I'll hope it will come soon.

Supercorp
Blank Cone
Blank Cone
Posts: 34
Joined: 24 Jan 2016 20:26

Re: SPDIF on tvOs

Postby Supercorp » 03 Aug 2016 12:00

I've just one question,
How in VCL can you call the selector setPassthroughAudio: if it is not accessible ?

Thanks.

fkuehne
Developer
Developer
Posts: 7264
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: SPDIF on tvOs

Postby fkuehne » 03 Aug 2016 18:06

It is no documented public API and will break in 2 weeks.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

Supercorp
Blank Cone
Blank Cone
Posts: 34
Joined: 24 Jan 2016 20:26

Re: SPDIF on tvOs

Postby Supercorp » 03 Aug 2016 19:40

Ok thanks

Supercorp
Blank Cone
Blank Cone
Posts: 34
Joined: 24 Jan 2016 20:26

Re: SPDIF on tvOs

Postby Supercorp » 18 Aug 2016 12:36

Just for your information, SPDIF that is on VLC for tvOS doesn't work. Even if audio is multichannel, it's out with stereo.
I'll hope the new feature will arrive soon.

Thanks.

ssbmaccom
Cone that earned his stripes
Cone that earned his stripes
Posts: 184
Joined: 26 Nov 2015 15:21
Operating System: Mac OS, iOS, tvOS

Re: SPDIF on tvOs

Postby ssbmaccom » 29 Aug 2016 19:25

When I create the instance of libvlc I pass special options to it.

I setup the VLCOptions array with:

Code: Select all

NSMutableArray *vlcoptions = [NSMutableArray arrayWithObjects: @"--no-color", @"--no-osd", @"--no-video-title-show", @"--no-stats", @"--no-snapshot-preview", #ifndef __LP64__ @"--avcodec-fast", #endif @"--avcodec-hw", @"--text-renderer=freetype", @"--avi-index=3", @":dash-buffersize", @"100", nil];
And then depending if I want audio pass-through or not I use

Code: Select all

[vlcoptions addObject:@"--spdif"];

Code: Select all

[vlcoptions addObject:@"--no-spdif"];
Then I use

Code: Select all

self.mediaplayer = [[VLCMediaPlayer alloc] initWithOptions:[NSArray arrayWithArray:vlcoptions]];
to create the libvlc instance.

Works fine until VLCKit build of May 15th. I was not able to verify this with later builds- and recently builds fail.

Supercorp
Blank Cone
Blank Cone
Posts: 34
Joined: 24 Jan 2016 20:26

Re: SPDIF on tvOs

Postby Supercorp » 30 Aug 2016 14:00

Thank you but with that you cannot change option while media is playing ?

fkuehne
Developer
Developer
Posts: 7264
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: SPDIF on tvOs

Postby fkuehne » 12 Sep 2016 17:08

You can, but only using private API, which I cannot recommend.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

ssbmaccom
Cone that earned his stripes
Cone that earned his stripes
Posts: 184
Joined: 26 Nov 2015 15:21
Operating System: Mac OS, iOS, tvOS

Re: SPDIF on tvOs

Postby ssbmaccom » 03 Oct 2016 15:13

I have seen, that you can pass special options when opening media now. It is some of the initializers in the TVVLCKit Framework.
(I switched to use the Framework instead of build the library locally - unless I find an issue I can try to fix)

Supercorp
Blank Cone
Blank Cone
Posts: 34
Joined: 24 Jan 2016 20:26

Re: SPDIF on tvOs

Postby Supercorp » 12 Oct 2016 17:50

Thanks for the reply.
Can you tell me more about this option ?
And what's the problem with Framework or local library because I don't understand.

Thank you.

ssbmaccom
Cone that earned his stripes
Cone that earned his stripes
Posts: 184
Joined: 26 Nov 2015 15:21
Operating System: Mac OS, iOS, tvOS

Re: SPDIF on tvOs

Postby ssbmaccom » 12 Oct 2016 18:36

Well, I switched from using the static library to the bundled form into a static framework.
So now I use .buildMobileVLCKit -tfb
This includes device and simulator and it should include bitcode as well. Unfortunately there is an issue with bitcode and I posted a fix and sent a patch to felix - but as far as I know it is not yet merged.
And the main reason to switch to the framework is, that the nightly builds are frameworks and they save some build time. But I already made some patches,so I returned to build the stuff myself again.

At the end both are static libraries, downloading the nightly is a bit more convenient as I can already code on my project, while a new version gets downloaded. Building it locally takes too much CPU power and takes longer - and at the end it downloads about the same amount of data.

About the options - check the sources there, but basically you can pass the same arguments as you would pass to the VLC command line. You have to prepare an NSArray with the individual options similar to the code snippet above. So far I haven't used this call, but I may refactor my code accordingly. Would allow to run some streams with and some without Audio-Passthrough in a more convenient fashion.

Supercorp
Blank Cone
Blank Cone
Posts: 34
Joined: 24 Jan 2016 20:26

Re: SPDIF on tvOs

Postby Supercorp » 12 Oct 2016 18:43

Thank you for your clear and great answer.

MidnightCoder
Blank Cone
Blank Cone
Posts: 82
Joined: 08 Aug 2008 06:04

Re: SPDIF on tvOs

Postby MidnightCoder » 12 Oct 2016 23:15

Hey ssbmaccom, is there any way to pass the options into the "media" instead of the "player"? The former is per media being played and the latter is per the entire player. For example, interlace option is best to pass in "per media" because depending on which video you are playing, you might want interlace on or off (assuming you are not using the "auto interlace" option).

ssbmaccom
Cone that earned his stripes
Cone that earned his stripes
Posts: 184
Joined: 26 Nov 2015 15:21
Operating System: Mac OS, iOS, tvOS

Re: SPDIF on tvOs

Postby ssbmaccom » 13 Oct 2016 08:54

I don't think you can set the options for deinterlacer and audio-pass-through per media, only per player. As the media is simply the media/data stream. It does not need deinterlacing etc. The player needs to know about these options, when playing back the media.

At the moment - at least for TS streams I grab from satellite dish receivers - "auto interlace" does not work, because due to another bug (already filed in trac) the values for frame_rate_denum are incorrect (also in VLC 3.0 pre-release). It is always 1 even for progressive streams, but I would expect (and it was like this in the past) the value is 2 for progressive streams. In my case a 720p streams reports to run with 100 frate_rate_num and 1 frame_rate_denum with gives 100 frames per second - but the frame rate is 50 Hz and it is also displayed like this (see Debug inspector in Xcode). With eg 576i (PAL) streams the reported values are as expected which gives 25 HZ frame rate. I also hope this gets solved soon - I reported this months ago.


Return to “VLC for iOS, iPadOS and Apple TV”

Who is online

Users browsing this forum: No registered users and 21 guests