VideoHelp Forum




+ Reply to Thread
Results 1 to 4 of 4
  1. Member
    Join Date
    Sep 2025
    Location
    Poland
    Search PM
    Hi all,

    I’m trying to recover and play surveillance footage exported as a raw H.264 elementary stream with a companion .idx index file. Standard players and remux/repair attempts aren’t producing a clean, viewable file. I’d appreciate guidance on a workflow or flags that can repair timestamps/bitstream issues, or any vendor tool recommendations that can open this format.

    Source/context

    Footage comes directly from a CCTV/IP camera/DVR export as 22-30-00(02898d38).264 with a matching .idx file.

    Camera logs show typical CCTV behaviors (motion events, JPEG alarm snapshots, SD card file switches, day/night photosensor), so this seems like a vendor‑OEM raw H.264 stream without container metadata.

    Resolution detected at 1920x1080; nominal framerate appears to be 25 fps (based on FFmpeg probe/assumptions).

    No separate audio file is known; the .idx is likely an index used by the vendor player.

    Symptoms

    Many players show green/black image or refuse to open the .264:


    Image
    [Attachment 88848 - Click to enlarge]
    Image
    [Attachment 88849 - Click to enlarge]


    VLC (even with H.264 demuxer selected and hardware decode disabled).

    PotPlayer with external LAV Filters forced preferred (also tried disabling internal filters).

    MPC‑HC/LAV, 5KPlayer, etc.

    MKVToolNix GUI: adding .264 and setting Default duration/FPS produces an MKV that still doesn’t play reliably.

    Shutter Encoder GUI (Rewrap to MP4/MKV and H.264/AVC re‑encode) tried; rewrap often fails, re‑encode yields black/garbled video.

    What I’ve already tried

    VLC:

    Demuxer set to “H264 video demuxer.”

    Hardware acceleration disabled; tried different video output modules.

    PotPlayer + LAV Filters:

    Installed LAV Splitter/Video/Audio; added as registered filters and set Prefer; disabled PotPlayer internal filters; tried software decode only.

    MKVToolNix:

    Added .264 as AVC elementary stream, set “Default duration/FPS” to 25, enabled “Fix bitstream timing info,” multiplexed to MKV.

    Shutter Encoder:

    Rewrap to MP4/MKV (fails/black).

    H.264 (x264) re‑encode with CRF 18, preset veryfast; also tried “Conform”/FPS in Advanced features.

    FFmpeg remux and re‑encode attempts (details below).

    FFmpeg commands and result (exact log)
    Remux to MKV (no re‑encode):
    ffmpeg -fflags +genpts -r 25 -f h264 -i R:\1\2025-08-15\22-30-00(02898d38).264 -c:v copy R:\output.mkv

    Key output excerpt:
    [h264 @ 0000019fa6250f00] top block unavailable for requested intra mode -1
    [h264 @ 0000019fa6250f00] error while decoding MB 5 0, bytestream 124866
    [h264 @ 0000019fa6250f00] concealing 8160 DC, 8160 AC, 8160 MV errors in I frame
    ...
    [matroska @ 0000019fa70c0d00] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future.
    [h264 @ 0000019fa62de080] SEI type 240 size 192 truncated at 14
    [h264 @ 0000019fa62de080] reference overflow (pps)
    ...
    Input: 1920x1080, yuv420p, 25 fps, 40 tbr
    Output MKV written, but playback remains black/garbled.

    Also tried:

    Remux to MP4 with AUD insertion:
    ffmpeg -fflags +genpts -r 25 -f h264 -i input.264 -c:v copy -bsf:v h264_metadata=aud=insert -movflags +faststart output_aud.mp4

    Full “repair” re‑encode to H.264/MP4 with CFR:
    ffmpeg -r 25 -f h264 -i input.264 -vf "fps=25,setsar=1" -vsync cfr -pix_fmt yuv420p -c:v libx264 -preset veryfast -crf 18 -movflags +faststart output_cfr.mp4

    Observed issues

    Frequent H.264 decode errors: “top block unavailable…”, “non‑existing PPS referenced”, “SEI … truncated”, and “timestamps unset”.

    Even after -fflags +genpts and setting -r 25 on input, files often remain unplayable or show black/green frames.

    Re‑encode sometimes completes but yields unusable output.

    Goals

    Obtain a playable, forensically faithful file (preferably MKV/MP4) if possible without transcoding; if not, a visually correct transcode is acceptable.

    Understand if additional FFmpeg flags/filters could repair missing SPS/PPS/AUD/PTS or otherwise normalize the stream.

    Determine if this is a vendor‑specific/encrypted .264 variant that requires the original vendor player.

    This is example source
    https://mega.nz/file/FMRlkLKb#PbvYgorAs0hDcZIRJIgwd2eLzpIENLH-p6Hn05WGhqo
    Quote Quote  
  2. can't download your zip file, stops at 93%.
    There is nothing wrong with my environment
    Quote Quote  
  3. Member
    Join Date
    Sep 2025
    Location
    Poland
    Search PM
    File's good—I tested it. Make sure you've got around 2 GB free where your browser keeps its temp files.
    Quote Quote  
  4. Member
    Join Date
    Apr 2007
    Location
    Australia
    Search Comp PM
    Originally Posted by videoAI View Post
    can't download your zip file, stops at 93%.

    Same problem. Stopped @


    CCTV .7z 615.7 MB/695.7 MB
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!