2-channel video file splitter utility for Windows - New v2.1 splits entire folders!

Gibson99

Well-Known Member
Joined
Jun 20, 2014
Messages
9,293
Reaction score
8,079
Location
Houston, we've had a problem, Texas
Country
United States
Dash Cam
Yes
Some multi-channel dashcams encode their videos into one single file which contains both the front and rear video, as well as the audio. This is fine if the only thing you do is look at the videos in the dashcam company’s proprietary (and sometimes not very good) viewer software. But what if you need to export a clip for use in court, or just to put into your own videos, such as on youtube? Until now, you couldn’t do it very easily.

I have created a script which will make it much easier to break one or more single, combined files into individual files, so you can edit them however you want, using standard video editing software.

This post has been moved to my new website:
http://www.gibson99.com/2015/05/2-channel-video-file-splitter-utility.html

I'll leave this thread here for discussion, and will update it if i release any new versions, but if you need a copy of the script or its documentation, please go to my site, thanks!
 
Last edited:
Cameras this works with:
  • BlackSys CF-100 - AVI files
  • Innotek Smart-i 3500 HD - AVI files
  • Lukas LK5900- DUO - AVI files
  • Thinkware F550 (Only tested video so far, will test audio later) - AVI files
  • JaewonCNC Iroad Ione 3300ch - MP4 files (support added in v1.02)
  • Cowon Auto Capsule AN2
The script will probably work with other cameras too!
It was originally written and tested using only files from the CF-100, but it works perfectly with other models without any modification. Just give it a try and don't forget to let us know whether or not it worked for you, so that we can add your camera to this list!
 
Last edited:
When muxing also the audio it is OK, but when I am not muxing it, the program is crashing with this error.
error.jpg
An old archive from me is this and is containing the original file which was tested with your tool and some other interesting things.
Also my MPC-HC video player is not displaying the image of the resulted video when output is correct but maybe this is my PC problem because with VLC the playback is OK. The original dual channel file is played correct with MPC-HC.

enjoy,
Mtz
 
line 155 is attempting to delete the batch file that was temporarily created (AVI-Splitter-temp.bat) to do the actual splitting, since for some reason, the command line the VBS built wouldn't work natively in VBS.

ahh, i see the problem. I was trying to add quotes around the string containing the batch filename, and that will cause exactly the error you're getting. No worries - this is not harmful to your computer as the only thing that's going wrong is it's not deleting a temp file. you can easily delete it yourself, or just ignore it and it will get overwritten next time you run the script. I'm re-testing now and once that's done, I'll upload a new version to the second post above.

not sure why media player classic (that's what you mean by MPC, right?) would have issues with the split file while the original works fine, and VLC works, too. I did my post-split playback testing with VLC as well.
 
Tested...and approved - thanks for this handy little tool.

If version 2.0 could demux multiple files that would be cool. Would also be nice if you can chose audio for front OR rear :)

BTW: My camera is a Lukas LK5900- DUO
 
I tried to make it so you could drag n drop a file (or three or more) onto the vbscript but for whatever reason it wouldn't seem to recognize having ffmpeg in the same dir as the script. My guess is it sets the working directory to wherever your source file is. I can probably make it work but I had a short window of time where I could work on the script and wanted to make something usable on that time frame, which I did.

I would also like to make it where you could just have a bunch of checkboxes rather than having it ask you a bunch of questions, but VB script isn't that fancy. Power shell could probably do it but I'm not as familiar with it as I am with vbs yet. Plus I would have to teach people how to enable running unsigned scripts, which isn't always easy to explain to a casual computer user. Which defeats the purpose of this script.

Thanks for your feedback! I'll try to see about adding your requests in the future, and will add your camera model to the list now!
 
I tried it on my Thinkware F550. I have the audio off so I can't speak to how the audio comes out in the end, but it works the very best with the video. Thank you very much for your work on this.
 
I tried it on my Thinkware F550. I have the audio off so I can't speak to how the audio comes out in the end, but it works the very best with the video. Thank you very much for your work on this.
you can look in the log file and see if the audio stream is listed as being PCM - the cam may have still written header info but not put any data. then again if they did it right, the 3rd stream (#2 since they start with #0) will be empty. depends on how lazy the firmware coders are. ;)

thanks for giving us the model of your camera. added to list!
 
I tried to post the log file, but the forum wouldn't let me. I can get it to you if you want to see it.
 
sure, my email is Jason@(my username).com

if something didn't work, i may need a video file from your dashcam to test with. but if everything worked as expected, i don't need the log file.
 
Nothing wrong, but since I know nothing about programming and it was a camera that hadn't been tested on I wanted to offer up the log file if you wanted it.
 
Thanks. only thing I'd be interested in seeing is whether the third stream is encoded in pcm or something else. You can easily check the logs to look for it where it lists all the streams it finds in the source file.
 
It does list all the streams, 0, 1, 2. I'll turn on the sound sometime in the next little bit see how it soundsafter running it through the utility. I keep the audio off. If I ever want it on for some reason, it is just a press of a button.
 
Tested using a raw file from @GTA Driver who uses a JaewonCNC Iroad Ione 3300ch. Turns out ffmpeg doesn't care which channel the audio is on in this file. in the Blacksys cf-100 and all others we've tried here so far, ch0 is front video, ch1 is rear video, and ch2 is audio. in this Jaewon unit, ch0 is audio, ch1 is front video and ch2 is rear video. ffmpeg recognizes that ch0 is an audio track so it calls it audio channel zero, and the first video track (even though it's ch1 in this camera) is video channel zero. So all I had to do was make my script allow both AVI and MP4 files, and it works fine. Uploading new version shortly!
 
Last edited:
It works great. Easier than using the Dos command. Thanks for taking the time to add my Iroad 3300ch.
 
Question on the mechanics of the script. I was anticipating being asked what model I have to determine the parameters in DOS. Is there a header in MP4 and AVI files that determines the manufacturer and model number?

If so I would should not be surprised as JPGs store this information and I wrote a unix script two years ago that looks for that and then sorts the up on model number on date taken. I was considering writing a Linux bash script file where one would have to specify the make and model number, but it would be better if the script determined that for you.
 
that's way more complicated than it needs to be. i don't see a need to maintain a database of compatible models in the script. i only list them here so users can easily see that certain models will in fact work with this script. the only thing i'm checking in the script is whether the input file you specify in the beginning ends with .avi or .mp4, and if it doesn't, it tells you and lets you pick a different file. i could have made it quicker and simpler, but it isn't hard to add a few loops here and there to make it more user friendly.

basically the script assumes that you already know your video file is multi channel and tries to split it based on what ffmpeg finds inside. i imagine if you fed it a file that only has one video and one audio track, it would just output a copy of the front (with or without audio) and a blank file for rear video. i never tried that. but it shouldn't hurt anything to try... :)

first rule in software design: K.I.S.S. ;)
 
Back
Top