avformat_open_input: url:'/var/video/tmp.avi' ret:0
[FFmpeg:mpeg4] Failed to parse extradata
avfmtctx.flags: 2097153, iformat.flags
invalid index 0 (valid is 0~0) for stream type 2.
notify_interval: 500
stream: 0, duration=46285 (1542833 ms), time_base=0.033333
codec: mpeg4(MPEG-4 part 2)
invalid index 0 (valid is 0~0) for stream type 0.
**trying video decoder: FFmpeg...
QtAV::VideoDecoderFFmpeg thread type: Single, count: 1
**Video decoder found:0x5639140477f0
setCapture 0x5639145b1880
stream: 0, duration=46285 (1542833 ms), time_base=0.033333
codec: mpeg4(MPEG-4 part 2)
auto select clock: audio > external
No audio found or audio not supported. Using ExternalClock.
Clock initial value: 0.000000
Starting video thread...
get av queue a/v thread = 0x0 0x5639147938e0
setInSize => calculating aspect ratio from converted input data(1.777778)
(repeat 1)setInSize => calculating aspect ratio from converted input data(1.777778)
AVClock started!!!!!!!!
int CameraStreamSource::Connect() 168 Login camera failed !
seek to 00:23:38 1418166 ms (91.919605%)
demuxer sync id: 1/1
External clock change: 0.377000 ==> 1418.166000
[FFmpeg:NULL] Failed to parse extradata
delay -1417.036667s @1418.170s pts:1.133
request seek video thread
Invalid packet! flush video codec context!!!!!!!!!! video packet queue size: 21
video seek: 1418.166, id: 1
video thread wait to sync end for sync id: 1
(repeat 4)video thread wait to sync end for sync id: 1
seeking... pkt.pts - d.render_pts0: -0.033
video thread wait to sync end for sync id: 1
seeking... pkt.pts - d.render_pts0: 0.001
video seek finished @1418.166000. id: 1
seek to 00:22:43 1363285 ms (88.362448%)
demuxer sync id: 2/2
External clock change: 1421.302990 ==> 1363.285000
[FFmpeg:NULL] Failed to parse extradata
Sample files (optional)
videoOutput = new QtAV::VideoOutput(this);
if (!videoOutput->widget()) {
QMessageBox::warning(0, QString::fromLatin1("QtAV error"), tr("Can not create video renderer"));
return;
}
avPlayer->setRenderer(videoOutput);
videoOutput->widget()->move(0,0);
videoOutput->widget()->setFixedSize(1920,1080);
layout()->addWidget(videoOutput->widget());
QtAV, Qt version and platform
QtAV 1.12.0(Apr 17 2019, 11:39:33) 基于ubuntu 18.04 64bit 下的QT4.8.7
Reproduction steps
1.new QtAV::VideoOutput对象,在主窗体中将其widget设置为全屏move(0,0), fixedsize(1920,1080) 2.在主窗体上添加其他的控件,播放和暂停,以达到悬浮在视频显示区域上层 3.播放后seek操作,大概率会导致画面停止,或者卡顿很久 4.视频文件tmp.avi用example中的player和simplePlayer是正常seek操作的 不知道和videoOutput的widget置于底层是否有关?? 具体代码和日志请看下方
Expected behavior
正常的seek,play和pause
Actual behavior
seek之后,画面不动了,但是状态isPaused是false,isPlaying是true
Log file
avformat_open_input: url:'/var/video/tmp.avi' ret:0 [FFmpeg:mpeg4] Failed to parse extradata avfmtctx.flags: 2097153, iformat.flags invalid index 0 (valid is 0~0) for stream type 2. notify_interval: 500 stream: 0, duration=46285 (1542833 ms), time_base=0.033333 codec: mpeg4(MPEG-4 part 2) invalid index 0 (valid is 0~0) for stream type 0. **trying video decoder: FFmpeg... QtAV::VideoDecoderFFmpeg thread type: Single, count: 1 **Video decoder found:0x5639140477f0 setCapture 0x5639145b1880 stream: 0, duration=46285 (1542833 ms), time_base=0.033333 codec: mpeg4(MPEG-4 part 2) auto select clock: audio > external No audio found or audio not supported. Using ExternalClock. Clock initial value: 0.000000 Starting video thread... get av queue a/v thread = 0x0 0x5639147938e0 setInSize => calculating aspect ratio from converted input data(1.777778) (repeat 1)setInSize => calculating aspect ratio from converted input data(1.777778) AVClock started!!!!!!!! int CameraStreamSource::Connect() 168 Login camera failed ! seek to 00:23:38 1418166 ms (91.919605%) demuxer sync id: 1/1 External clock change: 0.377000 ==> 1418.166000 [FFmpeg:NULL] Failed to parse extradata delay -1417.036667s @1418.170s pts:1.133 request seek video thread Invalid packet! flush video codec context!!!!!!!!!! video packet queue size: 21 video seek: 1418.166, id: 1 video thread wait to sync end for sync id: 1 (repeat 4)video thread wait to sync end for sync id: 1 seeking... pkt.pts - d.render_pts0: -0.033 video thread wait to sync end for sync id: 1 seeking... pkt.pts - d.render_pts0: 0.001 video seek finished @1418.166000. id: 1 seek to 00:22:43 1363285 ms (88.362448%) demuxer sync id: 2/2 External clock change: 1421.302990 ==> 1363.285000 [FFmpeg:NULL] Failed to parse extradata
Sample files (optional)
videoOutput = new QtAV::VideoOutput(this); if (!videoOutput->widget()) { QMessageBox::warning(0, QString::fromLatin1("QtAV error"), tr("Can not create video renderer")); return; } avPlayer->setRenderer(videoOutput); videoOutput->widget()->move(0,0); videoOutput->widget()->setFixedSize(1920,1080); layout()->addWidget(videoOutput->widget());
// avPlayer->setSeekType(QtAV::SeekType::KeyFrameSeek);