Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pushing H265 video stream data to the open source ZLMediaKit streaming server, using ffplay to play an error Could not find ref witch POC 18 #1553

Open
sheng930920 opened this issue Aug 23, 2024 · 3 comments

Comments

@sheng930920
Copy link

sheng930920 commented Aug 23, 2024

Describe the bug
When pushing H265 video stream data to the open source ZLMediaKit streaming server, an error occurred when playing with ffplay: Could not find ref witch POC 18, but a distorted screen appeared in front when playing with ffplay,And the video stream cannot be played using VLC player

image image

The following is the H265 video stream data saved for streaming
h265.zip

Decoding information viewed using ffplay's debug mode

liqishengdeMacBook-Pro:~ liqisheng$ 
liqishengdeMacBook-Pro:~ liqisheng$ ffplay -loglevel debug rtmp://192.168.100.8:1935/live/2345
ffplay version 7.0.1 Copyright (c) 2003-2024 the FFmpeg developers
  built with Apple clang version 15.0.0 (clang-1500.1.0.2.5)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/7.0.1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox
  libavutil      59.  8.100 / 59.  8.100
  libavcodec     61.  3.100 / 61.  3.100
  libavformat    61.  1.100 / 61.  1.100
  libavdevice    61.  1.100 / 61.  1.100
  libavfilter    10.  1.100 / 10.  1.100
  libswscale      8.  1.100 /  8.  1.100
  libswresample   5.  1.100 /  5.  1.100
  libpostproc    58.  1.100 / 58.  1.100
Initialized metal renderer.
[AVFormatContext @ 0x7f7eb8722f80] Opening 'rtmp://192.168.100.8:1935/live/2345' for reading
[rtmp @ 0x7f7eb8715100] No default whitelist set
[tcp @ 0x7f7eb911f780] No default whitelist set
[tcp @ 0x7f7eb911f780] Original list of addresses:
[tcp @ 0x7f7eb911f780] Address 192.168.100.8 port 1935
[tcp @ 0x7f7eb911f780] Interleaved list of addresses:
[tcp @ 0x7f7eb911f780] Address 192.168.100.8 port 1935
[tcp @ 0x7f7eb911f780] Starting connection attempt to 192.168.100.8 port 1935
[tcp @ 0x7f7eb911f780] Successfully connected to 192.168.100.8 port 1935
[rtmp @ 0x7f7eb8715100] Handshaking...
[rtmp @ 0x7f7eb8715100] Type answer 3
[rtmp @ 0x7f7eb8715100] Server version 4.5.0.1
[rtmp @ 0x7f7eb8715100] Proto = rtmp, path = /live/2345, app = live, fname = 2345
[rtmp @ 0x7f7eb8715100] New incoming chunk size = 60000
[rtmp @ 0x7f7eb8715100] Window acknowledgement size = 5000000
[rtmp @ 0x7f7eb8715100] Max sent, unacked = 5000000
[rtmp @ 0x7f7eb8715100] Creating stream...
[rtmp @ 0x7f7eb8715100] Sending play command for '2345'
[flv @ 0x7f7eb8722f80] Format flv probed with size=2048 and score=100
[flv @ 0x7f7eb8722f80] Before avformat_find_stream_info() pos: 13 bytes read:39706 seeks:0 nb_streams:0
[flv @ 0x7f7eb8722f80] Unknown type onStatus
[NULL @ 0x7f7eb9004d40] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0
[NULL @ 0x7f7eb9004d40] Decoding VPS
[NULL @ 0x7f7eb9004d40] Main profile bitstream
[NULL @ 0x7f7eb9004d40] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0
[NULL @ 0x7f7eb9004d40] Decoding SPS
[NULL @ 0x7f7eb9004d40] Main profile bitstream
[NULL @ 0x7f7eb9004d40] Decoding VUI
[NULL @ 0x7f7eb9004d40] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0
[NULL @ 0x7f7eb9004d40] Decoding PPS
[NULL @ 0x7f7eb9004d40] NALFF: Consumed only 25 bytes instead of 39145
[NULL @ 0x7f7eb9004d40] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0
[NULL @ 0x7f7eb9004d40] NALFF: Consumed only 46 bytes instead of 39117
[NULL @ 0x7f7eb9004d40] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0
[NULL @ 0x7f7eb9004d40] NALFF: Consumed only 8 bytes instead of 39068
[NULL @ 0x7f7eb9004d40] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0
[NULL @ 0x7f7eb9004d40] nal_unit_type: 19(IDR_W_RADL), nuh_layer_id: 0, temporal_id: 0
[NULL @ 0x7f7eb9004d40] Decoding VPS
[NULL @ 0x7f7eb9004d40] Main profile bitstream
[NULL @ 0x7f7eb9004d40] Decoding SPS
[NULL @ 0x7f7eb9004d40] Main profile bitstream
[NULL @ 0x7f7eb9004d40] Decoding VUI
[NULL @ 0x7f7eb9004d40] Decoding PPS
[hevc @ 0x7f7eb9004d40] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] Decoding VPS
[hevc @ 0x7f7eb9004d40] Main profile bitstream
[hevc @ 0x7f7eb9004d40] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] Decoding SPS
[hevc @ 0x7f7eb9004d40] Main profile bitstream
[hevc @ 0x7f7eb9004d40] Decoding VUI
[hevc @ 0x7f7eb9004d40] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] Decoding PPS
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
    Last message repeated 10 times
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
    Last message repeated 1 times
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
    Last message repeated 3 times
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] NALFF: Consumed only 25 bytes instead of 39133
[hevc @ 0x7f7eb9004d40] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] NALFF: Consumed only 46 bytes instead of 39105
[hevc @ 0x7f7eb9004d40] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] NALFF: Consumed only 8 bytes instead of 39056
[hevc @ 0x7f7eb9004d40] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 19(IDR_W_RADL), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] Decoding VPS
[hevc @ 0x7f7eb9004d40] Main profile bitstream
[hevc @ 0x7f7eb9004d40] Decoding SPS
[hevc @ 0x7f7eb9004d40] Main profile bitstream
[hevc @ 0x7f7eb9004d40] Decoding VUI
[hevc @ 0x7f7eb9004d40] Decoding PPS
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
    Last message repeated 1 times
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
    Last message repeated 1 times
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
    Last message repeated 1 times
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
    Last message repeated 1 times
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
    Last message repeated 1 times
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] NALFF: Consumed only 25 bytes instead of 39122
[hevc @ 0x7f7eb9004d40] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] NALFF: Consumed only 46 bytes instead of 39094
[hevc @ 0x7f7eb9004d40] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] NALFF: Consumed only 8 bytes instead of 39045
[hevc @ 0x7f7eb9004d40] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 19(IDR_W_RADL), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] Decoding VPS
[hevc @ 0x7f7eb9004d40] Main profile bitstream
[hevc @ 0x7f7eb9004d40] Decoding SPS
[hevc @ 0x7f7eb9004d40] Main profile bitstream
[hevc @ 0x7f7eb9004d40] Decoding VUI
[hevc @ 0x7f7eb9004d40] Decoding PPS
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
    Last message repeated 1 times
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
    Last message repeated 1 times
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb9004d40] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[flv @ 0x7f7eb8722f80] max_analyze_duration 5000000 reached at 5016000 microseconds st:1
[flv @ 0x7f7eb8722f80] rfps: 10.000000 0.012011
[flv @ 0x7f7eb8722f80] Ignoring outlier non primary stream starttime 0.000000
    Last message repeated 1 times
[flv @ 0x7f7eb8722f80] After avformat_find_stream_info() pos: 1386169 bytes read:1386169 seeks:0 frames:79
Input #0, flv, from 'rtmp://192.168.100.8:1935/live/2345':
  Metadata:
    |RtmpSampleAccess: true
    title           : Streamed by ZLMediaKit(git hash:6889afb/2024-08-14T20:11:24+08:00,branch:,build time:2024-08-14T12:23:01)
  Duration: 00:00:00.00, start: 588898.623000, bitrate: N/A
  Stream #0:0, 1, 1/1000: Data: none, 0/1
  Stream #0:1, 78, 1/1000: Video: hevc (Main), 1 reference frame, yuv420p(tv, left), 1920x1080 [SAR 1:1 DAR 16:9], 0/1, 30 fps, 15 tbr, 1k tbn
detected 4 logical cores
[hevc @ 0x7f7eb8721200] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb8721200] Decoding VPS
[hevc @ 0x7f7eb8721200] Main profile bitstream
[hevc @ 0x7f7eb8721200] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb8721200] Decoding SPS
[hevc @ 0x7f7eb8721200] Main profile bitstream
[hevc @ 0x7f7eb8721200] Decoding VUI
[hevc @ 0x7f7eb8721200] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb8721200] Decoding PPS
[hevc @ 0x7f7eb8721200] NALFF: Consumed only 25 bytes instead of 39145
[hevc @ 0x7f7eb8721200] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb8721200] NALFF: Consumed only 46 bytes instead of 39117
[hevc @ 0x7f7eb8721200] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb8721200] NALFF: Consumed only 8 bytes instead of 39068
[hevc @ 0x7f7eb8721200] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb8721200] nal_unit_type: 19(IDR_W_RADL), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb8721200] Decoding VPS
[hevc @ 0x7f7eb8721200] Main profile bitstream
[hevc @ 0x7f7eb8721200] Decoding SPS
[hevc @ 0x7f7eb8721200] Main profile bitstream
[hevc @ 0x7f7eb8721200] Decoding VUI
[hevc @ 0x7f7eb8721200] Decoding PPS
[hevc @ 0x7f7eb8721200] Format yuv420p chosen by get_format().
[hevc @ 0x7f7eb8721200] Output frame with POC 0.
[hevc @ 0x7f7eb8727040] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb8727040] Output frame with POC 1.
[hevc @ 0x7f7eb872e200] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb872e200] Output frame with POC 2.
[hevc @ 0x7f7eb8739d00] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb8739d00] Output frame with POC 3.
[hevc @ 0x7f7eb87427c0] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb87427c0] Output frame with POC 4.
[hevc @ 0x7f7eb8721200] Decoded frame with POC 0.
Video frame changed from size:0x0 format:none serial:-1 to size:1920x1080 format:yuv420p serial:1
[hevc @ 0x7f7eb8727040] Decoded frame with POC 1.
[hevc @ 0x7f7eb872e200] Decoded frame with POC 2.
[ffplay_buffer @ 0x7f7eb900d400] Setting 'video_size' to value '1920x1080'
[ffplay_buffer @ 0x7f7eb900d400] Setting 'pix_fmt' to value '0'
[ffplay_buffer @ 0x7f7eb900d400] Setting 'time_base' to value '1/1000'
[ffplay_buffer @ 0x7f7eb900d400] Setting 'pixel_aspect' to value '1/1'
[ffplay_buffer @ 0x7f7eb900d400] Setting 'colorspace' to value '2'
[ffplay_buffer @ 0x7f7eb900d400] Setting 'range' to value '1'
[ffplay_buffer @ 0x7f7eb900d400] Setting 'frame_rate' to value '15/1'
[ffplay_buffer @ 0x7f7eb900d400] w:1920 h:1080 pixfmt:yuv420p tb:1/1000 fr:15/1 sar:1/1 csp:unknown range:tv
[auto_scale_0 @ 0x7f7eb900da40] w:iw h:ih flags:'' interl:0
[ffplay_buffersink @ 0x7f7eb900d640] auto-inserting filter 'auto_scale_0' between the filter 'ffplay_buffer' and the filter 'ffplay_buffersink'
[AVFilterGraph @ 0x7f7eb900c180] query_formats: 2 queried, 0 merged, 3 already done, 0 delayed
[swscaler @ 0x7f7ebde7d000] [swscaler @ 0x7f7ebde8a000] YUV color matrix differs for YUV->YUV, using intermediate RGB to convert
[swscaler @ 0x7f7ebde7d000] [swscaler @ 0x7f7ebde97000] YUV color matrix differs for YUV->YUV, using intermediate RGB to convert
[swscaler @ 0x7f7ebde7d000] [swscaler @ 0x7f7ebdea4000] YUV color matrix differs for YUV->YUV, using intermediate RGB to convert
[swscaler @ 0x7f7ebde7d000] [swscaler @ 0x7f7ebdeb1000] YUV color matrix differs for YUV->YUV, using intermediate RGB to convert
[swscaler @ 0x7f7ebde7d000] [swscaler @ 0x7f7ebdebe000] YUV color matrix differs for YUV->YUV, using intermediate RGB to convert
[auto_scale_0 @ 0x7f7eb900da40] w:1920 h:1080 fmt:yuv420p csp:unknown range:tv sar:1/1 -> w:1920 h:1080 fmt:yuv420p csp:bt709 range:tv sar:1/1 flags:0x00000004
[ffplay_buffer @ 0x7f7eb900d400] video frame properties congruent with link at pts_time: 588898.623
[hevc @ 0x7f7eb8739d00] Decoded frame with POC 3.
[hevc @ 0x7f7eb87427c0] Decoded frame with POC 4.
[hevc @ 0x7f7eb8721200] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb8721200] Output frame with POC 5.
[hevc @ 0x7f7eb8727040] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb8727040] Output frame with POC 6.
Created 1920x1080 texture with SDL_PIXELFORMAT_IYUV.
[hevc @ 0x7f7eb8721200] Decoded frame with POC 5.
[hevc @ 0x7f7eb872e200] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb872e200] Output frame with POC 7.
[hevc @ 0x7f7eb8727040] Decoded frame with POC 6.KB sq=    0B 
[hevc @ 0x7f7eb872e200] Decoded frame with POC 7.
[hevc @ 0x7f7eb8739d00] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb8739d00] Output frame with POC 8.
[hevc @ 0x7f7eb8739d00] Decoded frame with POC 8.KB sq=    0B 
[hevc @ 0x7f7eb87427c0] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb87427c0] Output frame with POC 9.
[hevc @ 0x7f7eb8721200] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb8721200] Output frame with POC 10.
[hevc @ 0x7f7eb87427c0] Decoded frame with POC 9.
[hevc @ 0x7f7eb8721200] Decoded frame with POC 10.
[hevc @ 0x7f7eb8727040] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb8727040] Output frame with POC 11.
[hevc @ 0x7f7eb8727040] Decoded frame with POC 11.
[hevc @ 0x7f7eb872e200] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb872e200] Output frame with POC 12.
[hevc @ 0x7f7eb872e200] Decoded frame with POC 12.
[hevc @ 0x7f7eb8739d00] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb8739d00] Output frame with POC 13.
[hevc @ 0x7f7eb87427c0] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb87427c0] Output frame with POC 14.KB sq=    0B 
[hevc @ 0x7f7eb8739d00] Decoded frame with POC 13.
[hevc @ 0x7f7eb87427c0] Decoded frame with POC 14.
[hevc @ 0x7f7eb8721200] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb8721200] Output frame with POC 15.
[hevc @ 0x7f7eb8721200] Decoded frame with POC 15.B sq=    0B 
[hevc @ 0x7f7eb8727040] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb8727040] Output frame with POC 16.KB sq=    0B 
[hevc @ 0x7f7eb8727040] Decoded frame with POC 16.
[hevc @ 0x7f7eb872e200] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb872e200] Output frame with POC 17.
[hevc @ 0x7f7eb872e200] Decoded frame with POC 17.
[hevc @ 0x7f7eb8739d00] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb8739d00] Output frame with POC 18.
[hevc @ 0x7f7eb87427c0] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb87427c0] Output frame with POC 19.
[hevc @ 0x7f7eb8739d00] Decoded frame with POC 18.
[hevc @ 0x7f7eb87427c0] Decoded frame with POC 19.B sq=    0B 
[hevc @ 0x7f7eb8721200] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb8721200] Output frame with POC 20.
[hevc @ 0x7f7eb8721200] Decoded frame with POC 20.
[hevc @ 0x7f7eb8727040] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb8727040] Output frame with POC 21.KB sq=    0B 
[hevc @ 0x7f7eb8727040] Decoded frame with POC 21.
[hevc @ 0x7f7eb872e200] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb872e200] Output frame with POC 22.
[hevc @ 0x7f7eb872e200] Decoded frame with POC 22.B sq=    0B 
[hevc @ 0x7f7eb8739d00] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb8739d00] Output frame with POC 23.
[hevc @ 0x7f7eb87427c0] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x7f7eb87427c0] Output frame with POC 24.
[hevc @ 0x7f7eb8739d00] Decoded frame with POC 23.
[hevc @ 0x7f7eb87427c0] Decoded frame with POC 24.B sq=    0B 
^CliqishengdeMacBook-Pro:~ liqisheng$ KB vq=  441KB sq=    0B 
liqishengdeMacBook-Pro:~ liqisheng$ 
liqishengdeMacBook-Pro:~ liqisheng$ 
liqishengdeMacBook-Pro:~ liqisheng$ 
@pedroSG94
Copy link
Owner

pedroSG94 commented Aug 23, 2024

Hello,

The video looks fine, where is the distortion?
If you means the quality, which bitrate are you using?

About VLC, what do you means? the video is working for me with VLC. Remember that VLC is not supporting RTMP with H265, if your server can transform RTMP to RTSP on fly you can open it as RTSP. Ffplay support it from version 6.0 or 6.1.

@sheng930920
Copy link
Author

sheng930920 commented Aug 27, 2024

I recorded a video and played it using ffplay. The first few frames of the video were distorted.
image

2024-08-27.10.45.47.mp4

@pedroSG94
Copy link
Owner

Hello,

This could be because the stream is not starting with a keyframe. I did a branch that force start with a keyframe:
#1559

Test with this branch and let me know if the problem is solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants