File works with 2.5.x but not 2.6.x versions of Avidemux (Sample Included)

Started by douche, September 20, 2015, 07:19:26 AM

Previous topic - Next topic

douche

I've got some clips off my old Surveillance DVR box that I'm trying to archive. They work just fine in the old 2.5.6-1 version Avidemux but I cannot get them to work with ANY of the newer 2.6.x versions. I have attached a sample file below...

http://speedy.sh/eK9GY/Preview-Device-08-20150920-001017-172820076.avi

Any ideas of a setting I can enable/disable to get these to work in the newer version? I'm using the Windows version and I've tested this on 32-bit and 64-bit 2.6.x versions.

Jan Gruuthuse

I got this working:
Load in Handbrake -> Android Tablet profile -> Matroska or MPEG-4 and start (re-encode)
You can enqueue and press start later (batch processing)

After this video loads and can be processed in avidemux 2.6.10

AQUAR

Could use ADM2.5 in copy mode - to put the AVC stream into an MP4 container.
Then ADM2.6 works AFAICT from the tiny sample provided (starting from the first I frame).
IIRC - MP4 was designed for AVC (probably reintroduces timing info that ADM 2.6 relies on).



douche

Quote from: Jan Gruuthuse on September 20, 2015, 08:23:53 AM
I got this working:
Load in Handbrake -> Android Tablet profile -> Matroska or MPEG-4 and start (re-encode)
You can enqueue and press start later (batch processing)
https://www.dropbox.com/s/beu7qr2jx7j4ptu/Preview_Device_08_20150920_001017_172820076.mkv?dl=0
After this video loads and can be processed in avidemux 2.6.10

Yeah that's a bit backwards from my normal flow of things. Normally I cut with Avidmux then use handbrake for final encoding.

In this case it just makes more since to just use the older version of Avidmux than to do it like that.

Quote from: AQUAR on September 20, 2015, 12:57:15 PM
Could use ADM2.5 in copy mode - to put the AVC stream into an MP4 container.
Then ADM2.6 works AFAICT from the tiny sample provided (starting from the first I frame).
IIRC - MP4 was designed for AVC (probably reintroduces timing info that ADM 2.6 relies on).

Yeah I noticed that the company that makes this Surveillance DVR box has started using MP4 containers instead of AVI on their newer models. I had wondered the same thing about using AVC in an AVI container.

Back to the original issue, I tried the method you suggested (export to an MP4 container from ADM 2.5 using copy mode) and I still couldn't get ADM 2.6 to play the file. I guess at this point I'm better off just keeping the old version around for these types of files. I was thinking there might just be a setting in ADM 2.6 that I needed to enable/disable etc.

AQUAR

Did you use the >> key to navigate to the first I frame?
The sample video remuxed into in MP4, plays from that point (at least with my 32 bit ADM2.6).
The first few frames are probably orphans - ADM2.6 just sits on them with a green display and can't navigate them.
AVC in AVI is not a very good idea and I remux them into MKV.

douche

Yes I did. I have attached a pic below of what my ADM 2.5 window looks like before I click on SAVE. I take that exported file and open it in ADM 2.6.10 and when I click the play button it does nothing but just sit there on a green screen. I'm using the 64-bit version of ADM and I also just downloaded and tested this on the 32-bit version which does the same thing so I don't think that's the issue. Perhaps there is a setting in ADM 2.6.x that I need to adjust?


AQUAR

I understand BUT, ADM2.6 works with time codes.
Your AVC in AVI sample is probably lacking in these time codes..
AFAIK - remuxing the streams into MP4 may helps fix some of these issues.
Your sample AVC in AVI doesn't seem to start at an I frame (another problem!)
Result is that the first few frames are garbage and ADM2.6 doesn't play from that garbaged start.
 
I'll put it in dot format for you to try what worked for me on your sample.

.Remux it into MP4 with ADM2.5
.load that into ADM2.6
.press the ">>" button in the GUI to go to the first I frame (or the "up" key on the keyboard)
.press play
.cut/edit as usual (in copy mode cut/edit restricted to I frames).

If that doesn't work then its a deeper issue that requires in depth expertise to resolve.
Or as per Jan's advice you can recode into a compatible video (try lossless recoding!).




mean

Seems the metadata are missing, they are needed to properly decode the video
I'll look into it, might be a bug where avidemux just misses them

douche

Quote from: mean on September 23, 2015, 05:51:37 AM
Seems the metadata are missing, they are needed to properly decode the video
I'll look into it, might be a bug where avidemux just misses them

That would be great because these videos are really my only reason for keeping the older version of ADM 2.5 around. It would be nice to just switch to the 2.6 version and not have to jump back and forth between two different versions.

I'll keep an eye out and hopefully there will be a fix in the next update.

Thanks!

mean

the file is weird
As far as i can tell, the extra data needed to initialize the decoder are present at frame 3
so frame 1 & 2 are indecodable
The problem is that since it is AVI, only the frame 0 has a timecode and it is discarded
So avidemux managed to decode frame starting from frame 3 but discards them because they dont have timestamps
Not so easy to fix cleanly


AQUAR

I know this is just a layman's work around.

If the sample AVI is remuxed into MP4, then ADM 2.6 works fine from the first I frame.
I guess that I frame might be that first decodable frame?

Not tried to do anything beyond playing the video, but seems possible to edit etc after jumping past those "orphan" frames.

mean

In mp4/mkv the extradata are stored in a separate place
So it is available for decoding frame zero

In that avi,
frame 0 <= dont have extradata, discarded
frame 1 <= dont have extradata, discarded
frame 2 <= dont have extradata, discarded
frame 3 <= extradata + frame 3 =>Decoded ok

AQUAR

Kind of out of my depth, but still going to ask the question.

Given that the first 3 frames of the video stream, in the avi, are missing the extradata.
Does remuxing the video stream into MP4 re-introduce this missing data for the first 3 frames?

I ask, because the sample when MP4 remuxed, does not play in ADM2.6, when sitting at the 0 frame.
It just gives a green screen without response on play.

It does however play from the first detected I frame (using >>) so ADM2.6 has the time stamps to work off (thanks to the MP4 remux - endusers way of thinking!).



 

douche

Yeah remuxing doesn't seem to work, however, I did re-encode the sample using handbrake and then used that output file in ADM2.6 which worked fine. So basically it's obvious that the manufacturer is just retarded and didn't properly code their DVR software when exporting footage. In their newer box they now use MP4 rather than AVI. Unfortunately, there seems to be a completely different problem with trying to use those files in ADM. ADM2.6 won't play them at all, whereas ADM2.5 will play them however the bottom portion of the video appears blurred. See the sample picture and video below.

Video Sample
http://www.speedyshare.com/yTZhZ/ch05-20151103143356.mp4

ADM2.5 Screenshot

Jan Gruuthuse

The weird is: vlc plays that piece of video. The time progress is moving in a non constant way.
Perhaps mean can figure out why avidemux only uses/see partial video information and not the complete video.