I have a CCTV system that lets me back up the recordings as AVI (H264). Unfortunately, the format is not standard and I can't use the files in After Effects or Premiere. They also do not work correctly in Windows 10 Films & TV, VLC. Handbrake won't touch them and complains "No valid source of titles found". They do play with Windows 10 Windows Media Player and Kodi
Avidemux does allow me to transcode them after initially complaining about "Malformed Header". I'd rather not add yet another transcode to my workflow if possible as the files are quite low quality to start with and the transcoded versions would take up too much space as there are many hours of recordings.
I've contacted the manufacturers, but I'm not expecting anything back.
avifixed, divfix, avirepair won't fix it.
I really need to be able to get them to work directly with Adobe products, can anyone help?
**I've included the file and details:**
No audio was recorded
CCTV Model: Zosi H.264 HD 1080P DVR - ZR04LN/10
Filename: CH03-2018-02-25-14-12-57
Dropbox: https://www.dropbox.com/s/v6odt6a5ggxvbew/CH03-2018-02-25-14-12-57.avi?dl=0 (~8mb)
VirtualDub won't open it: https://forum.videohelp.com/images/imgfiles/MuzyCkj.png
MediaInfo: https://forum.videohelp.com/images/imgfiles/zGb7O5d.png
VideoInspector: https://forum.videohelp.com/images/imgfiles/uOTJOAD.png
GSpot: https://forum.videohelp.com/images/imgfiles/o0Rg1S5.png
VirtualDub: https://forum.videohelp.com/images/imgfiles/8XTrLcp.png https://forum.videohelp.com/images/imgfiles/f6A0h4x.png
Avidemux: https://forum.videohelp.com/images/imgfiles/nZ0yBes.png
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 25 of 25
Thread
-
-
It opens directly in after effects cc and premiere cc for me . Perhaps you are using an older version ?
-
VirtualDub can open the video if you have the right source filters and VFW decoder. Or you can just use VirtualDub FilterMod which has such things built-in.
As was pointed out, you can easily remux to MP4 or MKV, whatever your software accepts. You can do this with ffmpeg in a batch file. For example, put this in a batch file called Remux to MP4.bat:
Code:"C:\Program Files\ffmpeg\bin\ffmpeg.exe" -i "%~1" -vcodec copy -acodec copy -absf aac_adtstoasc "%~dpn1.mp4"
-
This worked wonderfully. I have no idea how I never tried this combo myself. Probably that I couldn't see the trees for the woods!.
I wrote a batch script for this, which I don't know how to remove the "malformed header" warning.
Thank you very much!!!!
Code:set avidemux="C:\Program Files\Avidemux 2.7 - 64 bits\avidemux.exe" set videocodec=Copy set audiocodec=AAC (FDK) set outputformat=MP4 for %%f in (*.avi) do %avidemux% --videoprocess false --video-codec %videocodec% --audio-codec %audiocodec% --output-format %outputformat% --force-alt-h264 --load "%%f" --save "%%f.mp4" --quit
-
interestingly enough even though vegas pro14 wouldn't open the avi file, premiere pro cs6 imports it without a problem.
[Attachment 44779 - Click to enlarge]--
"a lot of people are better dead" - prisoner KSC2-303 -
It seems the video is also variable frame rate, which is causing havoc with audio sync issues.
So it looks like I'll have to transcode too, meaning a re-compression of the video losing quality.. /sigh.
What are the best options for this in Avidemux to preserve quality? Again I can't go to a large intermediary format. -
-
As I mentioned, because this is CCTV footage with a huge amount of files *and* will be a frequent event, making the number of files even more. We simply do not have the storage for HQ intermediary files, nevermind lossless files. I'd like to transcode to a very similar format to the source, without losing much at all if possible. In my mind, many of the frames will be exactly the same so some sort of copy or passthrough for those that are not being changed due to the timing of VBR to CBR conversion.
-
everything i open the avi with says it's cfr 29.97. what says different? and what audio? there is none in the avi you uploaded.
--
"a lot of people are better dead" - prisoner KSC2-303 -
AVI does not support VFR . You must be referring to the re-wrapped file in MP4 container, there are probably errors with the timecodes
It opens up in AE CC 2015 as well for me, and aedipuss imported it into PP CS6 .... are you on Windows version of Adobe ? -
-
Yes, correct. The mp4 conversion:
[Attachment 44784 - Click to enlarge]
They open up in Adobe on windows yes, but they are VFR so the audio goes out of sync from an externally record from a DR-05 @ 48khz -
External audio can be problematic, unless you have genlock or some method of running off the same clock . You almost always have some drift on longer recordings.
But that's probably an additional issue . I'm just wondering why it doesn't import correctly in your version of Adobe -
have you updated your pp cc 2015? hard to believe cs6 can open and use the avi and cc can't.
--
"a lot of people are better dead" - prisoner KSC2-303 -
-
-
Usually not that easily. If you're lucky it might work ok; but usually drift means there is some progressive sync issue . You have to stretch or shrink either the audio or video to match. Unfortunately that' s only if it's entirely linear. Most often it's not. You end up having to manually edit and sync up sections. ughhh!
Short clips usually don't have a problem . If you have long recordings ,you're likely in trouble . I'm guessing the CCTV usage scenario is going to be long clips...
Right now, I think it would be a better starting point with the AVI . Even if that has sync drift , that's not going to be compounded by your timecode errors.
But there is something buggy about your AVI which might be the cause of the MP4 timecode errors - how was it processed ? Was recording abruptly stopped, power outage, or some form of cutting used ? -
I was afraid the timing would be non-linear. You're also correct that the files contain hours of video.
The AVIs are created by using the "backup" feature of the CCTV which seem to have a non-standard format.
I've no idea how the conversion process outlined near the top of the thread has made the AVI (which are CFR) become VFR when changed to MP4s
I have a feeling that they were always VFR/MP4 and that the CCTV incorrectly just dumps them into an AVI container, but that's a guess.
I used Avidemux with the following settings:
Video Output : Copy
Audio Output : AAC (FDK)
Output Format: MP4 Muxer
Everything else just defaults.
I just manually converted one again and it's changed to VFR. -
gspot reports error in your AVI "bad chunk in frame data: invalid length" - I was wondering if it was representative of an AVI you pull off the machine. Do all of them act like this ? Or did you process it , or cut it, or edit it in some way ?
There are some discrepancies between the actual coded frames and the timing information. That's probably why the re-wrapped MP4 is VFR .
gspot reports 1410frames and 47.047sec duration
mediainfo reports 1388frames and 46.313sec duration
media players like mpchc, potplayer report 1min 3sec duration
elementary stream only has 694 frames, unless there are errors in demuxing the video stream . But this would only be ~23seconds at 29.97 fps
all this conflicting data, none of them correlate. Very buggy AVI.
When you import the AVI directly into PP ,it actually gets converted to CFR , with duplicates, to keep the 29.97 timing . I keep an older version of AE CC2015 (because of some compatibility issues with some scripts and plugins) , and that imports the AVI as well -
Yes they all have that error, it's "normal" for that system. It could be a side effect of the CCTV's internal conversion from it's internal format to AVI for backups.. I have no control over that.
I've just tried importing one of the source AVIs into PP CC 2015 again and always get this error:
[Attachment 44785 - Click to enlarge]
I'm using APP CC 2015.0 9.0.0. (247) Build. -
Have you tried installing a VFW h.264 decoder? Maybe your programs will open the original AVI file with that.
-
I installed x264vfw which allowed me to import the AVIs directly into PP without needing to convert them into mp4's.
I also had to interpret the footage as 29.97. Which made the framerate correct and the length correct.
A whole ~8h sequence made from ~30 files is 3 seconds longer than the same sequence converted from ~30 AVI->MP4.
So I wonder if that now contains the extra frames that were missing that caused the audio sync issue?
I'll have to test this further thanks. -
AVI doesn't support variable frame rates. So the length of the AVI file(s) is probably the correct length. AVI has a specific "duplicate" frame type that can be used for exact duplicate frames (your AVI has lots of them). When those are muxed into MP4 the duplicate frames aren't included, the time code of the previous frame is just extended -- making the MP4 VFR.
Similar Threads
-
CCTV question for artist
By LizzBrady in forum Newbie / General discussionsReplies: 14Last Post: 11th Feb 2018, 20:04 -
Help--Need help to catch a fugitive from a cctv footage
By Aruna in forum Newbie / General discussionsReplies: 14Last Post: 18th Dec 2017, 10:55 -
Need Help Converting an AVI file from a CCTV system - Plays in WinMedia
By webby88 in forum Video ConversionReplies: 1Last Post: 10th Apr 2016, 13:08 -
Need help viewing and converting cctv footage.
By ashi in forum Video ConversionReplies: 12Last Post: 7th Jun 2015, 15:46 -
CCTV License Plate
By Djchase in forum RestorationReplies: 7Last Post: 9th Jun 2013, 21:42