Closed nesteiner closed 1 year ago
在main.dart里添加如下代码,然后把运行日志贴一下。
Logger.root.level = Level.ALL;
Logger.root.onRecord.listen((record) {
print('${record.loggerName}.${record.level.name}: ${record.time}: ${record.message}');
});
目前的错误处理不完善,后面会改进
这个 Logger
从哪来的啊
import 'package:logging/logging.dart';
在main.dart里添加如下代码,然后把运行日志贴一下。
Logger.root.level = Level.ALL; Logger.root.onRecord.listen((record) { print('${record.loggerName}.${record.level.name}: ${record.time}: ${record.message}'); });
目前的错误处理不完善,后面会改进
尽快完善下吧大佬。。。确实很懵逼。。切到fvp后我还没有发布过正式版,因为media作者发疯,把旧版仓库全删除了,新版又无法使用,所以我们现在用flutter_meedu_player的都很尴尬!切到fvp后,其他都还好,就是感觉错误很懵!希望能尽快健壮下错误处理!谢谢了!
(flutter_frontend:904258): Gdk-CRITICAL **: 11:23:55.764: gdk_window_get_state: assertion 'GDK_IS_WINDOW (window)' failed
0.21.1 (git 402153b) - Multimedia Development Kit. Copyright (c) 2016-2023 WangBin(QtAV author) <wbsecg1 at gmail.com>
Build for: Linux x86_64; Clang16.0.6 (++20230610113458+7cbf1a259152-1~exp1~20230610233511.102)GCC4.2.1; libc++160006; 14:28:52 Jun 30 2023
Debug service listening on ws://127.0.0.1:46099/R1DHa6miAlk=/ws
Syncing files to device Linux...
flutter: mdk.INFO: 2023-08-26 11:23:56.577650: 0.21.1 (git 402153b) - Multimedia Development Kit. Copyright (c) 2016-2023 WangBin(QtAV author) <wbsecg1 at gmail.com>
Build for: Linux x86_64; Clang16.0.6 (++20230610113458+7cbf1a259152-1~exp1~20230610233511.102)GCC4.2.1; libc++160006; 14:28:52 Jun 30 2023
flutter: fvp.FINE: 2023-08-26 11:23:56.771778: 494693178 player140186592684064 create(http://localhost:8082/api/video)
flutter: mdk.INFO: 2023-08-26 11:23:56.960976: default0x7f7fbc003fa0 new FrameReader...
flutter: mdk.INFO: 2023-08-26 11:23:56.978038: Registered audio backends: ALSA OpenAL PulseAudio null
flutter: mdk.INFO: 2023-08-26 11:23:56.978155: ALSA device name: default
flutter: mdk.INFO: 2023-08-26 11:23:56.978196: ALSA device id: default
flutter: mdk.INFO: 2023-08-26 11:23:56.978229: ALSA subdevice name: default
flutter: mdk.INFO: 2023-08-26 11:23:56.979126: default0x7f7fbc004690 new FrameReader...
flutter: mdk.INFO: 2023-08-26 11:23:56.980017: Registered audio backends: ALSA OpenAL PulseAudio null
flutter: mdk.INFO: 2023-08-26 11:23:56.980321: ALSA device name: default
flutter: mdk.INFO: 2023-08-26 11:23:56.980742: ALSA device id: default
flutter: mdk.INFO: 2023-08-26 11:23:56.982056: ALSA subdevice name: default
flutter: mdk.INFO: 2023-08-26 11:23:56.982148: 0x7f7fbc0584f0mdk::Player::Player()
flutter: mdk.INFO: 2023-08-26 11:23:56.982191: default FrameReader0x7f7fbc003fa0 state: 0=>0=>0, 0
flutter: mdk.INFO: 2023-08-26 11:23:56.982225: default0x7f7fbc003fa0 virtual void mdk::FrameReader::stop(), current state: 0
flutter: mdk.INFO: 2023-08-26 11:23:56.982260: default FrameReader0x7f7fbc003fa0 state: 0=>0=>0, 0
flutter: mdk.INFO: 2023-08-26 11:23:56.982292: default0x7f7fbc003fa0 virtual void mdk::FrameReader::stop(), current state: 0
flutter: mdk.INFO: 2023-08-26 11:23:56.982457: AudioBackendALSA ERROR@285>>> snd_pcm_pause(pcm_, value) (ffffffb3): 文件描述符处于错误状态
flutter: mdk.INFO: 2023-08-26 11:23:56.982590:
flutter: mdk.INFO: 2023-08-26 11:23:56.982648: 0x7f7fbc42abc0 MediaControl.prepare(0, ...) http://localhost:8082/api/video
flutter: mdk.INFO: 2023-08-26 11:23:56.982696: default 0x7f7fbc003fa0 FrameReader.start(0, ...)
flutter: mdk.INFO: 2023-08-26 11:23:56.982745: default 0x7f7fbc003fa0 FrameReader::update MediaStatus 0=>0X2
flutter: fvp.FINE: 2023-08-26 11:23:56.984849: 494693178 player140186592684064 onMediaStatusChanged: MediaStatus(noMedia) => MediaStatus(+loading)
flutter: mdk.INFO: 2023-08-26 11:23:56.985502: default FrameReader0x7f7fbc003fa0 state: 0=>0=>1, 0
flutter: mdk.INFO: 2023-08-26 11:23:56.985578: default FrameReader0x7f7fbc003fa0 state: 0=>1=>1, 0
flutter: mdk.INFO: 2023-08-26 11:23:56.985612: start frame reader thread: 140184974784192
flutter: mdk.INFO: 2023-08-26 11:23:56.985646: try to load av module: /home/steiner/workspace/spring-scratch/viedo-playing/flutter_frontend/build/linux/x64/debug/bundle/lib/libffmpeg.so.6
flutter: mdk.INFO: 2023-08-26 11:23:56.985693: ffmpeg loaded: /home/steiner/workspace/spring-scratch/viedo-playing/flutter_frontend/build/linux/x64/debug/bundle/lib/libffmpeg.so.6
flutter: mdk.INFO: 2023-08-26 11:23:56.985735: Selected avformat runtime version: 60.9.100 (build: 60.9.100), license: LGPL version 2.1 or later
flutter: mdk.INFO: 2023-08-26 11:23:56.985777: Selected avformat runtime configuration: --extra-version=avbuild --disable-doc --disable-debug --disable-static --enable-shared --enable-runtime-cpudetect --enable-libvpl --enable-libdrm --disable-postproc --ranlib=llvm-ranlib-16 --nm=llvm-nm-16 --ar=llvm-ar-16 --nvcc=clang-16 --toolchain=hardened --enable-cross-compile --target-os=linux --arch=amd64 --pkg-config=pkg-config --sysroot='$SYSROOT' --cc=clang-16 --enable-lto --enable-pic --extra-cflags='-Wa,--noexecstack -fdata-sections -ffunction-sections -fstack-protector-strong -I/home/runner/work/avbuild/avbuild/tools/Vulkan-Headers/include -I=/usr/include/libdrm -I/tmp/dep/include -Wa,--noexecstack -fdata-sections -ffunction-sections -fstack-protector-strong --target=x86_64-linux-gnu' --extra-ldflags='-s -fuse-ld=lld -Wl,--gc-sections -Wl,--gc-sections --target=x86_64-linux-gnu' --extra-libs=-lrt --disable-stripping --enable-small --disable-outdevs --disable-filters --enable-filter='*null*,afade,*fifo,*format,*resample,aeval,allrgb,allyuv,atempo,pan,*bars,color,*key,crop,draw*,eq*,framerate,*_qsv,*_vaapi,*v4l2*,hw*,scale,volume,test*' --disable-muxers --disable-encoders --disable-decoders --disable-demuxers --enable-wolfssl --enable-decoder='*sub*,movtext,*web*,aac*,*ac3*,alac*,ape,ass,av1*,ccaption,cook,dca,dnxhd,eac3*,exr,truehd,ff*,*yuv*,flv,flac,gif,h26[3-4]*,hevc*,hap,mp[1-3]*,prores,*peg*,mlp,mpl2,nellymoser,opus,pcm*,qtrle,*png*,tiff,rawvideo,sami,srt,ssa,v210*,vc1*,vorbis,vp[6-9]*,wm*,wrapped_avframe,rv*' --enable-demuxer='*sub*,*ac3,*ac,*peg*,*web*,ape,ass,avi,concat,dnxhd,dts*,*dash*,*flv,gif,hls,h264,hevc,kux,matroska,mov,mp3,mxf,ogg,pcm*,rawvideo,rt*p,spdif,srt,vc1,v210*,wav,*pipe,image2,mlv,nsv,nut' --enable-encoder='aac,dnxhd,exr,ff*,*yuv*,gif,h26[3-4]*,av1*,hevc*,mjpeg*,*png,opus,pcm*,prores*,rawvideo,spdif,speedhq,*jpeg,*png,tiff,vp[8-9]*,wrapped_avframe,*nvenc,*qsv,*v4l2m2m,*vaapi,vorbis' --enable-muxer='*jpeg,dnxhd,fifo,flv,gif,hls,h264,hevc,image2,mov,mp4,mpegts,matroska,null,og*,pcm*,rawvideo,spdif,*pipe,*segment,webm,wav,dash,nu*'
flutter: mdk.INFO: 2023-08-26 11:23:56.985833: avformat_version0x7f7f5a98b900
flutter: mdk.INFO: 2023-08-26 11:23:56.985871: Trying MediaIO FFmpeg for protocol "http"
flutter: mdk.INFO: 2023-08-26 11:23:56.985903: 0x7f7f4c001b00 open url: http://localhost:8082/api/video
flutter: mdk.INFO: 2023-08-26 11:23:56.985936: 0x7f7f4c001b00 url opened
flutter: mdk.INFO: 2023-08-26 11:23:56.985966: default 0x7f7fbc003fa0 FrameReader::update MediaStatus 0X2=>0X2
flutter: mdk.INFO: 2023-08-26 11:23:56.985996: Selected avcodec runtime version: 60.21.100 (build: 60.21.100), license: LGPL version 2.1 or later
flutter: mdk.INFO: 2023-08-26 11:23:56.986348: av_packet_alloc0x7f7f5a7e11ca
flutter: mdk.INFO: 2023-08-26 11:23:56.986403: Selected avutil runtime version: 58.13.101 (build: 58.13.101), license: LGPL version 2.1 or later
flutter: mdk.INFO: 2023-08-26 11:23:56.986437: av_dict_copy0x7f7f5aa63dc8
flutter: mdk.INFO: 2023-08-26 11:23:56.986476: before avformat_open_input. io: 0x7f7f4c001b00(FFmpeg/pb: 0x7f7f4c014680, url: http://localhost:8082/api/video
flutter: mdk.INFO: 2023-08-26 11:23:56.986516: FFmpeg/Libav runtime git-2023-06-27-9b6d191-avbuild
flutter: mdk.INFO: 2023-08-26 11:23:56.986547: [FFmpeg:matroska,webm] File ended prematurely
flutter: mdk.INFO: 2023-08-26 11:23:56.986577: [FFmpeg:matroska,webm] Duplicate element
flutter: mdk.INFO: 2023-08-26 11:23:56.986609: [FFmpeg:matroska,webm] Element at 0x45 ending at 0x34e05 exceeds containing master element ending at 0x13f1
flutter: mdk.INFO: 2023-08-26 11:23:56.986641: [FFmpeg:matroska,webm] Duplicate element
flutter: mdk.INFO: 2023-08-26 11:23:56.986670: [FFmpeg:matroska,webm] Element at 0x54 ending at 0x7c4e14 exceeds containing master element ending at 0x1400
flutter: mdk.INFO: 2023-08-26 11:23:56.986703: [FFmpeg:matroska,webm] 0x00 at pos 464 (0x1d0) invalid as first byte of an EBML number
flutter: mdk.INFO: 2023-08-26 11:23:56.986735: [FFmpeg:matroska,webm] 0x00 at pos 481 (0x1e1) invalid as first byte of an EBML number
flutter: mdk.INFO: 2023-08-26 11:23:56.986765: [FFmpeg:matroska,webm] Duplicate element
flutter: mdk.INFO: 2023-08-26 11:23:56.986804: [FFmpeg:matroska,webm] Element at 0x85 ending at 0x569ecd9 exceeds containing master element ending at 0x1431
flutter: mdk.INFO: 2023-08-26 11:23:56.986850: [FFmpeg:matroska,webm] File ended prematurely
flutter: mdk.INFO: 2023-08-26 11:23:56.987271: Error avrt::avformat_open_input(&fmtctx_, in.c_str(), fmt, &dict) @204 /home/runner/work/mdk-sdk/mdk-sdk/mdk/ffmpeg/plugin/FFmpegPacketIO.cpp: (0xfffffffb) 输入/输出错误
flutter: mdk.INFO: 2023-08-26 11:23:56.987363: 140184974784192default 0x7f7fbc003fa0 bool mdk::FrameReader::update(MediaStatus) @1052: reset status_mask
flutter: mdk.INFO: 2023-08-26 11:23:56.987417: default 0x7f7fbc003fa0 FrameReader::update MediaStatus 0X2=>0X80000000
flutter: fvp.FINE: 2023-08-26 11:23:56.987534: 494693178 player140186592684064 onMediaStatusChanged: MediaStatus(+loading) => MediaStatus(+invalid)
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Exception: No Stream<VideoEvent> for textureId: -1.
#0 MdkVideoPlayer.videoEventsFor (package:fvp/src/video_player_mdk.dart:225:5)
#1 VideoPlayerController.initialize (package:video_player/video_player.dart:488:10)
<asynchronous suspension>
flutter: mdk.WARNING: 2023-08-26 11:23:56.993077: reader open error
flutter: mdk.INFO: 2023-08-26 11:23:56.993261: 140184974784192default 0x7f7fbc003fa0 bool mdk::FrameReader::update(MediaStatus) @1052: reset status_mask
flutter: mdk.INFO: 2023-08-26 11:23:56.993315: default 0x7f7fbc003fa0 FrameReader::update MediaStatus 0X80000000=>0X80000000
flutter: mdk.INFO: 2023-08-26 11:23:56.993360: 0x7f7fbc003fa0 virtual bool mdk::FrameReaderImpl::unload(), current status 0x80000000, invalid: 0x80000000, loading: 0, loaded: 0, buffering: 0, seeking: 0, prepared: 0, EOF: 0
flutter: mdk.INFO: 2023-08-26 11:23:56.993436: 0x7f7f4c001b00 close url: http://localhost:8082/api/video
flutter: mdk.INFO: 2023-08-26 11:23:56.993478: default FrameReader0x7f7fbc003fa0 state: 0=>1=>0, 1
flutter: mdk.SEVERE: 2023-08-26 11:23:56.993633: state not changed!
flutter: mdk.INFO: 2023-08-26 11:23:56.995579: 0x7f7fbc42abc0 virtual void mdk::MediaControlPush::setState(PlaybackState)@955 requested state 2=>0, current state 0. status: 0X80000000
flutter: mdk.INFO: 2023-08-26 11:23:56.995675: default FrameReader0x7f7fbc003fa0 state: 0=>0=>0, 0
flutter: mdk.INFO: 2023-08-26 11:23:56.995725: default0x7f7fbc003fa0 virtual void mdk::FrameReader::stop(), current state: 0
flutter: mdk.INFO: 2023-08-26 11:23:56.995786: AudioBackendALSA ERROR@285>>> snd_pcm_pause(pcm_, value) (ffffffb3): 文件描述符处于错误状态
flutter: mdk.INFO: 2023-08-26 11:23:56.995838:
flutter: mdk.INFO: 2023-08-26 11:23:56.995881: 0x7f7fbc0584f0virtual mdk::Player::~Player()64
flutter: mdk.INFO: 2023-08-26 11:23:56.995929: setNext from -1 url:
flutter: mdk.INFO: 2023-08-26 11:23:56.997339: default FrameReader0x7f7fbc003fa0 state: 0=>0=>0, 0
flutter: mdk.INFO: 2023-08-26 11:23:56.997420: default0x7f7fbc003fa0 virtual void mdk::FrameReader::stop(), current state: 0
flutter: mdk.INFO: 2023-08-26 11:23:57.005537: mdk::MediaPlayer::Private::~Private()
flutter: mdk.INFO: 2023-08-26 11:23:57.005644: 0x7f7fbc42abc0 virtual void mdk::MediaControlPush::setState(PlaybackState)@955 requested state 0=>0, current state 0. status: 0X80000000
flutter: mdk.INFO: 2023-08-26 11:23:57.005692: AudioBackendALSA ERROR@285>>> snd_pcm_pause(pcm_, value) (ffffffb3): 文件描述符处于错误状态
flutter: mdk.INFO: 2023-08-26 11:23:57.005735:
flutter: mdk.INFO: 2023-08-26 11:23:57.005773: virtual bool mdk::AudioBackendALSA::close() @214
flutter: mdk.INFO: 2023-08-26 11:23:57.005807: AudioBackendALSA ERROR@216>>> snd_pcm_drop(pcm_) (ffffffb3): 文件描述符处于错误状态
flutter: mdk.INFO: 2023-08-26 11:23:57.005843:
flutter: mdk.INFO: 2023-08-26 11:23:57.005874: default0x7f7fbc003fa0 deleting FrameReader...
flutter: mdk.INFO: 2023-08-26 11:23:57.005910: 0x7f7fbc242110 virtual void mdk::MediaControlPush::setState(PlaybackState)@955 requested state 0=>0, current state 0. status: 0
flutter: mdk.INFO: 2023-08-26 11:23:57.005947: AudioBackendALSA ERROR@285>>> snd_pcm_pause(pcm_, value) (ffffffb3): 文件描述符处于错误状态
flutter: mdk.INFO: 2023-08-26 11:23:57.005979:
flutter: mdk.INFO: 2023-08-26 11:23:57.006011: virtual bool mdk::AudioBackendALSA::close() @214
flutter: mdk.INFO: 2023-08-26 11:23:57.006043: AudioBackendALSA ERROR@216>>> snd_pcm_drop(pcm_) (ffffffb3): 文件描述符处于错误状态
flutter: mdk.INFO: 2023-08-26 11:23:57.006079:
flutter: mdk.INFO: 2023-08-26 11:23:57.006110: default0x7f7fbc004690 deleting FrameReader...
flutter: mdk.INFO: 2023-08-26 11:23:57.006140: player is destroyed
flutter: mdk.INFO: 2023-08-26 11:23:57.006181: mdk::VideoRenderer::Private::~Private() @121
http://localhost:8082/api/video 这个流有问题,能用ffplay播放吗?ffplay -v verbose http://localhost:8082/api/video
完全没问题
两个日志显示的格式不一样,一个是 mkv webm,一个是 mp4。你用ffprobe看下视频信息
哦,我临时改了下代码,我把后端代码改了一下,换成 mkv
package com.videoplaying.backend.controller
import com.videoplaying.backend.handler.NonStaticResourceHttpRequestHandler
import jakarta.servlet.http.HttpServletRequest
import jakarta.servlet.http.HttpServletResponse
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
import java.io.File
import java.io.RandomAccessFile
import java.nio.charset.StandardCharsets
import java.nio.file.Files
import java.nio.file.Paths
import kotlin.io.path.exists
@RestController
@RequestMapping("/video")
class FileRestController {
companion object {
const val bufferSize = 1024 * 1024
val logger = LoggerFactory.getLogger(FileRestController::class.java)
}
@GetMapping
fun videoPreview(request: HttpServletRequest, response: HttpServletResponse) {
response.reset()
val realpath = "/home/steiner/disk/windows-data/Download/777094d6da53444abd16ba519617cfca/平成假面骑士全收集/[16]驰骑-Drive(2014)/正剧TV/[Yumeki][Kamen Rider Drive][33][1080P][BDrip].mkv"
val file = File(realpath)
if (file.exists()) {
val mimetype = Files.probeContentType(file.toPath())
val randomAccessFile = RandomAccessFile(file, "r")
val filelength = file.length()
val rangeString = request.getHeader("Range")
var range = 0L
if (!rangeString.isBlank()) {
range = java.lang.Long.valueOf(rangeString.substring(rangeString.indexOf("=") + 1, rangeString.indexOf("-")))
}
val outputStream = response.outputStream
response.setHeader("Content-Type", "video/webm")
response.status = HttpServletResponse.SC_PARTIAL_CONTENT
randomAccessFile.seek(range)
val bytes = ByteArray(bufferSize)
val len = randomAccessFile.read(bytes)
response.setHeader("Content-Range", "bytes ${range}-${filelength - 1}/${filelength}")
outputStream.write(bytes, 0, len)
outputStream.close()
randomAccessFile.close()
logger.info("write range: ${range} - ${range + len}")
} else {
response.status = HttpServletResponse.SC_NOT_FOUND
response.characterEncoding = StandardCharsets.UTF_8.toString()
}
}
}
然后这是他的日志
2023-08-26T13:44:48.705+08:00 INFO 915388 --- [nio-8082-exec-1] c.v.b.controller.FileRestController : write range: 0 - 1048576
2023-08-26T13:44:48.709+08:00 INFO 915388 --- [nio-8082-exec-2] c.v.b.controller.FileRestController : write range: 41 - 1048617
然后这是 ffplay
的结果
这是 ffprobe
的结果
另外换成 mp4 视频就没有问题了 不过用 flutter 仍然出错
(flutter_frontend:916738): Gdk-CRITICAL **: 13:53:14.528: gdk_window_get_state: assertion 'GDK_IS_WINDOW (window)' failed
0.21.1 (git 402153b) - Multimedia Development Kit. Copyright (c) 2016-2023 WangBin(QtAV author) <wbsecg1 at gmail.com>
Build for: Linux x86_64; Clang16.0.6 (++20230610113458+7cbf1a259152-1~exp1~20230610233511.102)GCC4.2.1; libc++160006; 14:28:52 Jun 30 2023
Debug service listening on ws://127.0.0.1:45403/P23uliTRrqQ=/ws
Syncing files to device Linux...
flutter: mdk.INFO: 2023-08-26 13:53:15.283429: 0.21.1 (git 402153b) - Multimedia Development Kit. Copyright (c) 2016-2023 WangBin(QtAV author) <wbsecg1 at gmail.com>
Build for: Linux x86_64; Clang16.0.6 (++20230610113458+7cbf1a259152-1~exp1~20230610233511.102)GCC4.2.1; libc++160006; 14:28:52 Jun 30 2023
flutter: fvp.FINE: 2023-08-26 13:53:15.483733: 999708690 player139637038199952 create(http://localhost:8082/api/video)
Failed to open VDPAU backend libvdpau_nvidia.so: 无法打开共享对象文件: 没有那个文件或目录
Failed to open VDPAU backend libvdpau_nvidia.so: 无法打开共享对象文件: 没有那个文件或目录
flutter: mdk.INFO: 2023-08-26 13:53:15.796832: default0x7effc803a3a0 new FrameReader...
flutter: mdk.INFO: 2023-08-26 13:53:15.796921: Registered audio backends: ALSA OpenAL PulseAudio null
flutter: mdk.INFO: 2023-08-26 13:53:15.796961: ALSA device name: default
flutter: mdk.INFO: 2023-08-26 13:53:15.796995: ALSA device id: default
flutter: mdk.INFO: 2023-08-26 13:53:15.797028: ALSA subdevice name: default
flutter: mdk.INFO: 2023-08-26 13:53:15.797066: default0x7effc8039e40 new FrameReader...
flutter: mdk.INFO: 2023-08-26 13:53:15.797106: Registered audio backends: ALSA OpenAL PulseAudio null
flutter: mdk.INFO: 2023-08-26 13:53:15.797709: ALSA device name: default
flutter: mdk.INFO: 2023-08-26 13:53:15.798318: ALSA device id: default
flutter: mdk.INFO: 2023-08-26 13:53:15.798637: ALSA subdevice name: default
flutter: mdk.INFO: 2023-08-26 13:53:15.800629: 0x7effac070330mdk::Player::Player()
flutter: mdk.INFO: 2023-08-26 13:53:15.800755: default FrameReader0x7effc803a3a0 state: 0=>0=>0, 0
flutter: mdk.INFO: 2023-08-26 13:53:15.800822: default0x7effc803a3a0 virtual void mdk::FrameReader::stop(), current state: 0
flutter: mdk.INFO: 2023-08-26 13:53:15.800886: default FrameReader0x7effc803a3a0 state: 0=>0=>0, 0
flutter: mdk.INFO: 2023-08-26 13:53:15.800942: default0x7effc803a3a0 virtual void mdk::FrameReader::stop(), current state: 0
flutter: mdk.INFO: 2023-08-26 13:53:15.801139: AudioBackendALSA ERROR@285>>> snd_pcm_pause(pcm_, value) (ffffffb3): 文件描述符处于错误状态
flutter: mdk.INFO: 2023-08-26 13:53:15.801241:
flutter: mdk.INFO: 2023-08-26 13:53:15.801578: 0x7effc810a0c0 MediaControl.prepare(0, ...) http://localhost:8082/api/video
flutter: mdk.INFO: 2023-08-26 13:53:15.801666: default 0x7effc803a3a0 FrameReader.start(0, ...)
flutter: mdk.INFO: 2023-08-26 13:53:15.801724: default 0x7effc803a3a0 FrameReader::update MediaStatus 0=>0X2
flutter: fvp.FINE: 2023-08-26 13:53:15.804332: 999708690 player139637038199952 onMediaStatusChanged: MediaStatus(noMedia) => MediaStatus(+loading)
flutter: mdk.INFO: 2023-08-26 13:53:15.805491: default FrameReader0x7effc803a3a0 state: 0=>0=>1, 0
flutter: mdk.INFO: 2023-08-26 13:53:15.805633: default FrameReader0x7effc803a3a0 state: 0=>1=>1, 0
flutter: mdk.INFO: 2023-08-26 13:53:15.805704: start frame reader thread: 139635584923328
flutter: mdk.INFO: 2023-08-26 13:53:15.805768: try to load av module: /home/steiner/workspace/spring-scratch/viedo-playing/flutter_frontend/build/linux/x64/debug/bundle/lib/libffmpeg.so.6
flutter: mdk.INFO: 2023-08-26 13:53:15.805831: ffmpeg loaded: /home/steiner/workspace/spring-scratch/viedo-playing/flutter_frontend/build/linux/x64/debug/bundle/lib/libffmpeg.so.6
flutter: mdk.INFO: 2023-08-26 13:53:15.805892: Selected avformat runtime version: 60.9.100 (build: 60.9.100), license: LGPL version 2.1 or later
flutter: mdk.INFO: 2023-08-26 13:53:15.805948: Selected avformat runtime configuration: --extra-version=avbuild --disable-doc --disable-debug --disable-static --enable-shared --enable-runtime-cpudetect --enable-libvpl --enable-libdrm --disable-postproc --ranlib=llvm-ranlib-16 --nm=llvm-nm-16 --ar=llvm-ar-16 --nvcc=clang-16 --toolchain=hardened --enable-cross-compile --target-os=linux --arch=amd64 --pkg-config=pkg-config --sysroot='$SYSROOT' --cc=clang-16 --enable-lto --enable-pic --extra-cflags='-Wa,--noexecstack -fdata-sections -ffunction-sections -fstack-protector-strong -I/home/runner/work/avbuild/avbuild/tools/Vulkan-Headers/include -I=/usr/include/libdrm -I/tmp/dep/include -Wa,--noexecstack -fdata-sections -ffunction-sections -fstack-protector-strong --target=x86_64-linux-gnu' --extra-ldflags='-s -fuse-ld=lld -Wl,--gc-sections -Wl,--gc-sections --target=x86_64-linux-gnu' --extra-libs=-lrt --disable-stripping --enable-small --disable-outdevs --disable-filters --enable-filter='*null*,afade,*fifo,*format,*resample,aeval,allrgb,allyuv,atempo,pan,*bars,color,*key,crop,draw*,eq*,framerate,*_qsv,*_vaapi,*v4l2*,hw*,scale,volume,test*' --disable-muxers --disable-encoders --disable-decoders --disable-demuxers --enable-wolfssl --enable-decoder='*sub*,movtext,*web*,aac*,*ac3*,alac*,ape,ass,av1*,ccaption,cook,dca,dnxhd,eac3*,exr,truehd,ff*,*yuv*,flv,flac,gif,h26[3-4]*,hevc*,hap,mp[1-3]*,prores,*peg*,mlp,mpl2,nellymoser,opus,pcm*,qtrle,*png*,tiff,rawvideo,sami,srt,ssa,v210*,vc1*,vorbis,vp[6-9]*,wm*,wrapped_avframe,rv*' --enable-demuxer='*sub*,*ac3,*ac,*peg*,*web*,ape,ass,avi,concat,dnxhd,dts*,*dash*,*flv,gif,hls,h264,hevc,kux,matroska,mov,mp3,mxf,ogg,pcm*,rawvideo,rt*p,spdif,srt,vc1,v210*,wav,*pipe,image2,mlv,nsv,nut' --enable-encoder='aac,dnxhd,exr,ff*,*yuv*,gif,h26[3-4]*,av1*,hevc*,mjpeg*,*png,opus,pcm*,prores*,rawvideo,spdif,speedhq,*jpeg,*png,tiff,vp[8-9]*,wrapped_avframe,*nvenc,*qsv,*v4l2m2m,*vaapi,vorbis' --enable-muxer='*jpeg,dnxhd,fifo,flv,gif,hls,h264,hevc,image2,mov,mp4,mpegts,matroska,null,og*,pcm*,rawvideo,spdif,*pipe,*segment,webm,wav,dash,nu*'
flutter: mdk.INFO: 2023-08-26 13:53:15.806032: avformat_version0x7eff6b78b900
flutter: mdk.INFO: 2023-08-26 13:53:15.806094: Trying MediaIO FFmpeg for protocol "http"
flutter: mdk.INFO: 2023-08-26 13:53:15.806156: 0x7eff64001b00 open url: http://localhost:8082/api/video
flutter: mdk.INFO: 2023-08-26 13:53:15.806219: 0x7eff64001b00 url opened
flutter: mdk.INFO: 2023-08-26 13:53:15.806280: default 0x7effc803a3a0 FrameReader::update MediaStatus 0X2=>0X2
flutter: mdk.INFO: 2023-08-26 13:53:15.806342: Selected avcodec runtime version: 60.21.100 (build: 60.21.100), license: LGPL version 2.1 or later
flutter: mdk.INFO: 2023-08-26 13:53:15.806402: av_packet_alloc0x7eff6b5e11ca
flutter: mdk.INFO: 2023-08-26 13:53:15.806459: Selected avutil runtime version: 58.13.101 (build: 58.13.101), license: LGPL version 2.1 or later
flutter: mdk.INFO: 2023-08-26 13:53:15.806510: av_dict_copy0x7eff6b863dc8
flutter: mdk.INFO: 2023-08-26 13:53:15.806557: before avformat_open_input. io: 0x7eff64001b00(FFmpeg/pb: 0x7eff64014600, url: http://localhost:8082/api/video
flutter: mdk.INFO: 2023-08-26 13:53:15.806615: FFmpeg/Libav runtime git-2023-06-27-9b6d191-avbuild
flutter: mdk.INFO: 2023-08-26 13:53:15.806674: after avformat_open_input. pb: 0x7eff64014600, iformat: 0x7eff6b95df18 context flags: 2097280, input format flags: 67141640
flutter: mdk.INFO: 2023-08-26 13:53:15.806732: supports 205 ffmpeg sw pixel formats. unsupported: uyyvyy411 x2rgb10be x2bgr10be p212be p212le p412be p412le
flutter: mdk.INFO: 2023-08-26 13:53:15.806795: Format: mov,mp4,m4a,3gp,3g2,mj2, range: 0 +28467ms, bitrate: 2503072, size: 0
Metadata:
encoder: Lavf59.27.100
minor_version: 512
compatible_brands: isomiso2avc1mp41
major_brand: isom
Streams: 2
Video:
stream#0, range: 0 +28467ms, frames: 854
codec: h264 tag: 'avc1' profile: 100 level: 31, yuv420p, bpc:8, bpp:12(8,8,8), channels:(1,1,1), map: 0 1 2 0, bitrate: 2491655, 1280x720, fps: 30, bframes: 2, primaries: bt709, trc: bt709, matrix: bt709, range: narrow
extra data(47): 01 64 00 1F FF E1 00 1C 67 64 00 1F AC D9 40 50 05 BB 01 6A 02 02 02 80 00 00 03 00 80 00 00 1E 47 8C 18 CB 01 00 04 68 EF BC B0 FD F8 F8 00
Metadata:
handler_name: VideoHandler
vendor_id: [0][0][0][0]
language: und
Audio:
stream#1, range: 0 +28416ms, frames: 1332
codec: aac tag: 'mp4a' profile: 1 level: -99, sample size: 0/16, block align: 0, frame_size: 1024, f32p stereo(2) @48000Hz, bitrate: 2273
extra data(5): 11 90 56 E5 00
Metadata:
handler_name: SoundHandler
vendor_id: [0][0][0][0]
language: und
flutter: mdk.INFO: 2023-08-26 13:53:15.806872: default FrameReader0x7effc803a3a0 request to pause 1, loaded: 0.
flutter: mdk.INFO: 2023-08-26 13:53:15.806932: default FrameReader0x7effc803a3a0 state: 0=>1=>2, 0
flutter: mdk.INFO: 2023-08-26 13:53:15.806989: default FrameReader0x7effc803a3a0 state requested: 2, current: 0
flutter: mdk.INFO: 2023-08-26 13:53:15.807050: AudioBackendALSA ERROR@285>>> snd_pcm_pause(pcm_, value) (ffffffb3): 文件描述符处于错误状态
flutter: mdk.INFO: 2023-08-26 13:53:15.807106:
flutter: mdk.INFO: 2023-08-26 13:53:15.807156: 0x7effc810a0c0 prepared callback is invoked
flutter: mdk.INFO: 2023-08-26 13:53:15.807318: default 0x7effc803a3a0 FrameReader::update MediaStatus 0X2=>0X4
flutter: fvp.FINE: 2023-08-26 13:53:15.819461: 999708690 player139637038199952 onMediaStatusChanged: MediaStatus(+loading) => MediaStatus(+loaded)
flutter: mdk.INFO: 2023-08-26 13:53:15.822044: ***buffering progress 0%***
flutter: mdk.INFO: 2023-08-26 13:53:15.822174: default 0x7effc803a3a0 FrameReader::update MediaStatus 0X4=>0X14
flutter: mdk.INFO: 2023-08-26 13:53:15.822254: AudioBackendALSA ERROR@285>>> snd_pcm_pause(pcm_, value) (ffffffb3): 文件描述符处于错误状态
flutter: mdk.INFO: 2023-08-26 13:53:15.822334:
flutter: fvp.FINE: 2023-08-26 13:53:15.822440: 999708690 player139637038199952 onMediaStatusChanged: MediaStatus(+loaded) => MediaStatus(+loaded+buffering)
flutter: mdk.INFO: 2023-08-26 13:53:15.822604: ++++++++++++BUFFERING START++++++++++++
flutter: mdk.INFO: 2023-08-26 13:53:15.822679:
flutter: fvp.FINE: 2023-08-26 13:53:15.823345: 999708690 player139637038199952 onEvent: reader.buffering 0
flutter: mdk.INFO: 2023-08-26 13:53:15.824362: default FrameReader0x7effc803a3a0 state: 0=>2=>1, 1
flutter: mdk.INFO: 2023-08-26 13:53:15.824464: default FrameReader0x7effc803a3a0 update state: 0=>1
flutter: fvp.FINE: 2023-08-26 13:53:15.824903: 999708690 player139637038199952 onPlaybackStateChanged: PlaybackState.stopped => PlaybackState.playing
flutter: mdk.INFO: 2023-08-26 13:53:15.825041: default FrameReader0x7effc803a3a0 state: 1=>1=>2, 1
flutter: mdk.INFO: 2023-08-26 13:53:15.825112: default FrameReader0x7effc803a3a0 update state: 1=>2
flutter: fvp.FINE: 2023-08-26 13:53:15.825187: 999708690 player139637038199952 onPlaybackStateChanged: PlaybackState.playing => PlaybackState.paused
flutter: mdk.INFO: 2023-08-26 13:53:15.825252: starting decode loop thread mdk.vdec0@139635574961856
flutter: fvp.FINE: 2023-08-26 13:53:15.825317: 999708690 player139637038199952 onEvent: thread.video 1
flutter: mdk.INFO: 2023-08-26 13:53:15.825376: video stream#0 starting decoding loop from decoder index 0...
flutter: mdk.INFO: 2023-08-26 13:53:15.825434: creating video decoder: VAAPI...
flutter: mdk.INFO: 2023-08-26 13:53:15.825489: opening video decoder: VAAPI...
flutter: mdk.INFO: 2023-08-26 13:53:15.825547: starting decode loop thread mdk.adec1@139635474822848
flutter: mdk.INFO: 2023-08-26 13:53:15.825613: opening ffmpeg video decoder: h264 ...
flutter: fvp.FINE: 2023-08-26 13:53:15.825676: 999708690 player139637038199952 onEvent: thread.audio 1
flutter: mdk.INFO: 2023-08-26 13:53:15.825741: audio stream#1 starting decoding loop from decoder index 0...
flutter: mdk.INFO: 2023-08-26 13:53:15.825799: creating audio decoder: auto...
flutter: mdk.INFO: 2023-08-26 13:53:15.825857: opening audio decoder: FFmpeg...
flutter: mdk.INFO: 2023-08-26 13:53:15.825918: opening ffmpeg audio decoder: aac ...
flutter: mdk.INFO: 2023-08-26 13:53:15.825981: trying va from x11 display: (nil)
flutter: mdk.INFO: 2023-08-26 13:53:15.826039: AVCodec.Audio[aac.] decoder: 1 Single threads
flutter: mdk.INFO: 2023-08-26 13:53:15.826097: aac f32p, stereo @48000Hz
flutter: fvp.FINE: 2023-08-26 13:53:15.826165: 999708690 player139637038199952 onEvent: decoder.audio 0
flutter: mdk.INFO: 2023-08-26 13:53:15.826225: ***buffering progress 100%***
flutter: mdk.INFO: 2023-08-26 13:53:15.826280: default 0x7effc803a3a0 FrameReader::update MediaStatus 0X14=>0X124
flutter: mdk.INFO: 2023-08-26 13:53:15.826339: AudioBackendALSA ERROR@285>>> snd_pcm_pause(pcm_, value) (ffffffb3): 文件描述符处于错误状态
flutter: mdk.INFO: 2023-08-26 13:53:15.826505:
flutter: fvp.FINE: 2023-08-26 13:53:15.826604: 999708690 player139637038199952 onMediaStatusChanged: MediaStatus(+loaded+buffering) => MediaStatus(+loaded+prepared+buffered)
flutter: mdk.INFO: 2023-08-26 13:53:15.826718: ++++++++++++BUFFERING END++++++++++++
flutter: mdk.INFO: 2023-08-26 13:53:15.826778:
flutter: fvp.FINE: 2023-08-26 13:53:15.826850: 999708690 player139637038199952 onEvent: reader.buffering 100
flutter: mdk.INFO: 2023-08-26 13:53:15.826945: audio stream#1 sending 1 invalid AOT frame @0.000000s. seeking: 0
flutter: mdk.INFO: 2023-08-26 13:53:15.827007: 0x7effc810a0c0 1st audio frame @0.000000
flutter: mdk.INFO: 2023-08-26 13:53:15.827062: 0x7effc810a0c0 seek end audio frame @0.000000 seek_pos_: -1, sync_ao_ 1
flutter: mdk.INFO: 2023-08-26 13:53:15.827117: open x11 display: :1, result: 0x7eff600c2d00
flutter: mdk.INFO: 2023-08-26 13:53:15.827178: use internal x11 display: 0x7eff600c2d00
flutter: mdk.INFO: 2023-08-26 13:53:15.827226: Selected avfilter runtime version: 9.8.102 (build: 9.8.102), license: LGPL version 2.1 or later
flutter: mdk.INFO: 2023-08-26 13:53:15.827277: AudioRenderer format: f32, stereo @48000Hz, requested: f32p, stereo @48000Hz
flutter: mdk.INFO: 2023-08-26 13:53:15.827336: AudioRenderer format changed and reinitialize
flutter: mdk.INFO: 2023-08-26 13:53:15.827392: virtual bool mdk::AudioBackendALSA::close() @214
flutter: mdk.INFO: 2023-08-26 13:53:15.827449: AudioBackendALSA ERROR@216>>> snd_pcm_drop(pcm_) (ffffffb3): 文件描述符处于错误状态
flutter: mdk.INFO: 2023-08-26 13:53:15.827506:
flutter: mdk.INFO: 2023-08-26 13:53:15.827561: 0x7eff600c2770 VA-API INFO: VA-API version 1.19.0
flutter: mdk.INFO: 2023-08-26 13:53:15.827617: buffer time(us): 1000~10922667, period time(us): 333~3640896, perdiods: 3~1024
flutter: mdk.INFO: 2023-08-26 13:53:15.827672: snd_pcm_hw_params_set_buffer_time_near 85328
flutter: mdk.INFO: 2023-08-26 13:53:15.827727: snd_pcm_hw_params_set_buffer_time_near ret 85333
flutter: mdk.INFO: 2023-08-26 13:53:15.827779: buffer_size dt: 5333, request periods: 16
flutter: mdk.INFO: 2023-08-26 13:53:15.827833: snd_pcm_hw_params_set_periods_near 16
flutter: mdk.INFO: 2023-08-26 13:53:15.827891: snd_pcm_hw_params_set_periods_near ret 16
flutter: mdk.INFO: 2023-08-26 13:53:15.827947: 0x7eff600c2770 VA-API INFO: Trying to open /usr/lib/dri/iHD_drv_video.so
flutter: mdk.INFO: 2023-08-26 13:53:15.828003: 0x7eff600c2770 VA-API INFO: va_openDriver() returns -1
flutter: mdk.INFO: 2023-08-26 13:53:15.828057: 0x7eff600c2770 VA-API INFO: Trying to open /usr/lib/dri/i965_drv_video.so
flutter: mdk.INFO: 2023-08-26 13:53:15.828111: 0x7eff600c2770 VA-API INFO: va_openDriver() returns -1
flutter: mdk.INFO: 2023-08-26 13:53:15.828167: VA-API error@455. ret = vaInitialize(display_, &v[0], &v[1]): 0xffffffff unknown libva error
flutter: mdk.INFO: 2023-08-26 13:53:15.828222: trying va display from drm fd
flutter: mdk.INFO: 2023-08-26 13:53:15.828275: trying to open a default drm fd
flutter: mdk.INFO: 2023-08-26 13:53:15.828327: DRM driver 1.6.0. i915; Intel Graphics
flutter: mdk.INFO: 2023-08-26 13:53:15.828378: DRM lib 1.3.0. (null); (null)
flutter: mdk.INFO: 2023-08-26 13:53:15.828433: 0x7eff600c2770 VA-API INFO: VA-API version 1.19.0
flutter: mdk.INFO: 2023-08-26 13:53:15.828489: 0x7eff600c2770 VA-API INFO: Trying to open /usr/lib/dri/iHD_drv_video.so
flutter: mdk.INFO: 2023-08-26 13:53:15.828556: 0x7eff600c2770 VA-API INFO: va_openDriver() returns -1
flutter: mdk.INFO: 2023-08-26 13:53:15.828609: 0x7eff600c2770 VA-API INFO: Trying to open /usr/lib/dri/i965_drv_video.so
flutter: mdk.INFO: 2023-08-26 13:53:15.828661: 0x7eff600c2770 VA-API INFO: va_openDriver() returns -1
flutter: mdk.INFO: 2023-08-26 13:53:15.828713: VA-API error@455. ret = vaInitialize(display_, &v[0], &v[1]): 0xffffffff unknown libva error
flutter: mdk.INFO: 2023-08-26 13:53:15.828769: Error avrt::av_hwdevice_ctx_init(hw_device_ctx_) @671 /home/runner/work/mdk-sdk/mdk-sdk/mdk/ffmpeg/plugin/VideoDecoderAVCodec.cpp: (0xfffffffb) 输入/输出错误
flutter: mdk.INFO: 2023-08-26 13:53:15.828826: VA-API error@345. vaTerminate(display_): 0x3 invalid VADisplay
flutter: mdk.INFO: 2023-08-26 13:53:15.828875: 0x7eff600c2860UGL::opengl::Context::Local<va::VAAPIBufferPool::ctx_res_t>::~Local() [T = va::VAAPIBufferPool::ctx_res_t, DT = va::VAAPIBufferPool::ctx_res_t]0x1 count: 0
flutter: mdk.INFO: 2023-08-26 13:53:15.828949: 0x7eff600c2940UGL::opengl::Context::Local<mdk::DrmEGLInterop::Private::ctx_res_t>::~Local() [T = mdk::DrmEGLInterop::Private::ctx_res_t, DT = mdk::DrmEGLInterop::Private::ctx_res_t](nil) count: 0
flutter: mdk.INFO: 2023-08-26 13:53:15.829005: 0x7eff600c2770virtual mdk::NativeVideoBufferPool::~NativeVideoBufferPool()
flutter: mdk.INFO: 2023-08-26 13:53:15.829057: creating video decoder: CUDA...
flutter: mdk.INFO: 2023-08-26 13:53:15.829105: failed to load libcuda.so.1
flutter: mdk.INFO: 2023-08-26 13:53:15.829154: failed to load libcuda.so.1
flutter: mdk.INFO: 2023-08-26 13:53:15.829199: operator()854 cuInit(0) CUDA ERROR: 3 ?; ?
flutter: mdk.INFO: 2023-08-26 13:53:15.829245:
flutter: mdk.INFO: 2023-08-26 13:53:15.829291: opening video decoder: CUDA...
flutter: mdk.INFO: 2023-08-26 13:53:15.829342: CUDA buffer pool is not available
flutter: mdk.INFO: 2023-08-26 13:53:15.829394: creating video decoder: VDPAU...
flutter: mdk.INFO: 2023-08-26 13:53:15.829446: opening video decoder: VDPAU...
flutter: mdk.INFO: 2023-08-26 13:53:15.829498: opening ffmpeg video decoder: h264 ...
flutter: mdk.INFO: 2023-08-26 13:53:15.829547: [FFmpeg:mov,mp4,m4a,3gp,3g2,mj2] Packet corrupt (stream = 0, dts = 51712)
flutter: mdk.INFO: 2023-08-26 13:53:15.829600: [FFmpeg:mov,mp4,m4a,3gp,3g2,mj2] .
flutter: mdk.INFO: 2023-08-26 13:53:15.829650: [FFmpeg:mov,mp4,m4a,3gp,3g2,mj2] stream 1, offset 0x1014f8: partial file
flutter: mdk.INFO: 2023-08-26 13:53:15.829701: default 0x7effc803a3a0 FrameReader::update MediaStatus 0X124=>0X164
flutter: fvp.FINE: 2023-08-26 13:53:15.829795: 999708690 player139637038199952 onMediaStatusChanged: MediaStatus(+loaded+prepared+buffered) => MediaStatus(+loaded+prepared+buffered+end)
flutter: mdk.INFO: 2023-08-26 13:53:15.829881: read packet error. FrameReader@0x7effc803a3a0 sending Packet::End to all packet queues. PacketIO@0x7eff64001500 ->url: http://localhost:8082/api/video
flutter: mdk.INFO: 2023-08-26 13:53:15.829940: #video stream#0 wait for decode loop started
flutter: mdk.INFO: 2023-08-26 13:53:15.830: VDPAU ERROR@194>>> create(xdisplay_, XDefaultScreen(xdisplay_), &device_, &resolver_) (1): initialized error
flutter: mdk.INFO: 2023-08-26 13:53:15.830065:
flutter: mdk.INFO: 2023-08-26 13:53:15.830118: [FFmpeg:AVHWDeviceContext] VDPAU device creation on X11 display :1 failed.
flutter: mdk.INFO: 2023-08-26 13:53:15.830172: Error avrt::av_hwdevice_ctx_create(&hw_device_ctx_, dev_type_, dev_name, opts, 0) @686 /home/runner/work/mdk-sdk/mdk-sdk/mdk/ffmpeg/plugin/VideoDecoderAVCodec.cpp: (0xb1b4b1ab) Unknown error occurred
flutter: mdk.INFO: 2023-08-26 13:53:15.830227: 0x7eff60004ce0UGL::opengl::Context::Local<mdk::VDPAUBufferPool::ctx_res_t>::~Local() [T = mdk::VDPAUBufferPool::ctx_res_t, DT = mdk::VDPAUBufferPool::ctx_res_t]0x2 count: 0
flutter: mdk.INFO: 2023-08-26 13:53:15.830280: 0x7eff60004b70virtual mdk::NativeVideoBufferPool::~NativeVideoBufferPool()
flutter: mdk.INFO: 2023-08-26 13:53:15.830341: creating video decoder: FFmpeg...
flutter: mdk.INFO: 2023-08-26 13:53:15.830393: opening video decoder: FFmpeg...
flutter: mdk.INFO: 2023-08-26 13:53:15.830443: opening ffmpeg video decoder: h264 ...
flutter: mdk.INFO: 2023-08-26 13:53:15.830494: AVCodec.Video[h264.] decoder: 9 Frame threads
flutter: mdk.INFO: 2023-08-26 13:53:15.830545: h264 yuv420p, bpc:8, bpp:12(8,8,8), channels:(1,1,1), map: 0 1 2 0 1280x720
flutter: fvp.FINE: 2023-08-26 13:53:15.830610: 999708690 player139637038199952 onEvent: decoder.video 0
flutter: mdk.INFO: 2023-08-26 13:53:15.830664: decode stored recovery packets: 0
flutter: mdk.INFO: 2023-08-26 13:53:15.830716: 0x7effc803a3a0 #video stream#0 end semaphore acquire
flutter: mdk.INFO: 2023-08-26 13:53:15.830768: h264 codec pixel format list: (expected yuv420p)
flutter: mdk.INFO: 2023-08-26 13:53:15.830819: vdpau
flutter: mdk.INFO: 2023-08-26 13:53:15.830871: vulkan
flutter: mdk.INFO: 2023-08-26 13:53:15.830920: cuda
flutter: mdk.INFO: 2023-08-26 13:53:15.830969: vaapi
flutter: mdk.INFO: 2023-08-26 13:53:15.831018: yuv420p (selected)
flutter: mdk.INFO: 2023-08-26 13:53:15.831067: yuv420p using avcodec software decoder...
flutter: mdk.INFO: 2023-08-26 13:53:15.831117: video stream#0 sending 1 invalid AOT frame @0.000000s. seeking: 0
flutter: mdk.INFO: 2023-08-26 13:53:15.831170: 0x7effc810a0c0 1st video frame to render @0.000000s, sync time: 0.000000
flutter: mdk.INFO: 2023-08-26 13:53:15.831220: 0-track seek end video frame @0.000000 seek_pos_: -1
flutter: mdk.INFO: 2023-08-26 13:53:15.831271: 0x7effc810a0c0 1st video frame to render @0.000000s, sync time: 0.000000
flutter: mdk.INFO: 2023-08-26 13:53:15.831320: period size: 256, time: 5333
flutter: mdk.INFO: 2023-08-26 13:53:15.831437: Using audio backend: ALSA
flutter: mdk.INFO: 2023-08-26 13:53:15.831510: 0x7effc810a0c0 ao opened: 1, reopen: 1, bad ao: 0
flutter: mdk.INFO: 2023-08-26 13:53:15.831585: 0x7eff580a08a8 filter graph:
flutter: mdk.INFO: 2023-08-26 13:53:15.831641: +-----------+
| src |default--[48000Hz fltp:stereo]--swr:default
| (abuffer) |
+-----------+
+---------------+
swr:default--[48000Hz flt:stereo]--default| dst |
| (abuffersink) |
+---------------+
+-------------+
src:default--[48000Hz fltp:stereo]--default| swr |default--[48000Hz flt:stereo]--dst:default
| (aresample) |
+-------------+
flutter: mdk.INFO: 2023-08-26 13:53:15.831707: failed to queueBuffer or write data
flutter: mdk.INFO: 2023-08-26 13:53:15.831768: bad delay. written: 80 - delay = -3
flutter: mdk.INFO: 2023-08-26 13:53:15.831825: bad delay. written: 80 - delay = -3
flutter: mdk.INFO: 2023-08-26 13:53:15.831879: >>>>>>>>1st audio frame (after seek) rendered: 1, ao: 80, a: 0, delta: 80 +0.021333
flutter: mdk.INFO: 2023-08-26 13:53:15.885858: setLoop(0), now 0/0
flutter: mdk.INFO: 2023-08-26 13:53:15.885955: 0x7effc810a0c0 virtual void mdk::MediaControlPush::setState(PlaybackState)@955 requested state 2=>2, current state 2. status: 0X164
flutter: mdk.INFO: 2023-08-26 13:53:15.886011: AudioBackendALSA ERROR@285>>> snd_pcm_pause(pcm_, value) (ffffffb3): 文件描述符处于错误状态
flutter: mdk.INFO: 2023-08-26 13:53:15.886067:
flutter: mdk.INFO: 2023-08-26 13:53:15.886119: default FrameReader0x7effc803a3a0 request to pause 1, loaded: 4.
flutter: mdk.INFO: 2023-08-26 13:53:15.886184: default FrameReader0x7effc803a3a0 state: 2=>2=>2, 0
t corrupt (stream = 0, dts = 51712)
flutter: mdk.INFO: 2023-08-26 13:53:15.829600: [FFmpeg:mov,mp4,m4a,3gp,3g2,mj2] .
flutter: mdk.INFO: 2023-08-26 13:53:15.829650: [FFmpeg:mov,mp4,m4a,3gp,3g2,mj2] stream 1, offset 0x1014f8: partial file
flutter: mdk.INFO: 2023-08-26 13:53:15.829701: default 0x7effc803a3a0 FrameReader::update MediaStatus 0X124=>0X164
flutter: fvp.FINE: 2023-08-26 13:53:15.829795: 999708690 player139637038199952 onMediaStatusChanged: MediaStatus(+loaded+prepared+buffered) => MediaStatus(+loaded+prepared+buffered+end)
flutter: mdk.INFO: 2023-08-26 13:53:15.829881: read packet error. FrameReader@0x7effc803a3a0 sending Packet::End to all packet queues. PacketIO@0x7eff64001500 ->url: http://localhost:8082/api/video
流有问题,解复用出错。ffplay出错后会检查io错误决定是否停止,你前面的截图也显示了很多partial file错误。mpv会尝试10次。我是立即停止。你可以试下mpv什么结果,连续10次partial file错误估计也是播不了了。
另外你运行下vainfo命令看看输出什么。
steiner@nesteiner ~/d/e/mdk-sdk> vainfo
Trying display: wayland
vaInitialize failed with error code -1 (unknown libva error),exit
我看了下,确实是后端的流有问题
teiner@nesteiner ~/d/e/mdk-sdk> mpv http://localhost:8082/api/video
(+) Video --vid=1 (*) (h264 1280x720 30.000fps)
(+) Audio --aid=1 (*) (aac 2ch 48000Hz)
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: Packet corrupt (stream = 0, dts = 51712).
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: stream 1, offset 0x1014f8: partial file
AO: [pipewire] 48000Hz stereo 2ch floatp
VO: [gpu] 1280x720 yuv420p
AV: 00:00:03 / 00:00:28 (11%) A-V: 0.000 Cache: 0.0s/8KB
[ffmpeg/video] h264: Invalid NAL unit size (10377 > 5057).
[ffmpeg/video] h264: Error splitting the input into NAL units.
AV: 00:00:03 / 00:00:28 (11%) A-V: 0.000 Cache: 0.0s
Error while decoding frame!
AV: 00:00:03 / 00:00:28 (12%) A-V: 0.000 Cache: 0.0s
Exiting... (End of file)
有没有可以参考的代码,我抄一炒 另外我想问一下,为什么在 flutter web 端没有这个问题
可能chrome也是碰到错误忽略掉了
看了下日志,没有显示错误啊,另外我用 vue 做的播放器界面完全没问题,不会像 mpv 那样播到一部分直接退出
<template>
<div class="video">
<video-player controls class="video-player" :options="videoPlayerOptions"/>
</div>
</template>
<script lang="ts" setup>
import { VideoPlayer } from '@videojs-player/vue';
import "video.js/dist/video-js.css"
import { computed } from 'vue';
const filetype = "mp4"
const src = "http://localhost:8082/api/video"
const videoPlayerOptions = computed(() => {
return {
playerbackRates: [0.75, 1.0, 1.25, 1.5, 2.0],
autoplay: false,
muted: false,
loop: false,
preload: "auto",
language: "zh-CN",
aspectRatio: "16:9",
fluid: true,
flash: {hls: {withCreadentials: false}},
html5: {hls: {withCreadentials: false}},
sources: [{
type: `video/${filetype}`,
src: src
}],
notSupportedMessage: "fuck...",
controlBar: {
timeDivider: true,
durationDisplay: true,
remainingTimeDisplay: false,
fullscreenToggale: true
},
}
})
</script>
<style lang="scss" scoped>
div.video {
border: 1px solid black;
width: 300px;
height: 300px;
}
</style>
我现在搞不清楚是哪里出了问题
没问题的那些都是靠chrome的视频播放功能实现的。你可以试试vlc看看有没有错误
不行,有错误
看来确实是后端的问题,我不知道怎么解决
你这是直播还是点播?直播的话对格式有要求的
啊,你看看我的后端代码,我就是将一个本地视频放到网络上啊,让其他设备通过网络访问到视频,我也不知道什么是直播还是点播
啊,你看看我的后端代码,我就是将一个本地视频放到网络上啊,让其他设备通过网络访问到视频,我也不知道什么是直播还是点播
你把视频放到外网来,大家才能帮你检查,你这样不把源放出来,其他人根本没法帮你测试!
啊,你看看我的后端代码,我就是将一个本地视频放到网络上啊,让其他设备通过网络访问到视频,我也不知道什么是直播还是点播
浏览器里如果可以随意拖进度条就是点播,不能的话是直播
可以随意拖进度条,另外你能不能给我个点播的视频地址,我去测试下,要国内的
issue里有几个地址你找找看
卧槽,费了老大劲,终于把后端修好了,原来不是前端的问题啊,抱歉打扰你那么多时间 :slightly_smiling_face:
作者大大你好,我的开发环境是 arch linux ,这是我的代码
这是我在
flutter run -d linux
时遇到的错误另外如果不用这个
fvp
包,在 web 上运行时是正常的,我想问问哪里出了问题