Skip to content

bug with detection video size at 264 and 265 #166

Closed

Description

@sansarus

just change 265 to 264 decoder show different size but vls and ffrobe not.
bigger resolution of stream not start (maybe because of size bug too)

ffprobe -i rtsp://192.168.1.25:554/stream1
Stream #0:0: Video: hevc (Main), yuvj420p(pc, bt709), 1920x1080, 25 fps, 25 tbr, 90k tbn, 25 tbc

but decoder say

"ui_thread": "ok",
"mode": "single",
"active_slot": 1,
"single": {
"url": "rtsp://192.168.1.25:554/stream1",
"transport": "TCP (auto)",
"transport_mode": "AUTO",
"video": true,
"status": "connected",
"size": "2304x1088",
"codec": "H.265",
"audio": "PCMU",
"out_fps": 24,
"decode": "full"

and

Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 1920x1080, 25 fps, 25 tbr, 90k tbn, 50 tbc

decoder say
ui_thread": "ok",
"mode": "single",
"active_slot": 1,
"single": {
"url": "rtsp://192.168.1.25:554/stream1",
"transport": "TCP (auto)",
"transport_mode": "AUTO",
"video": true,
"status": "connected",
"size": "1920x1088",
"codec": "H.264",
"audio": "PCMU",
"out_fps": 12,
"decode": "full"

Activity

  1. compot-dev commented on Oct 14, 2026

    @compot-dev
    Collaborator

    Thanks for the report and the ffprobe output, that made the size problem easy to find.

    Size. The app took the size from the decoder's output buffer, which is padded to the decoder's alignment, and not from the visible picture (the crop rectangle):

    • H.264 1080p showed as 1920×1088 (16-line macroblocks). This happens on every device.
    • On your device the H.265 decoder pads the width as well, so 1920×1080 became 2304×1088. The single view also fitted the picture to that size, so the picture was probably squeezed horizontally (2.12:1 instead of 16:9).

    The fix is in #167: the size now comes from the crop rectangle. I'll post here when the build is released.

    Higher resolution does not start. This is probably a separate problem. Could you tell us:

    1. Which device is it (model, Android version)? The menu next to Exit shows the app version.
    2. Which stream does not start: resolution, codec, fps (ffprobe output like above)?
    3. What the screen shows: an error text, a black picture, or the status?
    4. If possible, http://<device>:8085/stats.json and http://<device>:8085/log while it fails (check that no password is in the log).

    The output-buffer width 2304 suggests the decoder aligns to a large block size, so its resolution limit can also be lower than expected. stats.json lists the decoders and the frame rate each one supports at 1080p.

    Also, H.264 showed out_fps: 12 while the camera sends 25. Did the H.264 picture look jerky?

  2. added a commit that references this issue on Oct 14, 2026
  3. compot-dev commented on Oct 14, 2026

    @compot-dev
    Collaborator

    The size fix is released in v2.04 (#167). On our test box 1080p streams now show as 1920×1080 (H.264 and H.265, before: 1920×1088), and 720p as 1280×720. On your device the H.265 stream should show as 1920×1080 instead of 2304×1088, and the single view should keep its 16:9 shape.

    Could you check it, and send the details asked above for the higher resolution that does not start?

  4. sansarus commented on Oct 16, 2026

    @sansarus
    MemberAuthor

    1080p show correct size and fps.

    bigger - stil not work ("version": "2.13")
    Stream #0:0: Video: hevc (Main), yuvj420p(pc, bt709), 2304x1296, 25 fps, 25 tbr, 90k tbn, 25 tbc

    {
    "app": "OpenIPC Decoder",
    "version": "2.13",
    "git": "584c8e4",
    "time": "2026-10-16 04:15:16",
    "uptime_s": 537,
    "device": "rockchip HY300 · rk30board · board ChipTrip",
    "android": "11 (SDK 30)",
    "screen": "1024x600",
    "addresses": [
    "http://192.168.220.89:8085/"
    ],
    "server": "listening",
    "decoders": [
    {
    "name": "OMX.rk.video_decoder.avc",
    "type": "video/avc",
    "hardware": true,
    "adaptive": true,
    "max_instances": 6,
    "fps_1080p": 60
    },
    {
    "name": "OMX.rk.video_decoder.h263",
    "type": "video/3gpp",
    "hardware": true,
    "adaptive": true,
    "max_instances": 6
    },
    {
    "name": "OMX.rk.video_decoder.hevc",
    "type": "video/hevc",
    "hardware": true,
    "adaptive": true,
    "max_instances": 6
    },
    {
    "name": "OMX.rk.video_decoder.m4v",
    "type": "video/mp4v-es",
    "hardware": true,
    "adaptive": true,
    "max_instances": 6
    },
    {
    "name": "OMX.rk.video_decoder.vp8",
    "type": "video/x-vnd.on2.vp8",
    "hardware": true,
    "adaptive": true,
    "max_instances": 6,
    "fps_1080p": 60
    },
    {
    "name": "c2.android.avc.decoder",
    "type": "video/avc",
    "hardware": false,
    "adaptive": true,
    "max_instances": 32
    },
    {
    "name": "OMX.google.h264.decoder",
    "type": "video/avc",
    "hardware": false,
    "adaptive": true,
    "max_instances": 32
    },
    {
    "name": "c2.android.h263.decoder",
    "type": "video/3gpp",
    "hardware": false,
    "adaptive": true,
    "max_instances": 32
    },
    {
    "name": "OMX.google.h263.decoder",
    "type": "video/3gpp",
    "hardware": false,
    "adaptive": true,
    "max_instances": 32
    },
    {
    "name": "c2.android.hevc.decoder",
    "type": "video/hevc",
    "hardware": false,
    "adaptive": true,
    "max_instances": 1
    },
    {
    "name": "OMX.google.hevc.decoder",
    "type": "video/hevc",
    "hardware": false,
    "adaptive": true,
    "max_instances": 1
    },
    {
    "name": "c2.android.mpeg4.decoder",
    "type": "video/mp4v-es",
    "hardware": false,
    "adaptive": true,
    "max_instances": 2
    },
    {
    "name": "OMX.google.mpeg4.decoder",
    "type": "video/mp4v-es",
    "hardware": false,
    "adaptive": true,
    "max_instances": 2
    },
    {
    "name": "c2.android.vp8.decoder",
    "type": "video/x-vnd.on2.vp8",
    "hardware": false,
    "adaptive": true,
    "max_instances": 1
    },
    {
    "name": "OMX.google.vp8.decoder",
    "type": "video/x-vnd.on2.vp8",
    "hardware": false,
    "adaptive": true,
    "max_instances": 1
    },
    {
    "name": "c2.android.vp9.decoder",
    "type": "video/x-vnd.on2.vp9",
    "hardware": false,
    "adaptive": true,
    "max_instances": 1
    },
    {
    "name": "OMX.google.vp9.decoder",
    "type": "video/x-vnd.on2.vp9",
    "hardware": false,
    "adaptive": true,
    "max_instances": 1
    }
    ],
    "ui_thread": "ok",
    "mode": "single",
    "active_slot": 1,
    "single": {
    "url": "rtsp://192.168.1.25:554/stream1",
    "transport": "TCP (auto)",
    "transport_mode": "AUTO",
    "video": false,
    "status": "connected",
    "size": "1920x1080",
    "codec": "H.265",
    "audio": "PCMU",
    "out_fps": 0,
    "decode": "full"
    },
    "slots": [
    {
    "slot": 1,
    "on_screen": true,
    "url": "rtsp://192.168.1.25:554/stream1",
    "transport": "TCP (auto)",
    "transport_mode": "AUTO",
    "video": false,
    "text": "connected"
    },
    {
    "slot": 2,
    "on_screen": false,
    "video": false,
    "text": "not configured",
    "probe": {
    "state": "not checked"
    }
    },
    {
    "slot": 3,
    "on_screen": false,
    "video": false,
    "text": "not configured",
    "probe": {
    "state": "not checked"
    }
    },
    {
    "slot": 4,
    "on_screen": false,
    "video": false,
    "text": "not configured",
    "probe": {
    "state": "not checked"
    }
    }
    ]
    }

    Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 2304x1296, 25 fps, 25 tbr, 90k tbn, 50 tbc

    {
    "app": "OpenIPC Decoder",
    "version": "2.13",
    "git": "584c8e4",
    "time": "2026-10-16 04:20:49",
    "uptime_s": 870,
    "device": "rockchip HY300 · rk30board · board ChipTrip",
    "android": "11 (SDK 30)",
    "screen": "1024x600",
    "addresses": [
    "http://192.168.220.89:8085/"
    ],
    "server": "listening",
    "decoders": [
    {
    "name": "OMX.rk.video_decoder.avc",
    "type": "video/avc",
    "hardware": true,
    "adaptive": true,
    "max_instances": 6,
    "fps_1080p": 60
    },
    {
    "name": "OMX.rk.video_decoder.h263",
    "type": "video/3gpp",
    "hardware": true,
    "adaptive": true,
    "max_instances": 6
    },
    {
    "name": "OMX.rk.video_decoder.hevc",
    "type": "video/hevc",
    "hardware": true,
    "adaptive": true,
    "max_instances": 6
    },
    {
    "name": "OMX.rk.video_decoder.m4v",
    "type": "video/mp4v-es",
    "hardware": true,
    "adaptive": true,
    "max_instances": 6
    },
    {
    "name": "OMX.rk.video_decoder.vp8",
    "type": "video/x-vnd.on2.vp8",
    "hardware": true,
    "adaptive": true,
    "max_instances": 6,
    "fps_1080p": 60
    },
    {
    "name": "c2.android.avc.decoder",
    "type": "video/avc",
    "hardware": false,
    "adaptive": true,
    "max_instances": 32
    },
    {
    "name": "OMX.google.h264.decoder",
    "type": "video/avc",
    "hardware": false,
    "adaptive": true,
    "max_instances": 32
    },
    {
    "name": "c2.android.h263.decoder",
    "type": "video/3gpp",
    "hardware": false,
    "adaptive": true,
    "max_instances": 32
    },
    {
    "name": "OMX.google.h263.decoder",
    "type": "video/3gpp",
    "hardware": false,
    "adaptive": true,
    "max_instances": 32
    },
    {
    "name": "c2.android.hevc.decoder",
    "type": "video/hevc",
    "hardware": false,
    "adaptive": true,
    "max_instances": 1
    },
    {
    "name": "OMX.google.hevc.decoder",
    "type": "video/hevc",
    "hardware": false,
    "adaptive": true,
    "max_instances": 1
    },
    {
    "name": "c2.android.mpeg4.decoder",
    "type": "video/mp4v-es",
    "hardware": false,
    "adaptive": true,
    "max_instances": 2
    },
    {
    "name": "OMX.google.mpeg4.decoder",
    "type": "video/mp4v-es",
    "hardware": false,
    "adaptive": true,
    "max_instances": 2
    },
    {
    "name": "c2.android.vp8.decoder",
    "type": "video/x-vnd.on2.vp8",
    "hardware": false,
    "adaptive": true,
    "max_instances": 1
    },
    {
    "name": "OMX.google.vp8.decoder",
    "type": "video/x-vnd.on2.vp8",
    "hardware": false,
    "adaptive": true,
    "max_instances": 1
    },
    {
    "name": "c2.android.vp9.decoder",
    "type": "video/x-vnd.on2.vp9",
    "hardware": false,
    "adaptive": true,
    "max_instances": 1
    },
    {
    "name": "OMX.google.vp9.decoder",
    "type": "video/x-vnd.on2.vp9",
    "hardware": false,
    "adaptive": true,
    "max_instances": 1
    }
    ],
    "ui_thread": "ok",
    "mode": "single",
    "active_slot": 1,
    "single": {
    "url": "rtsp://192.168.1.25:554/stream1",
    "transport": "TCP (auto)",
    "transport_mode": "AUTO",
    "video": false,
    "status": "connected",
    "size": "1920x1080",
    "codec": "H.264",
    "audio": "PCMU",
    "out_fps": 0,
    "decode": "full"
    },
    "slots": [
    {
    "slot": 1,
    "on_screen": true,
    "url": "rtsp://192.168.1.25:554/stream1",
    "transport": "TCP (auto)",
    "transport_mode": "AUTO",
    "video": false,
    "text": "connected"
    },
    {
    "slot": 2,
    "on_screen": false,
    "video": false,
    "text": "not configured",
    "probe": {
    "state": "not checked"
    }
    },
    {
    "slot": 3,
    "on_screen": false,
    "video": false,
    "text": "not configured",
    "probe": {
    "state": "not checked"
    }
    },
    {
    "slot": 4,
    "on_screen": false,
    "video": false,
    "text": "not configured",
    "probe": {
    "state": "not checked"
    }
    }
    ]
    }

    stats.json see codec change but not recognize resolution (decoder show freeze image since 1080p )

    log.txt

  5. compot-dev commented on Oct 16, 2026

    @compot-dev
    Collaborator

    Thanks, the log helped. When the app connects to the 2304×1296 stream, OMX.rk.video_decoder.avc starts and allocates its buffers but never outputs a frame, while 1080p from the same camera plays. So it isn't a size-detection problem but a decoder setup one: the app configures the decoder for a small picture and lets it learn the real size from the stream, and this Rockchip decoder apparently doesn't grow beyond 1080p that way.

    There's a test build that tells the decoder the largest picture it supports up front (single view only):

    APK: https://github.com/OpenIPC/decoder/releases/download/hy300-166-test1/decoder-hy300-test1.apk
    (version 2.14, 6dd18a2; it installs over 2.13 and keeps the settings)

    Could you try 2304×1296 in H.264 and H.265 with it? If it still doesn't play, please attach http://<device>:8085/log again. With this build it should have a line Decoder OMX.rk.video_decoder.…: pictures up to ….

  6. added
    tomorrowPlanned for the next day
    todayTasks for today
    and removed
    tomorrowPlanned for the next day
    on Oct 16, 2026
  7. compot-dev commented on Oct 18, 2026

    @compot-dev
    Collaborator

    @sansarus, a gentle reminder: could you try the test build from the comment above on your HY300 when you have a moment?

    APK: https://github.com/OpenIPC/decoder/releases/download/hy300-166-test1/decoder-hy300-test1.apk

    Please tell us whether the 2304×1296 stream now plays in the single view, and attach the debug page JSON if it does not. The fix (#220) waits for your result before it goes into a release.

  8. sansarus commented on Oct 19, 2026

    @sansarus
    MemberAuthor

    12. @sansarus, a gentle reminder: could you try the test build from the comment above on your HY300 when you have a moment?
    APK: https://github.com/OpenIPC/decoder/releases/download/hy300-166-test1/decoder-hy300-test1.apk
    Please tell us whether the 2304×1296 stream now plays in the single view, and attach the debug page JSON if it does not. The fix (#220) waits for your result before it goes into a release.

    report-20261019-105029_HY300.txt

  9. sansarus commented on Oct 19, 2026

    @sansarus
    MemberAuthor

    v2.17

    report-20261019-110012__v2_17.txt

    report-20261019-110012__v2_17_after_720p.txt

    "size": "1280x720", - show last working stream (not actual)

  10. compot-dev commented on Oct 19, 2026

    @compot-dev
    Collaborator

    @sansarus, thank you for the three reports, they show what went wrong with test build 1.

    Why test 1 did not help. It only told the decoder a larger size when the decoder itself declares support for it. Your HY300's Rockchip decoders (OMX.rk.video_decoder.avc / .hevc) declare nothing above 1080p, so test 1 changed nothing there: its log has no pictures up to line, and the decoder started at 1280×720 as in 2.17. 720p and 1080p play; 2304×1296 gives no frame.

    Test build 2 works differently:

    • it reads the picture size from the stream itself (the SPS) and sets the decoder up for exactly that size, e.g. 2304×1296;
    • if the hardware decoder still gives no frame within 5 s at a size it does not declare, the app switches that stream to Android's software decoder. The picture may then be slower, but it should be there;
    • in stats.json, size is now shown only while a picture is on screen (you were right, it kept the size of the previous stream), and there are two new fields: stream_size (what the camera sends) and decoder (which decoder plays it).

    APK: https://github.com/OpenIPC/decoder/releases/download/hy300-166-test2/decoder-hy300-test2.apk
    (version 2.17.1, 35f2bc8; it installs over 2.17 and keeps the settings)

    Could you try 2304×1296 in H.264 and in H.265 in the single view, and send a report (long press on Debug) for each? The log will show either Decoder OMX.rk…: stream 2304×1296 … followed by the picture, or No frame from OMX.rk… : software decoder. In the second case, please also tell us whether the picture is smooth, and out_fps from the report.

  11. sansarus commented on Oct 20, 2026

    @sansarus
    MemberAuthor

    report-20261020-110751._hy300_v2txt.txt

    Can show 2560x1440 but too hard (lags, drops, artifacts)

    & at this log too.

  12. compot-dev commented on Oct 20, 2026

    @compot-dev
    Collaborator

    @sansarus, thank you for testing build 2, your report confirms the fix, and it is now released as 2.18.2: https://github.com/OpenIPC/decoder/releases/tag/latest (decoder-v2.apk).

    What your log shows. The HY300's hardware decoder (OMX.rk.video_decoder.avc) gives no picture above 1080p. After 5 s without a frame the app now hands such a stream to the software decoder (c2.android.avc.decoder), and the 2560×1440 stream plays, at about 18 fps in your report.

    Why it is heavy. Software decoding of 2560×1440 at ~6.8 Mbit/s is close to the limit of the HY300's processor. In your log the decoder fell behind a few times in the first minute and restarted, which is the lag, drops and artifacts you saw. The app cannot make this smoother on that device.

    For a smooth picture, use a smaller stream from the camera in that slot, 1920×1080 or lower: most cameras have a second stream (often subtype=1 instead of subtype=0, or a "sub stream" in the camera settings). That one plays on the hardware decoder.

    The test pre-release is removed now. If 2.18.2 behaves differently from test build 2, please reopen this issue with a new report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions