heyy i m makin a video splitter in VB 6.0...the problem is that wen i split a video file is 2 parts or more only ...the video gets splitted but only the first splitted video runs...others do not....i know the header wud not be present in other videos...now wat shud i do to make the other videos work...wat is the concept......

Dani AI

Generated

A concise, practical follow-up to (and building on ): pieces created by simply chopping bytes will often be unreadable because most containers carry indexing/metadata and codecs need a decodable first frame. Two practical routes from VB6 that avoid doing low-level container/codec work yourself.

  1. Use a battle-tested tool (recommended)
  • Ship ffmpeg and call it from VB6 to cut without re-encoding (fast) or with re-encoding when needed (safe). Example command:

    ffmpeg -i "input.mp4" -ss 00:01:00 -t 00:00:30 -c copy "part1.mp4"

    A minimal VB6 call using WScript.Shell:

    Dim sh As Object
    Set sh = CreateObject("WScript.Shell")
    sh.Run "ffmpeg -i ""input.mp4"" -ss 00:01:00 -t 00:00:30 -c copy ""part1.mp4""", 0, True
  • Caution: lossless copy requires cut points on keyframes. If you need arbitrary cut points, re-encode the head of a segment (or the whole piece) so decoders get a valid starting frame. FFmpeg docs explain formats and options: FFmpeg documentation.

  1. Integrate a library (advanced)
  • For AVI you must rebuild RIFF/chunk sizes and the index; for MP4 you must rebuild the moov/sample tables. Use the platform APIs (AVIFile/DirectShow) or a library (Bento4/GPAC) if you must implement splitting inside your app. See the AVI RIFF reference for structure details: .

Summary: the fastest, most reliable VB6 approach is invoking ffmpeg (or MP4Box/Bento4) and ensuring splits start on keyframes or re-encoding the first GOP.

Recommended Answers

All 2 Replies

oof. That's a heck of a job. I would imagine you would need to include the header in the other files as well, and PROBABLY have to modify the header so that it holds the new size of the split file.

but wat if i want the software to do it automatically...how wud i do it??reply asap...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.