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

Use h264_rkmpp play rtsp stream, avcodec_receive_frame allways return -11. #33

Closed
Coloryr opened this issue Mar 5, 2024 · 30 comments
Closed
Labels
bug Something isn't working

Comments

@Coloryr
Copy link

Coloryr commented Mar 5, 2024

When debugging with breakpoints, it was found that avcodec_receive_frame allways return -11.
But using h264 is normal, it can display.

try
{
    ffmpeg.av_frame_unref(_videoFrame);
    ffmpeg.av_frame_unref(_audioFrame);
    ffmpeg.av_frame_unref(_receivedFrame);
    int old = 0;
    byte* data = null;
    AVRational time_base = _pFormatContext->streams[_streamIndex]->time_base;
    long start_time = 0;
    bool first_frame = true;
    do
    {
        ffmpeg.av_packet_unref(_pPacket);
        error = ffmpeg.av_read_frame(_pFormatContext, _pPacket);

        if (error == ffmpeg.AVERROR_EOF || cancellationToken.IsCancellationRequested)
        {
            return;
        }

        error.ThrowExceptionIfError();

        if (_pPacket->stream_index == _audioStreamIndex)
        {
            ffmpeg.avcodec_send_packet(_audioCodecContext, _pPacket)
                .ThrowExceptionIfError();

            error = ffmpeg.avcodec_receive_frame(_audioCodecContext, _audioFrame);
            if (error == 0 && IPHostApi.EnableAudio)
            {
                BufferFormat format;
                var frame = *_audioFrame;
                if (frame.ch_layout.nb_channels == 1)
                {
                    format = frame.format == (int)AVSampleFormat.AV_SAMPLE_FMT_U8 ? BufferFormat.Mono8 : BufferFormat.Mono16;
                }
                else if (frame.ch_layout.nb_channels == 2)
                {
                    format = frame.format == (int)AVSampleFormat.AV_SAMPLE_FMT_U8 ? BufferFormat.Stereo8 : BufferFormat.Stereo16;
                }
                else
                {
                    continue;
                }

                int outputSampleCount = (int)ffmpeg.av_rescale_rnd(ffmpeg.swr_get_delay(swr_ctx, frame.sample_rate) + frame.nb_samples, 48000, frame.sample_rate, AVRounding.AV_ROUND_UP)
                    * 2 * 2;

                if (old != outputSampleCount)
                {
                    if (data != null)
                    {
                        Marshal.FreeHGlobal((nint)data);
                    }

                    data = (byte*)Marshal.AllocHGlobal(outputSampleCount);
                    old = outputSampleCount;
                }

                int size = ffmpeg.swr_convert(swr_ctx, &data, outputSampleCount, frame.extended_data, frame.nb_samples) * 4;

                if (size > 0 && IPHostApi.EnableAudio)
                {
                    OpenALPlayer.Write(format, data, size, 48000);
                }
            }
            else if (error != -11)
            {
                error.ThrowExceptionIfError();
            }
        }
        else if (_pPacket->stream_index == _streamIndex)
        {
            ffmpeg.avcodec_send_packet(_videoCodecContext, _pPacket)
                .ThrowExceptionIfError();
            error = ffmpeg.avcodec_receive_frame(_videoCodecContext, _videoFrame);
            if (error == 0)
            {
                AVFrame frame = *_videoFrame;

                if (_videoCodecContext->hw_device_ctx != null)
                {
                    ffmpeg.av_hwframe_transfer_data(_receivedFrame, _videoFrame, 0)
                        .ThrowExceptionIfError();
                    frame = *_receivedFrame;
                }

                var convertedFrame = vfc.Convert(frame);
                IPHostApi.SetVideoPtr(uuid, convertedFrame.width, convertedFrame.height, (IntPtr)convertedFrame.data[0]);

                if (first_frame)
                {
                    first_frame = false;
                    start_time =  ffmpeg.av_gettime() - ffmpeg.av_rescale_q(_videoFrame->pts, time_base, ffmpeg.av_make_q(1, ffmpeg.AV_TIME_BASE));
                }
            }
            else if (error != -11)
            {
                error.ThrowExceptionIfError();
            }
        }

        if (!first_frame)
        {
            long pts_time = ffmpeg.av_rescale_q(_videoFrame->pts, time_base, ffmpeg.av_make_q(1, ffmpeg.AV_TIME_BASE));
            long now = ffmpeg.av_gettime() - start_time;
            if (pts_time > now)
            {
                ffmpeg.av_usleep((uint)(pts_time - now));
            }
        }
    } while (!cancellationToken.IsCancellationRequested);
}
catch (Exception e)
{
    Console.WriteLine(e);
}
@Coloryr
Copy link
Author

Coloryr commented Mar 5, 2024

Use ffplay test is

orangepi@orangepi3b:~$ ffplay -vcodec h264_rkmpp -i rtsp://192.168.12.9:10054/test
ffplay version d43f4f5 Copyright (c) 2003-2023 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: --prefix=/usr --enable-gpl --enable-version3 --enable-libdrm --enable-rkmpp --enable-rkrga --enable-sdl2 --enable-ffmpeg --enable-ffplay --enable-ffprobe --enable-shared --disable-static
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100
xcb_connection_has_error() returned true
Input #0, rtsp, from 'rtsp://192.168.12.9:10054/test':   0B f=0/0
  Metadata:
    title           : No Name
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: h264 (Constrained Baseline), yuv420p(tv, smpte170m/smpte170m/bt709, progressive), 320x240, 29.67 fps, 29.97 tbr, 90k tbn
  Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp
^Corangepi@orangepi3b:~$ ffplay -i rtsp://192.168.12.9:10054/test
ffplay version d43f4f5 Copyright (c) 2003-2023 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: --prefix=/usr --enable-gpl --enable-version3 --enable-libdrm --enable-rkmpp --enable-rkrga --enable-sdl2 --enable-ffmpeg --enable-ffplay --enable-ffprobe --enable-shared --disable-static
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100
xcb_connection_has_error() returned true
Input #0, rtsp, from 'rtsp://192.168.12.9:10054/test':   0B f=0/0
  Metadata:
    title           : No Name
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: h264 (Constrained Baseline), yuv420p(tv, smpte170m/smpte170m/bt709, progressive), 320x240, 29.67 fps, 29.97 tbr, 90k tbn
  Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp
^Corangepi@orangepi3b:~$  4 aq=   10KB vq=    7KB sq=    0B f=0/0

When add -vcodec h264_rkmpp display is null.

@Coloryr Coloryr changed the title Use h264_rkmpp play rtsp stream, avcodec_receive_frame allways return -11. Use h264_rkmpp play rtsp stream, avcodec_receive_frame allways return -11. Mar 5, 2024
@nyanmisaka
Copy link
Owner

-11 is AVERROR(EAGAIN). This means you need to feed more packets to get a new frame.
You'd better learn how to handle AVERROR(EAGAIN) from the official examples.

https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/decode_video.c

@Coloryr
Copy link
Author

Coloryr commented Mar 6, 2024

But enough data has already been thrown in, use h264 will get the result soon, but h264_rkmpp not.
And not this issus when playing videos with higher bitrates in local, only occurs when pulling down the bitrate RTSP stream.
已经丢了足够多的数据了,使用h264马上就能出帧了,但是用h264_rkmpp就是不出帧
本地放高码率视频也没,就拉低码率rtsp流有

@Coloryr
Copy link
Author

Coloryr commented Mar 6, 2024

image
movie.zip
I use ffmpeg rtsp to push this.
我用ffmpeg rtsp推流这个

@Coloryr
Copy link
Author

Coloryr commented Mar 6, 2024

I tried to pull RTMP at a high bit rate, but there was no issus with it.
后面我试着拉rtmp高码率也没这个问题

@nyanmisaka
Copy link
Owner

Can u test the video playback in ffplay locally without using rstp?

ffplay -vcodec h264_rkmpp -i movie.mp4

@Coloryr
Copy link
Author

Coloryr commented Mar 6, 2024

Can u test the video playback in ffplay locally without using rstp?

ffplay -vcodec h264_rkmpp -i movie.mp4

Is work now.

but rtsp

ffmpeg -re -stream_loop -1 -i C:\Users\user\Desktop\movie.mp4 -c copy -f rtsp rtsp://localhost:10054/test
ffplay -vcodec h264_rkmpp -i rtsp://192.168.12.9:10054/test

No work.
image

This work

ffplay -vcodec h264 -i rtsp://192.168.12.9:10054/test

image

@nyanmisaka
Copy link
Owner

Better to use -v debug and see what's going on.

@Coloryr
Copy link
Author

Coloryr commented Mar 6, 2024

orangepi@orangepi3b:~$ ffplay -vcodec h264_rkmpp -i rtsp://192.168.12.9:10054/test -v debug
ffplay version d43f4f5 Copyright (c) 2003-2023 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: --prefix=/usr --enable-gpl --enable-version3 --enable-libdrm --enable-rkmpp --enable-rkrga --enable-sdl2 --enable-ffmpeg --enable-ffplay --enable-ffprobe --enable-shared --disable-static
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100
xcb_connection_has_error() returned true
Initialized opengl renderer.
[tcp @ 0x7f68003690] No default whitelist set 0KB sq=    0B f=0/0
[tcp @ 0x7f68003690] Original list of addresses:
[tcp @ 0x7f68003690] Address 192.168.12.9 port 10054
[tcp @ 0x7f68003690] Interleaved list of addresses:
[tcp @ 0x7f68003690] Address 192.168.12.9 port 10054
[tcp @ 0x7f68003690] Starting connection attempt to 192.168.12.9 port 10054
[tcp @ 0x7f68003690] Successfully connected to 192.168.12.9 port 10054
[rtsp @ 0x7f68000c20] SDP:
v=0
o=- 0 0 IN IP6 ::1
s=No Name
c=IN IP6 ::1
t=0 0
a=tool:libavformat 60.22.101
m=video 0 RTP/AVP 96
b=AS:80
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z0LADZ4hgoP01BgEGQAAfa8AHR4ejxQq4A==,aM4yyA==; profile-level-id=42C00D
a=control:streamid=0
m=audio 0 RTP/AVP 97
b=AS:115
a=rtpmap:97 MPEG4-GENERIC/48000/2
a=fmtp:97 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3; config=1190
a=control:streamid=1

[rtsp @ 0x7f68000c20] video codec set to: h264
[rtsp @ 0x7f68000c20] RTP Packetization Mode: 1
[rtsp @ 0x7f68000c20] Extradata set to 0x7f680054f0 (size: 37)
[rtsp @ 0x7f68000c20] RTP Profile IDC: 42 Profile IOP: c0 Level: d
[rtsp @ 0x7f68000c20] audio codec set to: aac
[rtsp @ 0x7f68000c20] audio samplerate set to: 48000
[rtsp @ 0x7f68000c20] audio channels set to: 2
[rtp @ 0x7f68009390] No default whitelist set
[udp @ 0x7f68009690] No default whitelist set
[udp @ 0x7f68009690] end receive buffer size reported is 425984
[udp @ 0x7f68019960] No default whitelist set
[udp @ 0x7f68019960] end receive buffer size reported is 425984
[rtsp @ 0x7f68000c20] setting jitter buffer size to 500
[rtp @ 0x7f68029ec0] No default whitelist set 0KB sq=    0B f=0/0
[udp @ 0x7f6802a160] No default whitelist set
[udp @ 0x7f6802a160] end receive buffer size reported is 425984
[udp @ 0x7f6803a430] No default whitelist set
[udp @ 0x7f6803a430] end receive buffer size reported is 425984
[rtsp @ 0x7f68000c20] setting jitter buffer size to 500
[rtsp @ 0x7f68000c20] hello state=0
[h264 @ 0x7f68005020] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x7f68005020] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x7f68005020] Decoding VUI 0KB vq=    0KB sq=    0B f=0/0
For transform of length 64, inverse, mdct_float, flags: [aligned, out_of_place], found 2 matches:
    1: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    2: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 32, inverse, fft_float, flags: [aligned, inplace, preshuf], found 3 matches:
    1: fft32_ns_float_neon - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 352
    2: fft_pfa_ns_float_c - type: fft_float, len: [6, ∞], factors[2]: [7, 5, 3, 2, any], flags: [unaligned, inplace, out_of_place, preshuf], prio: 112
    3: fft32_ns_float_c - type: fft_float, len: 32, factor: 2, flags: [unaligned, inplace, out_of_place, preshuf], prio: 96
Transform tree:
    mdct_inv_float_c - type: mdct_float, len: 64, factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only]
        fft32_ns_float_neon - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf]
For transform of length 64, inverse, mdct_float, flags: [aligned, out_of_place], found 2 matches:
    1: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    2: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 32, inverse, fft_float, flags: [aligned, inplace, preshuf], found 3 matches:
    1: fft32_ns_float_neon - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 352
    2: fft_pfa_ns_float_c - type: fft_float, len: [6, ∞], factors[2]: [7, 5, 3, 2, any], flags: [unaligned, inplace, out_of_place, preshuf], prio: 112
    3: fft32_ns_float_c - type: fft_float, len: 32, factor: 2, flags: [unaligned, inplace, out_of_place, preshuf], prio: 96
Transform tree:
    mdct_inv_float_c - type: mdct_float, len: 64, factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only]
        fft32_ns_float_neon - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf]
For transform of length 120, inverse, mdct_float, flags: [aligned, out_of_place], found 5 matches:
    1: mdct_pfa_15xM_inv_float_c - type: mdct_float, len: [30, ∞], factors[2]: [15, any], flags: [unaligned, out_of_place, inv_only], prio: 304
    2: mdct_pfa_5xM_inv_float_c - type: mdct_float, len: [10, ∞], factors[2]: [5, any], flags: [unaligned, out_of_place, inv_only], prio: 144
    3: mdct_pfa_3xM_inv_float_c - type: mdct_float, len: [6, ∞], factors[2]: [3, any], flags: [unaligned, out_of_place, inv_only], prio: 112
    4: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    5: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 4, inverse, fft_float, flags: [aligned, inplace, preshuf], found 2 matches:
    1: fft4_fwd_float_neon - type: fft_float, len: 4, factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 352
    2: fft4_ns_float_c - type: fft_float, len: 4, factor: 2, flags: [unaligned, inplace, out_of_place, preshuf], prio: 96
Transform tree:
    mdct_pfa_15xM_inv_float_c - type: mdct_float, len: 120, factors[2]: [15, any], flags: [unaligned, out_of_place, inv_only]
        fft4_fwd_float_neon - type: fft_float, len: 4, factor: 2, flags: [aligned, inplace, out_of_place, preshuf]
For transform of length 128, inverse, mdct_float, flags: [aligned, out_of_place], found 2 matches:
    1: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    2: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 64, inverse, fft_float, flags: [aligned, inplace, preshuf], found 3 matches:
    1: fft_sr_ns_float_neon - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 288
    2: fft_pfa_ns_float_c - type: fft_float, len: [6, ∞], factors[2]: [7, 5, 3, 2, any], flags: [unaligned, inplace, out_of_place, preshuf], prio: 112
    3: fft64_ns_float_c - type: fft_float, len: 64, factor: 2, flags: [unaligned, inplace, out_of_place, preshuf], prio: 96
Transform tree:
    mdct_inv_float_c - type: mdct_float, len: 128, factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only]
        fft_sr_ns_float_neon - type: fft_float, len: 64, factor: 2, flags: [aligned, inplace, out_of_place, preshuf]
For transform of length 480, inverse, mdct_float, flags: [aligned, out_of_place], found 5 matches:
    1: mdct_pfa_15xM_inv_float_c - type: mdct_float, len: [30, ∞], factors[2]: [15, any], flags: [unaligned, out_of_place, inv_only], prio: 304
    2: mdct_pfa_5xM_inv_float_c - type: mdct_float, len: [10, ∞], factors[2]: [5, any], flags: [unaligned, out_of_place, inv_only], prio: 144
    3: mdct_pfa_3xM_inv_float_c - type: mdct_float, len: [6, ∞], factors[2]: [3, any], flags: [unaligned, out_of_place, inv_only], prio: 112
    4: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    5: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 16, inverse, fft_float, flags: [aligned, inplace, preshuf], found 3 matches:
    1: fft16_ns_float_neon - type: fft_float, len: 16, factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 352
    2: fft_pfa_ns_float_c - type: fft_float, len: [6, ∞], factors[2]: [7, 5, 3, 2, any], flags: [unaligned, inplace, out_of_place, preshuf], prio: 112
    3: fft16_ns_float_c - type: fft_float, len: 16, factor: 2, flags: [unaligned, inplace, out_of_place, preshuf], prio: 96
Transform tree:
    mdct_pfa_15xM_inv_float_c - type: mdct_float, len: 480, factors[2]: [15, any], flags: [unaligned, out_of_place, inv_only]
        fft16_ns_float_neon - type: fft_float, len: 16, factor: 2, flags: [aligned, inplace, out_of_place, preshuf]
For transform of length 512, inverse, mdct_float, flags: [aligned, out_of_place], found 2 matches:
    1: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    2: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 256, inverse, fft_float, flags: [aligned, inplace, preshuf], found 3 matches:
    1: fft_sr_ns_float_neon - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 288
    2: fft_pfa_ns_float_c - type: fft_float, len: [6, ∞], factors[2]: [7, 5, 3, 2, any], flags: [unaligned, inplace, out_of_place, preshuf], prio: 112
    3: fft256_ns_float_c - type: fft_float, len: 256, factor: 2, flags: [unaligned, inplace, out_of_place, preshuf], prio: 96
Transform tree:
    mdct_inv_float_c - type: mdct_float, len: 512, factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only]
        fft_sr_ns_float_neon - type: fft_float, len: 256, factor: 2, flags: [aligned, inplace, out_of_place, preshuf]
For transform of length 960, inverse, mdct_float, flags: [aligned, out_of_place], found 5 matches:
    1: mdct_pfa_15xM_inv_float_c - type: mdct_float, len: [30, ∞], factors[2]: [15, any], flags: [unaligned, out_of_place, inv_only], prio: 304
    2: mdct_pfa_5xM_inv_float_c - type: mdct_float, len: [10, ∞], factors[2]: [5, any], flags: [unaligned, out_of_place, inv_only], prio: 144
    3: mdct_pfa_3xM_inv_float_c - type: mdct_float, len: [6, ∞], factors[2]: [3, any], flags: [unaligned, out_of_place, inv_only], prio: 112
    4: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    5: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 32, inverse, fft_float, flags: [aligned, inplace, preshuf], found 3 matches:
    1: fft32_ns_float_neon - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 352
    2: fft_pfa_ns_float_c - type: fft_float, len: [6, ∞], factors[2]: [7, 5, 3, 2, any], flags: [unaligned, inplace, out_of_place, preshuf], prio: 112
    3: fft32_ns_float_c - type: fft_float, len: 32, factor: 2, flags: [unaligned, inplace, out_of_place, preshuf], prio: 96
Transform tree:
    mdct_pfa_15xM_inv_float_c - type: mdct_float, len: 960, factors[2]: [15, any], flags: [unaligned, out_of_place, inv_only]
        fft32_ns_float_neon - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf]
For transform of length 1024, inverse, mdct_float, flags: [aligned, out_of_place], found 2 matches:
    1: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    2: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 512, inverse, fft_float, flags: [aligned, inplace, preshuf], found 3 matches:
    1: fft_sr_ns_float_neon - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 288
    2: fft_pfa_ns_float_c - type: fft_float, len: [6, ∞], factors[2]: [7, 5, 3, 2, any], flags: [unaligned, inplace, out_of_place, preshuf], prio: 112
    3: fft512_ns_float_c - type: fft_float, len: 512, factor: 2, flags: [unaligned, inplace, out_of_place, preshuf], prio: 96
Transform tree:
    mdct_inv_float_c - type: mdct_float, len: 1024, factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only]
        fft_sr_ns_float_neon - type: fft_float, len: 512, factor: 2, flags: [aligned, inplace, out_of_place, preshuf]
For transform of length 1024, forward, mdct_float, flags: [aligned, out_of_place], found 2 matches:
    1: mdct_fwd_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, fwd_only], prio: 96
    2: mdct_naive_fwd_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, fwd_only], prio: -130976
For transform of length 512, forward, fft_float, flags: [aligned, inplace, preshuf], found 3 matches:
    1: fft_sr_ns_float_neon - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 288
    2: fft_pfa_ns_float_c - type: fft_float, len: [6, ∞], factors[2]: [7, 5, 3, 2, any], flags: [unaligned, inplace, out_of_place, preshuf], prio: 112
    3: fft512_ns_float_c - type: fft_float, len: 512, factor: 2, flags: [unaligned, inplace, out_of_place, preshuf], prio: 96
Transform tree:
    mdct_fwd_float_c - type: mdct_float, len: 1024, factors[2]: [2, any], flags: [unaligned, out_of_place, fwd_only]
        fft_sr_ns_float_neon - type: fft_float, len: 512, factor: 2, flags: [aligned, inplace, out_of_place, preshuf]
[h264 @ 0x7f68005020] nal_unit_type: 7(SPS), nal_ref_idc: 3 f=0/0
[h264 @ 0x7f68005020] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x7f68005020] Decoding VUI
[h264 @ 0x7f68005020] nal_unit_type: 5(IDR), nal_ref_idc: 3 f=0/0
[h264 @ 0x7f68005020] Format yuv420p chosen by get_format().
[h264 @ 0x7f68005020] Reinit context to 320x240, pix_fmt: yuv420p
[h264 @ 0x7f68005020] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
    Last message repeated 2 times
[h264 @ 0x7f68005020] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
[h264 @ 0x7f68005020] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
    Last message repeated 1 times
[rtsp @ 0x7f68000c20] first_dts 21060 not matching first dts NOPTS (pts NOPTS, duration 3034) in the queue
[rtsp @ 0x7f68000c20] All info foundKB vq=    0KB sq=    0B f=0/0
[rtsp @ 0x7f68000c20] rfps: 29.250000 0.018898
[rtsp @ 0x7f68000c20] rfps: 29.333333 0.014754
[rtsp @ 0x7f68000c20] rfps: 29.416667 0.011124
    Last message repeated 1 times
[rtsp @ 0x7f68000c20] rfps: 29.500000 0.008009
    Last message repeated 1 times
[rtsp @ 0x7f68000c20] rfps: 29.583333 0.005409
    Last message repeated 1 times
[rtsp @ 0x7f68000c20] rfps: 29.666667 0.003322
    Last message repeated 1 times
[rtsp @ 0x7f68000c20] rfps: 29.750000 0.001750
    Last message repeated 1 times
[rtsp @ 0x7f68000c20] rfps: 29.833333 0.000693
    Last message repeated 1 times
[rtsp @ 0x7f68000c20] rfps: 29.916667 0.000150
    Last message repeated 1 times
[rtsp @ 0x7f68000c20] rfps: 30.000000 0.000121
[rtsp @ 0x7f68000c20] rfps: 60.000000 0.000484
[rtsp @ 0x7f68000c20] rfps: 120.000000 0.001936
[rtsp @ 0x7f68000c20] rfps: 240.000000 0.007744
[rtsp @ 0x7f68000c20] rfps: 29.970030 0.000072
[rtsp @ 0x7f68000c20] rfps: 59.940060 0.000288
Input #0, rtsp, from 'rtsp://192.168.12.9:10054/test':
  Metadata:
    title           : No Name
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0, 28, 1/90000: Video: h264 (Constrained Baseline), 1 reference frame, yuv420p(tv, smpte170m/smpte170m/bt709, progressive, left), 320x240, 0/1, 29.67 fps, 29.97 tbr, 90k tbn
  Stream #0:1, 44, 1/48000: Audio: aac (LC), 48000 Hz, stereo, fltp
For transform of length 64, inverse, mdct_float, flags: [aligned, out_of_place], found 2 matches:
    1: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    2: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 32, inverse, fft_float, flags: [aligned, inplace, preshuf], found 3 matches:
    1: fft32_ns_float_neon - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 352
    2: fft_pfa_ns_float_c - type: fft_float, len: [6, ∞], factors[2]: [7, 5, 3, 2, any], flags: [unaligned, inplace, out_of_place, preshuf], prio: 112
    3: fft32_ns_float_c - type: fft_float, len: 32, factor: 2, flags: [unaligned, inplace, out_of_place, preshuf], prio: 96
Transform tree:
    mdct_inv_float_c - type: mdct_float, len: 64, factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only]
        fft32_ns_float_neon - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf]
For transform of length 64, inverse, mdct_float, flags: [aligned, out_of_place], found 2 matches:
    1: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    2: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 32, inverse, fft_float, flags: [aligned, inplace, preshuf], found 3 matches:
    1: fft32_ns_float_neon - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 352
    2: fft_pfa_ns_float_c - type: fft_float, len: [6, ∞], factors[2]: [7, 5, 3, 2, any], flags: [unaligned, inplace, out_of_place, preshuf], prio: 112
    3: fft32_ns_float_c - type: fft_float, len: 32, factor: 2, flags: [unaligned, inplace, out_of_place, preshuf], prio: 96
Transform tree:
    mdct_inv_float_c - type: mdct_float, len: 64, factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only]
        fft32_ns_float_neon - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf]
For transform of length 120, inverse, mdct_float, flags: [aligned, out_of_place], found 5 matches:
    1: mdct_pfa_15xM_inv_float_c - type: mdct_float, len: [30, ∞], factors[2]: [15, any], flags: [unaligned, out_of_place, inv_only], prio: 304
    2: mdct_pfa_5xM_inv_float_c - type: mdct_float, len: [10, ∞], factors[2]: [5, any], flags: [unaligned, out_of_place, inv_only], prio: 144
    3: mdct_pfa_3xM_inv_float_c - type: mdct_float, len: [6, ∞], factors[2]: [3, any], flags: [unaligned, out_of_place, inv_only], prio: 112
    4: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    5: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 4, inverse, fft_float, flags: [aligned, inplace, preshuf], found 2 matches:
    1: fft4_fwd_float_neon - type: fft_float, len: 4, factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 352
    2: fft4_ns_float_c - type: fft_float, len: 4, factor: 2, flags: [unaligned, inplace, out_of_place, preshuf], prio: 96
Transform tree:
    mdct_pfa_15xM_inv_float_c - type: mdct_float, len: 120, factors[2]: [15, any], flags: [unaligned, out_of_place, inv_only]
        fft4_fwd_float_neon - type: fft_float, len: 4, factor: 2, flags: [aligned, inplace, out_of_place, preshuf]
For transform of length 128, inverse, mdct_float, flags: [aligned, out_of_place], found 2 matches:
    1: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    2: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 64, inverse, fft_float, flags: [aligned, inplace, preshuf], found 3 matches:
    1: fft_sr_ns_float_neon - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 288
    2: fft_pfa_ns_float_c - type: fft_float, len: [6, ∞], factors[2]: [7, 5, 3, 2, any], flags: [unaligned, inplace, out_of_place, preshuf], prio: 112
    3: fft64_ns_float_c - type: fft_float, len: 64, factor: 2, flags: [unaligned, inplace, out_of_place, preshuf], prio: 96
Transform tree:
    mdct_inv_float_c - type: mdct_float, len: 128, factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only]
        fft_sr_ns_float_neon - type: fft_float, len: 64, factor: 2, flags: [aligned, inplace, out_of_place, preshuf]
For transform of length 480, inverse, mdct_float, flags: [aligned, out_of_place], found 5 matches:
    1: mdct_pfa_15xM_inv_float_c - type: mdct_float, len: [30, ∞], factors[2]: [15, any], flags: [unaligned, out_of_place, inv_only], prio: 304
    2: mdct_pfa_5xM_inv_float_c - type: mdct_float, len: [10, ∞], factors[2]: [5, any], flags: [unaligned, out_of_place, inv_only], prio: 144
    3: mdct_pfa_3xM_inv_float_c - type: mdct_float, len: [6, ∞], factors[2]: [3, any], flags: [unaligned, out_of_place, inv_only], prio: 112
    4: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    5: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 16, inverse, fft_float, flags: [aligned, inplace, preshuf], found 3 matches:
    1: fft16_ns_float_neon - type: fft_float, len: 16, factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 352
    2: fft_pfa_ns_float_c - type: fft_float, len: [6, ∞], factors[2]: [7, 5, 3, 2, any], flags: [unaligned, inplace, out_of_place, preshuf], prio: 112
    3: fft16_ns_float_c - type: fft_float, len: 16, factor: 2, flags: [unaligned, inplace, out_of_place, preshuf], prio: 96
Transform tree:
    mdct_pfa_15xM_inv_float_c - type: mdct_float, len: 480, factors[2]: [15, any], flags: [unaligned, out_of_place, inv_only]
        fft16_ns_float_neon - type: fft_float, len: 16, factor: 2, flags: [aligned, inplace, out_of_place, preshuf]
For transform of length 512, inverse, mdct_float, flags: [aligned, out_of_place], found 2 matches:
    1: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    2: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 256, inverse, fft_float, flags: [aligned, inplace, preshuf], found 3 matches:
    1: fft_sr_ns_float_neon - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 288
    2: fft_pfa_ns_float_c - type: fft_float, len: [6, ∞], factors[2]: [7, 5, 3, 2, any], flags: [unaligned, inplace, out_of_place, preshuf], prio: 112
    3: fft256_ns_float_c - type: fft_float, len: 256, factor: 2, flags: [unaligned, inplace, out_of_place, preshuf], prio: 96
Transform tree:
    mdct_inv_float_c - type: mdct_float, len: 512, factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only]
        fft_sr_ns_float_neon - type: fft_float, len: 256, factor: 2, flags: [aligned, inplace, out_of_place, preshuf]
For transform of length 960, inverse, mdct_float, flags: [aligned, out_of_place], found 5 matches:
    1: mdct_pfa_15xM_inv_float_c - type: mdct_float, len: [30, ∞], factors[2]: [15, any], flags: [unaligned, out_of_place, inv_only], prio: 304
    2: mdct_pfa_5xM_inv_float_c - type: mdct_float, len: [10, ∞], factors[2]: [5, any], flags: [unaligned, out_of_place, inv_only], prio: 144
    3: mdct_pfa_3xM_inv_float_c - type: mdct_float, len: [6, ∞], factors[2]: [3, any], flags: [unaligned, out_of_place, inv_only], prio: 112
    4: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    5: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 32, inverse, fft_float, flags: [aligned, inplace, preshuf], found 3 matches:
    1: fft32_ns_float_neon - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 352
    2: fft_pfa_ns_float_c - type: fft_float, len: [6, ∞], factors[2]: [7, 5, 3, 2, any], flags: [unaligned, inplace, out_of_place, preshuf], prio: 112
    3: fft32_ns_float_c - type: fft_float, len: 32, factor: 2, flags: [unaligned, inplace, out_of_place, preshuf], prio: 96
Transform tree:
    mdct_pfa_15xM_inv_float_c - type: mdct_float, len: 960, factors[2]: [15, any], flags: [unaligned, out_of_place, inv_only]
        fft32_ns_float_neon - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf]
For transform of length 1024, inverse, mdct_float, flags: [aligned, out_of_place], found 2 matches:
    1: mdct_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: 96
    2: mdct_naive_inv_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only], prio: -130976
For transform of length 512, inverse, fft_float, flags: [aligned, inplace, preshuf], found 3 matches:
    1: fft_sr_ns_float_neon - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 288
    2: fft_pfa_ns_float_c - type: fft_float, len: [6, ∞], factors[2]: [7, 5, 3, 2, any], flags: [unaligned, inplace, out_of_place, preshuf], prio: 112
    3: fft512_ns_float_c - type: fft_float, len: 512, factor: 2, flags: [unaligned, inplace, out_of_place, preshuf], prio: 96
Transform tree:
    mdct_inv_float_c - type: mdct_float, len: 1024, factors[2]: [2, any], flags: [unaligned, out_of_place, inv_only]
        fft_sr_ns_float_neon - type: fft_float, len: 512, factor: 2, flags: [aligned, inplace, out_of_place, preshuf]
For transform of length 1024, forward, mdct_float, flags: [aligned, out_of_place], found 2 matches:
    1: mdct_fwd_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, fwd_only], prio: 96
    2: mdct_naive_fwd_float_c - type: mdct_float, len: [2, ∞], factors[2]: [2, any], flags: [unaligned, out_of_place, fwd_only], prio: -130976
For transform of length 512, forward, fft_float, flags: [aligned, inplace, preshuf], found 3 matches:
    1: fft_sr_ns_float_neon - type: fft_float, len: [64, 131072], factor: 2, flags: [aligned, inplace, out_of_place, preshuf], prio: 288
    2: fft_pfa_ns_float_c - type: fft_float, len: [6, ∞], factors[2]: [7, 5, 3, 2, any], flags: [unaligned, inplace, out_of_place, preshuf], prio: 112
    3: fft512_ns_float_c - type: fft_float, len: 512, factor: 2, flags: [unaligned, inplace, out_of_place, preshuf], prio: 96
Transform tree:
    mdct_fwd_float_c - type: mdct_float, len: 1024, factors[2]: [2, any], flags: [unaligned, out_of_place, fwd_only]
        fft_sr_ns_float_neon - type: fft_float, len: 512, factor: 2, flags: [aligned, inplace, out_of_place, preshuf]
detected 4 logical cores
[ffplay_abuffer @ 0x7f68064010] Setting 'sample_rate' to value '48000'
[ffplay_abuffer @ 0x7f68064010] Setting 'sample_fmt' to value 'fltp'
[ffplay_abuffer @ 0x7f68064010] Setting 'time_base' to value '1/48000'
[ffplay_abuffer @ 0x7f68064010] Setting 'channel_layout' to value 'stereo'
[ffplay_abuffer @ 0x7f68064010] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:stereo
[ffplay_abuffersink @ 0x7f68096400] auto-inserting filter 'auto_aresample_0' between the filter 'ffplay_abuffer' and the filter 'ffplay_abuffersink'
[AVFilterGraph @ 0x7f680ec720] query_formats: 2 queried, 0 merged, 4 already done, 0 delayed
[auto_aresample_0 @ 0x7f680640f0] [SWR @ 0x7f680cd8e0] Using fltp internally between filters
[auto_aresample_0 @ 0x7f680640f0] ch:2 chl:stereo fmt:fltp r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz
[h264_mp4toannexb @ 0x7f68067040] The input looks like it is Annex B already
[h264_rkmpp @ 0x7f680f1590] Format nv12 chosen by get_format().
[h264_rkmpp @ 0x7f680f1590] Created a RKMPP hardware device
[h264_rkmpp @ 0x7f680f1590] Decoder flushing
Audio frame changed from rate:48000 ch:2 fmt:fltp layout:stereo serial:-1 to rate:48000 ch:2 fmt:fltp layout:stereo serial:1
[h264_rkmpp @ 0x7f680f1590] Wrote 3712 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Wrote 470 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Wrote 83 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Wrote 323 bytes to decoder
[ffplay_abuffer @ 0x7f680640f0] Setting 'sample_rate' to value '48000'
[ffplay_abuffer @ 0x7f680640f0] Setting 'sample_fmt' to value 'fltp'
[ffplay_abuffer @ 0x7f680640f0] Setting 'time_base' to value '1/48000'
[ffplay_abuffer @ 0x7f680640f0] Setting 'channel_layout' to value 'stereo'
[ffplay_abuffer @ 0x7f680640f0] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:stereo
[ffplay_abuffersink @ 0x7f68064010] auto-inserting filter 'auto_aresample_0' between the filter 'ffplay_abuffer' and the filter 'ffplay_abuffersink'
[AVFilterGraph @ 0x7f680ec720] query_formats: 2 queried, 0 merged, 3 already done, 0 delayed
[auto_aresample_0 @ 0x7f58005610] [SWR @ 0x7f580056e0] Using fltp internally between filters
[auto_aresample_0 @ 0x7f58005610] ch:2 chl:stereo fmt:fltp r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 362 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 463 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 542 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 101 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 334 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 369 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 461 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 567 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 90 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 366 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 363 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 490 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 466 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 57 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 357 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 394 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 380 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 589 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 102 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 339 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 366 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 423 bytes to decoder
[aac @ 0x7f680bf380] skip whole frame, skip left: 0q=    0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 502 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 146 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 372 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 364 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 434 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 422 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 154 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 329 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 308 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 412 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 430 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 90 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 322 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 312 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 336 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 442 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 81 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 299 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 226 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 386 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 402 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 82 bytes to decoder
[h264_rkmpp @ 0x7f680f1590] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f680f1590] Wrote 217 bytes to decoder

@nyanmisaka
Copy link
Owner

Can u test https://github.com/JeffyCN/FFmpeg and see if it helps? It's a fork from rockchip maintainer.

@Coloryr
Copy link
Author

Coloryr commented Mar 6, 2024

https://github.com/JeffyCN/FFmpeg Is work

orangepi@orangepi3b:~/FFmpeg$ ./ffplay -vcodec h264_rkmpp -i rtsp://192.168.12.9:10054/test -v debug
ffplay version git-2023-05-12-003204d Copyright (c) 2003-2022 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: --prefix=/usr --enable-gpl --enable-version3 --enable-libdrm --enable-rkmpp --enable-sdl2 --enable-ffmpeg --enable-ffplay --enable-ffprobe
  libavutil      57. 33.101 / 57. 33.101
  libavcodec     59. 42.101 / 59. 42.101
  libavformat    59. 30.100 / 59. 30.100
  libavdevice    59.  8.101 / 59.  8.101
  libavfilter     8. 46.103 /  8. 46.103
  libswscale      6.  8.102 /  6.  8.102
  libswresample   4.  8.100 /  4.  8.100
  libpostproc    56.  7.100 / 56.  7.100
xcb_connection_has_error() returned true
Initialized opengl renderer.
[tcp @ 0x7f84003690] No default whitelist set 0KB sq=    0B f=0/0
[tcp @ 0x7f84003690] Original list of addresses:
[tcp @ 0x7f84003690] Address 192.168.12.9 port 10054
[tcp @ 0x7f84003690] Interleaved list of addresses:
[tcp @ 0x7f84003690] Address 192.168.12.9 port 10054
[tcp @ 0x7f84003690] Starting connection attempt to 192.168.12.9 port 10054
[tcp @ 0x7f84003690] Successfully connected to 192.168.12.9 port 10054
[rtsp @ 0x7f84000c20] SDP:
v=0
o=- 0 0 IN IP6 ::1
s=No Name
c=IN IP6 ::1
t=0 0
a=tool:libavformat 60.22.101
m=video 0 RTP/AVP 96
b=AS:80
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z0LADZ4hgoP01BgEGQAAfa8AHR4ejxQq4A==,aM4yyA==; profile-level-id=42C00D
a=control:streamid=0
m=audio 0 RTP/AVP 97
b=AS:115
a=rtpmap:97 MPEG4-GENERIC/48000/2
a=fmtp:97 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3; config=1190
a=control:streamid=1

[rtsp @ 0x7f84000c20] video codec set to: h264
[rtsp @ 0x7f84000c20] RTP Packetization Mode: 1
[rtsp @ 0x7f84000c20] Extradata set to 0x7f840054f0 (size: 37)
[rtsp @ 0x7f84000c20] RTP Profile IDC: 42 Profile IOP: c0 Level: d
[rtsp @ 0x7f84000c20] audio codec set to: aac
[rtsp @ 0x7f84000c20] audio samplerate set to: 48000
[rtsp @ 0x7f84000c20] audio channels set to: 2
[rtp @ 0x7f84009120] No default whitelist set
[udp @ 0x7f84009420] No default whitelist set
[udp @ 0x7f84009420] end receive buffer size reported is 425984
[udp @ 0x7f840196f0] No default whitelist set
[udp @ 0x7f840196f0] end receive buffer size reported is 425984
[rtsp @ 0x7f84000c20] setting jitter buffer size to 500
[rtp @ 0x7f84029c50] No default whitelist set
[udp @ 0x7f84029ef0] No default whitelist set
[udp @ 0x7f84029ef0] end receive buffer size reported is 425984
[udp @ 0x7f8403a1c0] No default whitelist set
[udp @ 0x7f8403a1c0] end receive buffer size reported is 425984
[rtsp @ 0x7f84000c20] setting jitter buffer size to 500
[rtsp @ 0x7f84000c20] hello state=0
[h264 @ 0x7f84005020] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x7f84005020] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x7f84005020] nal_unit_type: 7(SPS), nal_ref_idc: 3 f=0/0
[h264 @ 0x7f84005020] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x7f84005020] nal_unit_type: 5(IDR), nal_ref_idc: 3 f=0/0
[h264 @ 0x7f84005020] Format yuv420p chosen by get_format().
[h264 @ 0x7f84005020] Reinit context to 320x240, pix_fmt: yuv420p
[h264 @ 0x7f84005020] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
    Last message repeated 2 times
[h264 @ 0x7f84005020] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
[h264 @ 0x7f84005020] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
    Last message repeated 1 times
[rtsp @ 0x7f84000c20] first_dts 21060 not matching first dts NOPTS (pts NOPTS, duration 3034) in the queue
[rtsp @ 0x7f84000c20] All info foundKB vq=    0KB sq=    0B f=0/0
[rtsp @ 0x7f84000c20] rfps: 29.250000 0.018898
[rtsp @ 0x7f84000c20] rfps: 29.333333 0.014754
[rtsp @ 0x7f84000c20] rfps: 29.416667 0.011124
    Last message repeated 1 times
[rtsp @ 0x7f84000c20] rfps: 29.500000 0.008009
    Last message repeated 1 times
[rtsp @ 0x7f84000c20] rfps: 29.583333 0.005409
    Last message repeated 1 times
[rtsp @ 0x7f84000c20] rfps: 29.666667 0.003322
    Last message repeated 1 times
[rtsp @ 0x7f84000c20] rfps: 29.750000 0.001750
    Last message repeated 1 times
[rtsp @ 0x7f84000c20] rfps: 29.833333 0.000693
    Last message repeated 1 times
[rtsp @ 0x7f84000c20] rfps: 29.916667 0.000150
    Last message repeated 1 times
[rtsp @ 0x7f84000c20] rfps: 30.000000 0.000121
[rtsp @ 0x7f84000c20] rfps: 60.000000 0.000484
[rtsp @ 0x7f84000c20] rfps: 120.000000 0.001936
[rtsp @ 0x7f84000c20] rfps: 240.000000 0.007744
[rtsp @ 0x7f84000c20] rfps: 29.970030 0.000072
[rtsp @ 0x7f84000c20] rfps: 59.940060 0.000288
Input #0, rtsp, from 'rtsp://192.168.12.9:10054/test':
  Metadata:
    title           : No Name
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0, 28, 1/90000: Video: h264 (Constrained Baseline), 1 reference frame, yuv420p(tv, smpte170m/smpte170m/bt709, progressive, left), 320x240, 0/1, 29.67 fps, 29.97 tbr, 90k tbn
  Stream #0:1, 44, 1/48000: Audio: aac (LC), 48000 Hz, stereo, fltp
detected 4 logical cores
[ffplay_abuffer @ 0x7f8404e180] Setting 'sample_rate' to value '48000'
[ffplay_abuffer @ 0x7f8404e180] Setting 'sample_fmt' to value 'fltp'
[ffplay_abuffer @ 0x7f8404e180] Setting 'time_base' to value '1/48000'
[ffplay_abuffer @ 0x7f8404e180] Setting 'channel_layout' to value 'stereo'
[ffplay_abuffer @ 0x7f8404e180] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:stereo
[ffplay_abuffersink @ 0x7f8412ab10] auto-inserting filter 'auto_aresample_0' between the filter 'ffplay_abuffer' and the filter 'ffplay_abuffersink'
[AVFilterGraph @ 0x7f840f6e10] query_formats: 2 queried, 0 merged, 3 already done, 0 delayed
[auto_aresample_0 @ 0x7f840c5330] [SWR @ 0x7f84099850] Using fltp internally between filters
[auto_aresample_0 @ 0x7f840c5330] ch:2 chl:stereo fmt:fltp r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz
[h264_mp4toannexb @ 0x7f840c52a0] The input looks like it is Annex B already
[h264_rkmpp @ 0x7f840af2a0] Format yuv420p chosen by get_format().
[h264_rkmpp @ 0x7f840af2a0] Initializing RKMPP decoder.
[h264_rkmpp @ 0x7f840af2a0] RKMPP decoder initialized successfully.
[h264_rkmpp @ 0x7f840af2a0] Flush.
Audio frame changed from rate:48000 ch:2 fmt:fltp layout:stereo serial:-1 to rate:48000 ch:2 fmt:fltp layout:stereo serial:1
[h264_rkmpp @ 0x7f840af2a0] Wrote 3712 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 470 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 83 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 323 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Buffer full
[ffplay_abuffer @ 0x7f8404e180] Setting 'sample_rate' to value '48000'
[ffplay_abuffer @ 0x7f8404e180] Setting 'sample_fmt' to value 'fltp'
[ffplay_abuffer @ 0x7f8404e180] Setting 'time_base' to value '1/48000'
[ffplay_abuffer @ 0x7f8404e180] Setting 'channel_layout' to value 'stereo'
[ffplay_abuffer @ 0x7f8404e180] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:stereo
[ffplay_abuffersink @ 0x7f780054d0] auto-inserting filter 'auto_aresample_0' between the filter 'ffplay_abuffer' and the filter 'ffplay_abuffersink'
[AVFilterGraph @ 0x7f840f6e10] query_formats: 2 queried, 0 merged, 3 already done, 0 delayed
[auto_aresample_0 @ 0x7f780056e0] [SWR @ 0x7f780057b0] Using fltp internally between filters
[auto_aresample_0 @ 0x7f780056e0] ch:2 chl:stereo fmt:fltp r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz
[h264_rkmpp @ 0x7f840af2a0] Decoder noticed an info change (320x240), format=0
[h264_rkmpp @ 0x7f840af2a0] Buffer full
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
Video frame changed from size:0x0 format:none serial:-1 to size:320x240 format:yuv420p serial:1
[ffplay_buffer @ 0x7f70020c50] Setting 'video_size' to value '320x240'
[ffplay_buffer @ 0x7f70020c50] Setting 'pix_fmt' to value '0'
[ffplay_buffer @ 0x7f70020c50] Setting 'time_base' to value '1/90000'
[ffplay_buffer @ 0x7f70020c50] Setting 'pixel_aspect' to value '0/1'
[ffplay_buffer @ 0x7f70020c50] Setting 'frame_rate' to value '30000/1001'
[ffplay_buffer @ 0x7f70020c50] w:320 h:240 pixfmt:yuv420p tb:1/90000 fr:30000/1001 sar:0/1
[AVFilterGraph @ 0x7f70001ca0] query_formats: 2 queried, 1 merged, 0 already done, 0 delayed
[h264_rkmpp @ 0x7f840af2a0] Wrote 362 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
Created 320x240 texture with SDL_PIXELFORMAT_IYUV.
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame.10KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 463 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 542 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 101 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 334 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Buffer full
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 369 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 9KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 9KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 461 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 567 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 90 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 366 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Buffer full
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 363 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 7KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 7KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 490 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Wrote 466 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 57 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 357 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Buffer full
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 394 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 6KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 6KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 6KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 380 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Wrote 589 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 102 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 339 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Buffer full
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 366 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 6KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 6KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 7KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 423 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Wrote 502 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 146 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 372 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Buffer full
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 364 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 6KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 6KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 6KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 434 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Wrote 422 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 154 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 329 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Buffer full
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 308 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 5KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 6KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 412 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Wrote 430 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 90 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 322 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Buffer full
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 312 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 5KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 6KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 6KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 336 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Wrote 442 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 81 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 299 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Buffer full
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 226 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 5KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 5KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 5KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 386 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Wrote 402 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 82 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 217 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Buffer full
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 301 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 5KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 5KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 5KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 318 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Wrote 397 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 68 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 283 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Buffer full
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 270 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 4KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 4KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 4KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 358 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Wrote 385 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 76 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 249 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Buffer full
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 268 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 8KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 8KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 8KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 242 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Wrote 375 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 74 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 210 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Buffer full
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 258 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 8KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 8KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 8KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 288 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Wrote 419 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 76 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 197 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Buffer full
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 208 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 7KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 8KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 8KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 247 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Wrote 231 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 32 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 146 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Buffer full
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[aac @ 0x7f840c4df0] skip whole frame, skip left: 0
[h264_rkmpp @ 0x7f840af2a0] Wrote 4656 bytes to decoder  0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 3KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 4KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 4KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 366 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Wrote 87 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 180 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Wrote 253 bytes to decoder
[h264_rkmpp @ 0x7f840af2a0] Buffer full
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Wrote 260 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Received a frame.
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
[h264_rkmpp @ 0x7f840af2a0] Received a frame. 3KB sq=    0B f=0/0
[h264_rkmpp @ 0x7f840af2a0] Doing slow software conversion
^Corangepi@orangepi3b:~/FFmpeg$    9KB vq=    4KB sq=    0B f=0/0

@nyanmisaka
Copy link
Owner

Can u try this patch d6a05bf?

@Coloryr
Copy link
Author

Coloryr commented Mar 6, 2024

Can u try this patch d6a05bf?

Nope, it's still timeout, test version is

ffmpeg version 492ae5d Copyright (c) 2000-2023 the FFmpeg developers

image

@nyanmisaka
Copy link
Owner

@Coloryr
Copy link
Author

Coloryr commented Mar 6, 2024

Is work now

@nyanmisaka
Copy link
Owner

@Coloryr Can u try one more change and see if it still works? 9d14c5f

@Coloryr
Copy link
Author

Coloryr commented Mar 6, 2024

Ok, but need wait until I have some free time

@hbiyik
Copy link

hbiyik commented Mar 7, 2024

@nyanmisaka may be it is usefull to see -v trace output, i think the crucial part is buffer full msg which is logged in trace level.

av_log(avctx, AV_LOG_TRACE, "Decoder buffer is full\n");

If there are decoder is buffer full, then that dynamic buffer estimation might be sus.

r->queue_cnt++;

Still speculating though.. @Coloryr is it possible you dump the rtmp stream to a file, and upliad somewgere, so that we can reproduce?

Ps: sent from mobile.

@Coloryr
Copy link
Author

Coloryr commented Mar 7, 2024

@nyanmisaka may be it is usefull to see -v trace output, i think the crucial part is buffer full msg which is logged in trace level.

av_log(avctx, AV_LOG_TRACE, "Decoder buffer is full\n");

If there are decoder is buffer full, then that dynamic buffer estimation might be sus.

r->queue_cnt++;

Still speculating though.. @Coloryr is it possible you dump the rtmp stream to a file, and upliad somewgere, so that we can reproduce?

Ps: sent from mobile.

I think it's rk_mpp decoder issus, the stream can play ues VLC or other player.

@Coloryr
Copy link
Author

Coloryr commented Mar 7, 2024

@Coloryr Can u try one more change and see if it still works? 9d14c5f

Yes, it work.

@nyanmisaka
Copy link
Owner

nyanmisaka commented Mar 7, 2024

@Coloryr Can u try one more change and see if it still works? 9d14c5f

Yes, it work.

Thanks for the testing.

@hbiyik I’m thinking of switching back to the jeffyCN’s send-packet/get-frame logic. Because it finishes the task more elegantly and has lower decoding latency (even lower than what I handled in #8).

The only change is that we still cannot block during get-frame, otherwise some interlaced mpegts videos will not be able to bail out when errors occur, but will remain stuck. Also due to an assert in ffmpeg 6.1+, we can’t return EAGAIN in draining.

@nyanmisaka nyanmisaka added the bug Something isn't working label Mar 7, 2024
@hbiyik
Copy link

hbiyik commented Mar 7, 2024

i see, i remember jeffys loop had some implications in throughput and cpu load, and in some cases is spikes massively due to infinite loop, thats why i had switched to an algo which is high in throughput and high in latency and low in cpu usage. So there might be some trade offs there.

But my old fork was doing backlog management by its own unlike this fork, things might have changed, therefore it might be reasonable to have some benchmarks there.

Related:
JeffyCN/FFmpeg#18 (comment)
JeffyCN/FFmpeg#18 (comment)

@nyanmisaka
Copy link
Owner

i see, i remember jeffys loop had some implications in throughput and cpu load, and in some cases is spikes massively due to infinite loop, thats why i had switched to an algo which is high in throughput and high in latency and low in cpu usage. So there might be some trade offs there.

But my old fork was doing backlog management by its own unlike this fork, things might have changed, therefore it might be reasonable to have some benchmarks there.

Related: JeffyCN/FFmpeg#18 (comment) JeffyCN/FFmpeg#18 (comment)

Yes there is a trade-off here. I'd like to keep the rkmppdec latency close to RK gstreamer, otherwise there will be tons of user complaints.

Can you test the branch I mentioned above to see if it satisfies your requirements?

@hbiyik
Copy link

hbiyik commented Mar 7, 2024

yes, i will mos def, i got the hang of it.

@hbiyik
Copy link

hbiyik commented Mar 15, 2024

@nyanmisaka is there an ffmpeg way of measuring the decoder latency, i was in past using hand made print statements according to my taste, in the decoder and post processing them with excel, but it would be great if i could have some universal method of benchmarking the latency...

@nyanmisaka
Copy link
Owner

nyanmisaka commented Mar 15, 2024

IMHO, installing an RTSP server App on your Android phone and letting ffmpeg connect to the phone as a client is currently the most effective way to detect latency that I have found. You only need to compare ffplay on the computer side with the real-time recording on the phone screen.

https://play.google.com/store/apps/details?id=com.toysoft.rtspserverpro

@hbiyik
Copy link

hbiyik commented Mar 15, 2024

ok then ill setup an rtsp server and add some logging in the decoder to measure the decoder latency, it is really necessary to graph the latency by time to compare i guess, visual feedback can be deceiving.

@Coloryr
Copy link
Author

Coloryr commented Mar 26, 2024

It coming again with rtmp

ffplay -vcodec h264_rkmpp rtmp://192.168.12.10:1935/live/video -v debug
orangepi@orangepi3b:~$ ffplay -vcodec h264_rkmpp rtmp://192.168.12.10:1935/live/video -v debug
ffplay version 9501bc0 Copyright (c) 2003-2023 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: --prefix=/home/orangepi/ffmpeg --enable-gpl --enable-version3 --enable-libdrm --enable-rkmpp --enable-rkrga --enable-ffmpeg --enable-ffplay --enable-ffprobe --enable-avdevice --enable-indev=v4l2 --enable-indev=alsa --enable-outdev=alsa --enable-libmp3lame --enable-openal --enable-shared --disable-static
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100
xcb_connection_has_error() returned true
Initialized opengl renderer.
[AVFormatContext @ 0x7f80000c20] Opening 'rtmp://192.168.12.10:1935/live/video' for reading
[rtmp @ 0x7f80001240] No default whitelist set
[tcp @ 0x7f800017d0] No default whitelist set
[tcp @ 0x7f800017d0] Original list of addresses:
[tcp @ 0x7f800017d0] Address 192.168.12.10 port 1935
[tcp @ 0x7f800017d0] Interleaved list of addresses:
[tcp @ 0x7f800017d0] Address 192.168.12.10 port 1935
[tcp @ 0x7f800017d0] Starting connection attempt to 192.168.12.10 port 1935
[tcp @ 0x7f800017d0] Successfully connected to 192.168.12.10 port 1935
[rtmp @ 0x7f80001240] Handshaking...
[rtmp @ 0x7f80001240] Type answer 3
[rtmp @ 0x7f80001240] Server version 13.14.10.13
[rtmp @ 0x7f80001240] Proto = rtmp, path = /live/video, app = live, fname = video
[rtmp @ 0x7f80001240] Window acknowledgement size = 5000000
[rtmp @ 0x7f80001240] Max sent, unacked = 5000000 sq=    0B f=0/0
[rtmp @ 0x7f80001240] New incoming chunk size = 1024
[rtmp @ 0x7f80001240] Creating stream...
[rtmp @ 0x7f80001240] Sending play command for 'video'   0B f=0/0
[flv @ 0x7f80000c20] Format flv probed with size=2048 and score=100
[flv @ 0x7f80000c20] Before avformat_find_stream_info() pos: 13 bytes read:2054 seeks:0 nb_streams:0
[flv @ 0x7f80010de0] Format yuv420p chosen by get_format(). f=0/0
[flv @ 0x7f80010de0] Format yuv420p chosen by get_format(). f=0/0
[flv @ 0x7f80000c20] All info found0KB vq=    0KB sq=    0B f=0/0
[flv @ 0x7f80000c20] rfps: 29.750000 0.014687
[flv @ 0x7f80000c20] rfps: 29.833333 0.006555
    Last message repeated 1 times
[flv @ 0x7f80000c20] rfps: 29.916667 0.001682
[flv @ 0x7f80000c20] rfps: 30.000000 0.000067
    Last message repeated 1 times
[flv @ 0x7f80000c20] rfps: 60.000000 0.000270
    Last message repeated 1 times
[flv @ 0x7f80000c20] rfps: 120.000000 0.001079
    Last message repeated 1 times
[flv @ 0x7f80000c20] rfps: 240.000000 0.004316
[flv @ 0x7f80000c20] rfps: 29.970030 0.000273
    Last message repeated 1 times
[flv @ 0x7f80000c20] rfps: 59.940060 0.001091
    Last message repeated 1 times
[flv @ 0x7f80000c20] After avformat_find_stream_info() pos: 75374 bytes read:75374 seeks:0 frames:122
Input #0, flv, from 'rtmp://192.168.12.10:1935/live/video':
  Metadata:
    |RtmpSampleAccess: true
    Server          : NGINX RTMP (github.com/arut/nginx-rtmp-module)
    displayWidth    : 640
    displayHeight   : 480
    fps             : 30
    profile         :
    level           :
  Duration: 00:00:00.00, start: 7.655000, bitrate: N/A
  Stream #0:0, 81, 1/1000: Audio: mp3, 48000 Hz, stereo, fltp, 128 kb/s
  Stream #0:1, 41, 1/1000: Video: flv1, 1 reference frame, yuv420p, 640x480, 0/1, 199 kb/s, 30 fps, 30 tbr, 1k tbn
detected 4 logical cores
[ffplay_abuffer @ 0x7f800489d0] Setting 'sample_rate' to value '48000'
[ffplay_abuffer @ 0x7f800489d0] Setting 'sample_fmt' to value 'fltp'
[ffplay_abuffer @ 0x7f800489d0] Setting 'time_base' to value '1/48000'
[ffplay_abuffer @ 0x7f800489d0] Setting 'channel_layout' to value 'stereo'
[ffplay_abuffer @ 0x7f800489d0] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:stereo
[ffplay_abuffersink @ 0x7f80043200] auto-inserting filter 'auto_aresample_0' between the filter 'ffplay_abuffer' and the filter 'ffplay_abuffersink'
[AVFilterGraph @ 0x7f80003280] query_formats: 2 queried, 0 merged, 4 already done, 0 delayed
[auto_aresample_0 @ 0x7f80040cc0] [SWR @ 0x7f80058320] Using fltp internally between filters
[auto_aresample_0 @ 0x7f80040cc0] ch:2 chl:stereo fmt:fltp r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz
[h264_mp4toannexb @ 0x7f8000cde0] The input looks like it is Annex B already
[h264_rkmpp @ 0x7f8007f7e0] Format nv12 chosen by get_format().
[h264_rkmpp @ 0x7f8007f7e0] Created a RKMPP hardware device
[h264_rkmpp @ 0x7f8007f7e0] Decoder flushing
Audio frame changed from rate:48000 ch:2 fmt:fltp layout:stereo serial:-1 to rate:48000 ch:2 fmt:fltp layout:stereo serial:1
[h264_rkmpp @ 0x7f8007f7e0] Wrote 8050 bytes to decoder
[ffplay_abuffer @ 0x7f80043200] Setting 'sample_rate' to value '48000'
[ffplay_abuffer @ 0x7f80043200] Setting 'sample_fmt' to value 'fltp'
[ffplay_abuffer @ 0x7f80043200] Setting 'time_base' to value '1/48000'
[ffplay_abuffer @ 0x7f80043200] Setting 'channel_layout' to value 'stereo'
[ffplay_abuffer @ 0x7f80043200] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:stereo
[ffplay_abuffersink @ 0x7f80040cc0] auto-inserting filter 'auto_aresample_0' between the filter 'ffplay_abuffer' and the filter 'ffplay_abuffersink'
[h264_rkmpp @ 0x7f8007f7e0] Wrote 330 bytes to decoder
[AVFilterGraph @ 0x7f80003280] query_formats: 2 queried, 0 merged, 3 already done, 0 delayed
[h264_rkmpp @ 0x7f8007f7e0] Wrote 258 bytes to decoder
[auto_aresample_0 @ 0x7f800489d0] [SWR @ 0x7f74003a30] Using fltp internally between filters
[h264_rkmpp @ 0x7f8007f7e0] Wrote 193 bytes to decoder
[auto_aresample_0 @ 0x7f800489d0] ch:2 chl:stereo fmt:fltp r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz
[h264_rkmpp @ 0x7f8007f7e0] Wrote 218 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 206 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 201 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 212 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 305 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 215 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 197 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 240 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 8052 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 331 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 437 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 229 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 256 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 198 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 208 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 196 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 255 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Timeout getting decoded frame0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 213 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 256 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 213 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 8019 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 394 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 250 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 329 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 366 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 209 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 206 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 197 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 363 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 474 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 248 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 522 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 7991 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 240 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 200 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 188 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 199 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 240 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 339 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 234 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 260 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 207 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 223 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 256 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 8058 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 640 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 280 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 309 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 195 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 188 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 228 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 237 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 244 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 234 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 231 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 229 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 8064 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 372 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 220 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 204 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 226 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 239 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 336 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 230 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 200 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 223 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 244 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 336 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 8070 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 339 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 247 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 191 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 213 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 210 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 264 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 248 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 219 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 253 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 268 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 288 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 8045 bytes to decoder  0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 2048 bytes to decoder  0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 472 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 273 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 363 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 251 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 179 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 704 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 546 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 513 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 227 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 194 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 7978 bytes to decoder  0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 194 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 164 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 202 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 189 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 292 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 1001 bytes to decoder  0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 404 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 238 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 242 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 190 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 197 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 8033 bytes to decoder  0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 316 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 241 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 215 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 215 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 199 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 259 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 361 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 507 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 354 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 211 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 270 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 8007 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 358 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 330 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 213 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 179 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 233 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 684 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 463 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 409 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 325 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 202 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 325 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 7991 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 269 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 195 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 204 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 246 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 242 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 244 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 290 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 300 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 302 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 212 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 233 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 8045 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 427 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 242 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 269 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 207 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 263 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 538 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 295 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 324 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 354 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 457 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 254 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 7985 bytes to decoder  0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 185 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 185 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 193 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 198 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 240 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 237 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 251 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 225 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 380 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 276 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 634 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 8045 bytes to decoder  0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 513 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 299 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 191 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 229 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 209 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 228 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 233 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 342 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 254 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 256 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 289 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 8065 bytes to decoder  0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 493 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 344 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 201 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 216 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 240 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 406 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 426 bytes to decoder
[h264_rkmpp @ 0x7f8007f7e0] Wrote 444 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 378 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 224 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 210 bytes to decoder   0B f=0/0
[h264_rkmpp @ 0x7f8007f7e0] Wrote 8016 bytes to decoder  0B f=0/0
^CSegmentation fault

@hbiyik
Copy link

hbiyik commented Apr 9, 2024

@nyanmisaka sorry i will not have much time soon to look in to this, if you think it is ok, may be you can just merge jeffy's decoder loop to main.

@nyanmisaka
Copy link
Owner

Closing in 6f88a29 and 1fa586a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants