VLCKit: get media codec/length info?

iOS, iPad, iPhone, tvOS specific usage questions
jtor1134
Blank Cone
Blank Cone
Posts: 10
Joined: 03 Apr 2014 02:19

VLCKit: get media codec/length info?

Postby jtor1134 » 16 Apr 2014 01:26

Is there a way to retrieve codec and video length information for video files with VLCKit? I'm not seeing anything in any of the headers that seems to have such a function. It also seems the iOS VLC app itself doesn't have this function so maybe it's not possible?

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

Re: VLCKit: get media codec/length info?

Postby fkuehne » 16 Apr 2014 12:40

While we don't show codec information in VLC for iOS, a media's duration is displayed of course. We don't show codec information, because we assume that it is irrelevant to the everyday user on a mobile devices.

(Mobile)VLCKit allows you to fetch such information of course. It's part of VLCMedia's tracksInformation array, which includes details about all the tracks of the respective media.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

jtor1134
Blank Cone
Blank Cone
Posts: 10
Joined: 03 Apr 2014 02:19

Re: VLCKit: get media codec/length info?

Postby jtor1134 » 27 Apr 2014 00:29

I think that's what I was looking for. I do have a question however. The value for key "codec" shows a value like "875967080". What does that correspond to?

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

Re: VLCKit: get media codec/length info?

Postby fkuehne » 27 Apr 2014 11:20

This is an integer representation of a FourCC: http://en.wikipedia.org/wiki/FOURCC

Convert to text to discover the meaning :)
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

jtor1134
Blank Cone
Blank Cone
Posts: 10
Joined: 03 Apr 2014 02:19

Re: VLCKit: get media codec/length info?

Postby jtor1134 » 28 Apr 2014 21:19

Ok I got it. How about the decoded format? I'm trying to find the same info that the media information panel in the desktop VLC app gives.

Image

Thank you.

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

Re: VLCKit: get media codec/length info?

Postby fkuehne » 30 Apr 2014 21:42

hmm, we don't have that info exposed at this point. Only decoding level and profile if applicable to the codec. Both are provided as integer values only, so you need more knowledge included within the app to convert the numbers to human understandable information.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

videomaker
New Cone
New Cone
Posts: 1
Joined: 29 May 2014 11:04

Re: VLCKit: get media codec/length info?

Postby videomaker » 29 May 2014 11:07

Hello,

how you get the media duration length before it will play for a playlist...?

jtor1134
Blank Cone
Blank Cone
Posts: 10
Joined: 03 Apr 2014 02:19

Re: VLCKit: get media codec/length info?

Postby jtor1134 » 04 Jun 2014 01:24

Well that's pretty easy.

Code: Select all

VLCMedia *media = [VLCMedia mediaWithURL:fileURL];
and then access property

Code: Select all

media.length

thamgia4f
New Cone
New Cone
Posts: 1
Joined: 04 Jun 2014 16:37

Re: VLCKit: get media codec/length info?

Postby thamgia4f » 04 Jun 2014 16:54

VLC run ok for IPhone 3gs file MP4.....thank you!


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

Who is online

Users browsing this forum: No registered users and 14 guests