ffmpeg/demuxer warning after embedded cover art support
llyyr opened this issue · comments
You see this warning for various other codecs as well, not just PGS subtitles.
[ffmpeg/demuxer] matroska,webm: Could not find codec parameters for stream 4 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
[ffmpeg/demuxer] Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
This is due to 2f9c126
@llyyr do you have a sample file you can share which has this issue?
out.mp4
This file is mp4
due to github limitation, but it's actually a mkv. Please rename it although it's unnecessary most likely since ffmpeg should still probe it as a mkv.
The first two subtitle tracks are pgs, this issue can be reproduced with mpv --no-config --scripts=mpris.so out.mp4
The issue seems to be caused by this line https://github.com/hoyon/mpv-mpris/blob/master/mpris.c#L289.
The same warning is appears if you just load your file using ffmpeg like ffmpeg -i ~/Downloads/video.mkv
I removed the line in question which removes the warning and the album art feature seems to still work anyway with the files I've tested.
@gnojus do you know why the call to avformat_find_stream_info
is needed or is fine to get rid of it to fix this warning?
The docs are a bit unclear to me:
/**
* Average framerate
*
* - demuxing: May be set by libavformat when creating the stream or in
* avformat_find_stream_info().
* - muxing: May be set by the caller before avformat_write_header().
*/
AVRational avg_frame_rate;
/**
* For streams with AV_DISPOSITION_ATTACHED_PIC disposition, this packet
* will contain the attached picture.
*
* decoding: set by libavformat, must not be modified by the caller.
* encoding: unused
*/
AVPacket attached_pic;
Sounds like attached_pic is not set by avformat_find_stream_info, so it's probably safe to remove the call. And yes, it does seem to work without it.