VLCKit4.0(master) MP4 no audio

iOS, iPad, iPhone, tvOS specific usage questions
vlcPlayer_cyg
Blank Cone
Blank Cone
Posts: 11
Joined: 06 Mar 2024 07:15

VLCKit4.0(master) MP4 no audio

Postby vlcPlayer_cyg » 13 Mar 2024 12:38

I compile VLCKit (numerical address: https://github.com/videolan/vlckit.git ) Compile the main branch, play multiple MP4 files, only the screen has no sound.
The debugging log is as follows:
2024-03-13 19:33:26.765617+0800 SimplePlayback[2543:205059] creating player instance using shared library
2024-03-13 19:33:26.787134+0800 SimplePlayback[2543:205059] [DBG] VLC media player - 4.0.0-dev Otto Chriek
2024-03-13 19:33:26.787242+0800 SimplePlayback[2543:205059] [DBG] Copyright © 1996-2023 the VideoLAN team
2024-03-13 19:33:26.787281+0800 SimplePlayback[2543:205059] [DBG] revision 4.0.0-dev-25584-g8d3ac7bd6d
...
2024-03-13 19:33:31.241321+0800 SimplePlayback[2543:205059] [DBG] Creating an input for 'Ribbit - Full Movie.mp4'
2024-03-13 19:33:31.246203+0800 SimplePlayback[2543:205347] VLCMediaPlayerStateOpening
2024-03-13 19:33:31.246983+0800 SimplePlayback[2543:205347] [DBG] using timeshift granularity of 50 MiB
2024-03-13 19:33:31.247484+0800 SimplePlayback[2543:205347] [DBG] using default timeshift path
2024-03-13 19:33:31.247999+0800 SimplePlayback[2543:205347] [DBG] `file:///private/var/mobile/Containers/Data/Application/6F002732-DF92-4198-9474-5AA35FF937AD/Documents/Ribbit%20-%20Full%20Movie.mp4' gives access `file' demux `any' path `/private/var/mobile/Containers/Data/Application/6F002732-DF92-4198-9474-5AA35FF937AD/Documents/Ribbit%20-%20Full%20Movie.mp4'
2024-03-13 19:33:31.248835+0800 SimplePlayback[2543:205347] [DBG] creating access: file:///private/var/mobile/Containers/Data/Application/6F002732-DF92-4198-9474-5AA35FF937AD/Documents/Ribbit%20-%20Full%20Movie.mp4
2024-03-13 19:33:31.249170+0800 SimplePlayback[2543:205347] [DBG] (path: /private/var/mobile/Containers/Data/Application/6F002732-DF92-4198-9474-5AA35FF937AD/Documents/Ribbit - Full Movie.mp4)
2024-03-13 19:33:31.249482+0800 SimplePlayback[2543:205347] [DBG] looking for access module matching "file": 2 candidates
2024-03-13 19:33:31.250070+0800 SimplePlayback[2543:205347] [DBG] using access module "filesystem"
...
2024-03-13 19:33:31.254649+0800 SimplePlayback[2543:205347] [DBG] looking for stream_filter module matching "record": 1 candidates
2024-03-13 19:33:31.254889+0800 SimplePlayback[2543:205347] [DBG] using stream_filter module "record"
2024-03-13 19:33:31.255303+0800 SimplePlayback[2543:205347] [DBG] creating demux "any", URL: file:///private/var/mobile/Containers/Data/Application/6F002732-DF92-4198-9474-5AA35FF937AD/Documents/Ribbit%20-%20Full%20Movie.mp4, path: /private/var/mobile/Containers/Data/Application/6F002732-DF92-4198-9474-5AA35FF937AD/Documents/Ribbit - Full Movie.mp4
2024-03-13 19:33:31.255562+0800 SimplePlayback[2543:205347] [DBG] looking for demux module matching "ext-mp4": 58 candidates
2024-03-13 19:33:31.257313+0800 SimplePlayback[2543:205347] [DBG] read box: "mvhd" timescale 1000 duration 4878583 (1:21:18:583) rate 1.00 volume 1.00
2024-03-13 19:33:31.257641+0800 SimplePlayback[2543:205347] [DBG] read box: "tkhd" track #1 duration 4878440 layer 0 volume 0.0 rotation 0.0 scale 1.00x1.00 translate +0.00+0.00 ...
2024-03-13 19:33:31.322755+0800 SimplePlayback[2543:205347] [DBG] ES track added: 'video/1' (fourcc: 'h264')
2024-03-13 19:33:31.322913+0800 SimplePlayback[2543:205347] [DBG] adding track[Id 0x1] video (enable) language undef
2024-03-13 19:33:31.322991+0800 SimplePlayback[2543:205347] [WARN] elst box found
2024-03-13 19:33:31.323032+0800 SimplePlayback[2543:205347] [DBG] - [0] duration=4878583ms media time=0ms) rate=1.0
2024-03-13 19:33:31.330363+0800 SimplePlayback[2543:205347] [DBG] track[Id 0x2] read 121960 chunk
2024-03-13 19:33:31.331412+0800 SimplePlayback[2543:205347] [WARN] STTS table of 1 entries
2024-03-13 19:33:31.335326+0800 SimplePlayback[2543:205347] [DBG] track[Id 0x2] read 210103 samples length:4878s
2024-03-13 19:33:31.335578+0800 SimplePlayback[2543:205347] [DBG] ES track added: 'audio/2' (fourcc: 'mp4a')
2024-03-13 19:33:31.335736+0800 SimplePlayback[2543:205347] [DBG] adding track[Id 0x2] audio (enable) language undef
2024-03-13 19:33:31.335784+0800 SimplePlayback[2543:205347] [DBG] using demux module "mp4"
2024-03-13 19:33:31.336139+0800 SimplePlayback[2543:205347] [DBG] looking for a subtitle file in /private/var/mobile/Containers/Data/Application/6F002732-DF92-4198-9474-5AA35FF937AD/Documents/
2024-03-13 19:33:31.336376+0800 SimplePlayback[2543:205347] [DBG] looking for video decoder module matching "any": 11 candidates
2024-03-13 19:33:31.336442+0800 SimplePlayback[2543:205347] [DBG] vout: none found
2024-03-13 19:33:31.336469+0800 SimplePlayback[2543:205347] [DBG] vout change: decoder size
2024-03-13 19:33:31.336496+0800 SimplePlayback[2543:205347] [DBG] vout change: visible size
2024-03-13 19:33:31.336613+0800 SimplePlayback[2543:205347] [DBG] looking for text renderer module matching "freetype": 2 candidates
2024-03-13 19:33:31.368600+0800 SimplePlayback[2543:205347] [DBG] using text renderer module "freetype"
2024-03-13 19:33:31.368699+0800 SimplePlayback[2543:205347] [DBG] looking for video converter module matching "any": 15 candidates
2024-03-13 19:33:31.382591+0800 SimplePlayback[2543:205347] [DBG] 32x32 (32x32) chroma: YUVA colorspace: Undefined -> 16x16 (16x16) chroma: RGBA colorspace: Undefined with scaling using Bicubic (good quality)

vlcPlayer_cyg
Blank Cone
Blank Cone
Posts: 11
Joined: 06 Mar 2024 07:15

Re: VLCKit4.0(master) MP4 no audio

Postby vlcPlayer_cyg » 13 Mar 2024 12:40

2024-03-13 19:33:31.382673+0800 SimplePlayback[2543:205347] [DBG] using video converter module "swscale"
2024-03-13 19:33:31.382718+0800 SimplePlayback[2543:205347] [DBG] looking for video converter module matching "any": 15 candidates
2024-03-13 19:33:31.382762+0800 SimplePlayback[2543:205347] [DBG] YUVP to YUVA converter
2024-03-13 19:33:31.382792+0800 SimplePlayback[2543:205347] [DBG] using video converter module "yuvp"
2024-03-13 19:33:31.382869+0800 SimplePlayback[2543:205347] [DBG] Deinterlacing available
2024-03-13 19:33:31.382936+0800 SimplePlayback[2543:205347] [DBG] deinterlace -1, mode auto, is_needed 0
2024-03-13 19:33:31.383015+0800 SimplePlayback[2543:205347] [DBG] looking for vout window module matching "any": 2 candidates
2024-03-13 19:33:31.383294+0800 SimplePlayback[2543:205171] [DBG] resized to 320x418
2024-03-13 19:33:31.383424+0800 SimplePlayback[2543:205347] [DBG] using vout window module "uiview_window"
2024-03-13 19:33:31.383465+0800 SimplePlayback[2543:205347] [DBG] looking for inhibit module matching "any": 1 candidates
2024-03-13 19:33:31.383497+0800 SimplePlayback[2543:205347] [DBG] using inhibit module "uikit_inhibit"
2024-03-13 19:33:31.383536+0800 SimplePlayback[2543:205347] [DBG] looking for decoder device module matching "any": 1 candidates
2024-03-13 19:33:31.383565+0800 SimplePlayback[2543:205347] [DBG] using decoder device module "decoder"
2024-03-13 19:33:31.383662+0800 SimplePlayback[2543:205347] [DBG] new SPS parsed: 0
2024-03-13 19:33:31.383695+0800 SimplePlayback[2543:205347] [DBG] new PPS parsed: 0
2024-03-13 19:33:31.383779+0800 SimplePlayback[2543:205347] [WARN] forcing output chroma (kCVPixelFormatType): 420v
2024-03-13 19:33:31.409799+0800 SimplePlayback[2543:205347] [INF] Using Video Toolbox to decode 'h264'
2024-03-13 19:33:31.409873+0800 SimplePlayback[2543:205347] [DBG] using video decoder module "decoder"
2024-03-13 19:33:31.409951+0800 SimplePlayback[2543:205347] [DBG] ES track selected: 'video/1' (fourcc: 'h264')
2024-03-13 19:33:31.410052+0800 SimplePlayback[2543:205347] [DBG] looking for audio decoder module matching "any": 14 candidates
2024-03-13 19:33:31.410097+0800 SimplePlayback[2543:205347] [DBG] using ffmpeg Lavc59.37.100
2024-03-13 19:33:31.410137+0800 SimplePlayback[2543:205347] [DBG] CPU flags: 0x00000068
2024-03-13 19:33:31.420578+0800 SimplePlayback[2543:205347] [DBG] codec (aac) started
2024-03-13 19:33:31.420676+0800 SimplePlayback[2543:205347] [DBG] using audio decoder module "avcodec"
2024-03-13 19:33:31.420765+0800 SimplePlayback[2543:205347] [DBG] ES track selected: 'audio/2' (fourcc: 'mp4a')
2024-03-13 19:33:31.420865+0800 SimplePlayback[2543:205347] [DBG] looking for meta reader module matching "any": 1 candidates
2024-03-13 19:33:31.420945+0800 SimplePlayback[2543:205347] [DBG] creating access: file:///private/var/mobile/Containers/Data/Application/6F002732-DF92-4198-9474-5AA35FF937AD/Documents/Ribbit%20-%20Full%20Movie.mp4
2024-03-13 19:33:31.420982+0800 SimplePlayback[2543:205347] [DBG] (path: /private/var/mobile/Containers/Data/Application/6F002732-DF92-4198-9474-5AA35FF937AD/Documents/Ribbit - Full Movie.mp4)
2024-03-13 19:33:31.421030+0800 SimplePlayback[2543:205347] [DBG] looking for access module matching "file": 2 candidates
2024-03-13 19:33:31.421138+0800 SimplePlayback[2543:205347] [DBG] using access module "filesystem"
2024-03-13 19:33:31.421176+0800 SimplePlayback[2543:205347] [DBG] looking for stream_filter module matching "prefetch,cache": 3 candidates
2024-03-13 19:33:31.421208+0800 SimplePlayback[2543:205347] [DBG] Using stream method for AStream*
2024-03-13 19:33:31.421258+0800 SimplePlayback[2543:205347] [DBG] starting pre-buffering
2024-03-13 19:33:31.421346+0800 SimplePlayback[2543:205347] [DBG] received first data after 0 ms
2024-03-13 19:33:31.421383+0800 SimplePlayback[2543:205347] [DBG] pre-buffering done 1024 bytes in 0s - 7936 KiB/s
2024-03-13 19:33:31.421413+0800 SimplePlayback[2543:205347] [DBG] using stream_filter module "cache_read"
2024-03-13 19:33:31.422212+0800 SimplePlayback[2543:205347] [DBG] removing "stream_filter" module "cache_read"
2024-03-13 19:33:31.422263+0800 SimplePlayback[2543:205347] [DBG] removing "access" module "filesystem"
2024-03-13 19:33:31.422302+0800 SimplePlayback[2543:205347] [DBG] using meta reader module "taglib"
2024-03-13 19:33:31.422332+0800 SimplePlayback[2543:205347] [DBG] removing "meta reader" module "taglib"
2024-03-13 19:33:31.422412+0800 SimplePlayback[2543:205347] [DBG] `file:///private/var/mobile/Containers/Data/Application/6F002732-DF92-4198-9474-5AA35FF937AD/Documents/Ribbit%20-%20Full%20Movie.mp4' successfully opened
2024-03-13 19:33:31.422497+0800 SimplePlayback[2543:205347] VLCMediaPlayerStatePlaying
2024-03-13 19:33:31.422585+0800 SimplePlayback[2543:205347] [DBG] elst (0) gives 0ms (movie)-> 40ms (track)
2024-03-13 19:33:31.422633+0800 SimplePlayback[2543:205347] [DBG] track[Id 0x1] using Sync Sample Box (stss)
2024-03-13 19:33:31.422666+0800 SimplePlayback[2543:205347] [DBG] stss gives 1 --> 0 (sample number)
2024-03-13 19:33:31.422696+0800 SimplePlayback[2543:205347] [DBG] track[Id 0x1] sync point found sample 0(-1)
2024-03-13 19:33:31.422731+0800 SimplePlayback[2543:205347] [DBG] elst (0) gives 0ms (movie)-> 0ms (track)
2024-03-13 19:33:31.422764+0800 SimplePlayback[2543:205347] [DBG] track[Id 0x2] preroll offset: -1 samples
2024-03-13 19:33:31.424510+0800 SimplePlayback[2543:205347] [DBG] program(0): using clock source: 'audio'
2024-03-13 19:33:31.424690+0800 SimplePlayback[2543:205347] [DBG] Buffering 0%
2024-03-13 19:33:31.424909+0800 SimplePlayback[2543:205347] [DBG] Buffering 25%
2024-03-13 19:33:31.425378+0800 SimplePlayback[2543:205347] [DBG] Buffering 50%
2024-03-13 19:33:31.425561+0800 SimplePlayback[2543:205347] [DBG] Buffering 75%
2024-03-13 19:33:31.426053+0800 SimplePlayback[2543:205351] [DBG] session accepted first frame 40001
2024-03-13 19:33:31.426116+0800 SimplePlayback[2543:205347] [DBG] Buffering 100%
2024-03-13 19:33:31.426618+0800 SimplePlayback[2543:205347] [DBG] Stream buffering done (1250 ms in 1 ms)
2024-03-13 19:33:31.437229+0800 SimplePlayback[2543:205171] [DBG] output chroma (kCVPixelFormatType): 420v
2024-03-13 19:33:31.437395+0800 SimplePlayback[2543:205171] [DBG] vout change: decoder size
2024-03-13 19:33:31.437438+0800 SimplePlayback[2543:205171] [DBG] vout change: chroma
2024-03-13 19:33:31.437590+0800 SimplePlayback[2543:205171] [DBG] requested window size: 1920x1080
2024-03-13 19:33:31.437725+0800 SimplePlayback[2543:205171] [DBG] deinterlace -1, mode auto, is_needed 0
2024-03-13 19:33:31.437799+0800 SimplePlayback[2543:205171] [DBG] Opening vout display wrapper
2024-03-13 19:33:31.437850+0800 SimplePlayback[2543:205171] [DBG] looking for vout display module matching "any": 2 candidates
2024-03-13 19:33:31.437906+0800 SimplePlayback[2543:205171] [DBG] using vout display module "samplebufferdisplay"
2024-03-13 19:33:31.438642+0800 SimplePlayback[2543:205171] [DBG] requested window size: 1920x1080
2024-03-13 19:33:31.439564+0800 SimplePlayback[2543:205171] [DBG] Received first picture
2024-03-13 19:33:31.440067+0800 SimplePlayback[2543:205171] [DBG] Raising max DPB to 2
2024-03-13 19:33:31.440674+0800 SimplePlayback[2543:205347] [ERR] buffer deadlock prevented
2024-03-13 19:33:31.440750+0800 SimplePlayback[2543:205347] [DBG] Decoder wait done in 14 ms
2024-03-13 19:33:31.440853+0800 SimplePlayback[2543:205347] [DBG] control type=27
2024-03-13 19:33:31.445908+0800 SimplePlayback[2543:205171] [DBG] resized to 960x1254

vlcPlayer_cyg
Blank Cone
Blank Cone
Posts: 11
Joined: 06 Mar 2024 07:15

Re: VLCKit4.0(master) MP4 no audio

Postby vlcPlayer_cyg » 13 Mar 2024 12:43

I have looked at the code and found an issue with "track [Id 0x2] preroll offset: -1 samples". The unsigned long has been assigned a value of -1, so the audio track has not been sent to the decoding layer. Please confirm and provide a solution. Thank you very much

vlcPlayer_cyg
Blank Cone
Blank Cone
Posts: 11
Joined: 06 Mar 2024 07:15

Re: VLCKit4.0(master) MP4 no audio

Postby vlcPlayer_cyg » 14 Mar 2024 11:14

I found a repair record for this issue, such as “https://code.videolan.org/videolan/vlc/ ... uests/4452”, According to the recorded modifications, the audio can be played. I am happy, but I have found that seek is very slow, at least much slower than vlc3.0 version.
Debugging logs:
2024-03-14 18:02:19.575465+0800 SimplePlayback[3365:369835] creating player instance using shared library
2024-03-14 18:02:19.583020+0800 SimplePlayback[3365:369835] [DBG] VLC media player - 4.0.0-dev Otto Chriek
2024-03-14 18:02:19.583099+0800 SimplePlayback[3365:369835] [DBG] Copyright © 1996-2023 the VideoLAN team
2024-03-14 18:02:19.583133+0800 SimplePlayback[3365:369835] [DBG] revision 4.0.0-dev-25584-g8d3ac7bd6d
...
2024-03-14 18:03:07.290862+0800 SimplePlayback[3365:369835] palySeek
2024-03-14 18:03:07.291082+0800 SimplePlayback[3365:369835] playSeek position=0.005158
2024-03-14 18:03:07.293424+0800 SimplePlayback[3365:369932] [DBG] control type=2
2024-03-14 18:03:07.293692+0800 SimplePlayback[3365:369932] [DBG] ES_OUT_RESET_PCR called
2024-03-14 18:03:07.299122+0800 SimplePlayback[3365:369932] [DBG] elst (0) gives 1651435ms (movie)-> 1651469ms (track)
2024-03-14 18:03:07.299386+0800 SimplePlayback[3365:369932] [DBG] track[Id 0x2] using Sync Sample Box (stss)
2024-03-14 18:03:07.299550+0800 SimplePlayback[3365:369932] [DBG] stss gives 198176 --> 198000 (sample number)
2024-03-14 18:03:07.299835+0800 SimplePlayback[3365:369932] [DBG] track[Id 0x2] sync point found sample 198000(-176)
2024-03-14 18:03:07.300254+0800 SimplePlayback[3365:369932] [DBG] seeking with 1469ms preroll (use input-fast-seek to avoid) to 1651435800
2024-03-14 18:03:07.300648+0800 SimplePlayback[3365:369932] [DBG] elst (0) gives 1649966ms (movie)-> 1649966ms (track)
2024-03-14 18:03:07.300878+0800 SimplePlayback[3365:369932] [DBG] track[Id 0x3] preroll offset: -1 samples. i_sync_sample:0 i_roll_distance:-1
2024-03-14 18:03:07.306506+0800 SimplePlayback[3365:369932] [DBG] Buffering 0%
2024-03-14 18:03:18.188223+0800 SimplePlayback[3365:369932] [WARN] clock gap, unexpected stream discontinuity
2024-03-14 18:03:18.188322+0800 SimplePlayback[3365:369932] [WARN] feeding synchro with a new reference point trying to recover from clock gap
2024-03-14 18:03:18.189652+0800 SimplePlayback[3365:369932] [DBG] Buffering 11%
2024-03-14 18:03:18.190624+0800 SimplePlayback[3365:369932] [DBG] Buffering 22%
2024-03-14 18:03:18.191570+0800 SimplePlayback[3365:369932] [DBG] Buffering 33%
2024-03-14 18:03:18.192712+0800 SimplePlayback[3365:369932] [DBG] Buffering 45%
2024-03-14 18:03:18.193657+0800 SimplePlayback[3365:369932] [DBG] Buffering 56%
2024-03-14 18:03:18.194046+0800 SimplePlayback[3365:369938] [DBG] end of audio preroll
2024-03-14 18:03:18.194468+0800 SimplePlayback[3365:369932] [DBG] Buffering 67%
2024-03-14 18:03:18.195459+0800 SimplePlayback[3365:369932] [DBG] Buffering 78%
2024-03-14 18:03:18.196868+0800 SimplePlayback[3365:369932] [DBG] Buffering 90%
2024-03-14 18:03:18.198137+0800 SimplePlayback[3365:369932] [DBG] Stream buffering done (2250 ms in 9 ms)
2024-03-14 18:03:19.151077+0800 SimplePlayback[3365:369860] [DBG] end of video preroll
2024-03-14 18:03:19.151959+0800 SimplePlayback[3365:369860] [DBG] Received first picture
2024-03-14 18:03:19.153661+0800 SimplePlayback[3365:369972] [ERR] Invalid PCR delay ! Ignoring it...
2024-03-14 18:03:19.157674+0800 SimplePlayback[3365:369932] [DBG] Decoder wait done in 959 ms
2024-03-14 18:03:19.159622+0800 SimplePlayback[3365:369938] [DBG] deferring start (79956 us)

The above log shows that "Buffering 0%" started consuming 11 seconds, very slow.


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

Who is online

Users browsing this forum: No registered users and 11 guests