Premature end when transcoding HDTV AVC file

Started by RocketJet, April 08, 2018, 01:19:08 PM

Previous topic - Next topic

RocketJet

Hi,

I have a recurring problem when transcoding HDTV files originating from AverTV.
The input video codec is AVC, and I am transcoding to HEVC.
Audio is in copy mode.
The transcode ends prematurely, presumably due to a reception error.

Sample: http://www.mediafire.com/file/u6zdw1paqx8l0t8/TEST_AverTV_HD.mp4

There is also a problem that no error message is generated.
It instead says that the file has beev saved successfully,
but in fact it has ended well before the end of file.

Note: The problem does not occur if video is in copy mode.

I am running the lastest nightly: 180405.

RJ

eumagga0x2a

I would like to encourage you to inspect the Avidemux log yourself to identify the exact error message (I would assume that decoding fails for too many frames in a row). There is no need to reencode for that, just play the source video.

RocketJet

I have looked at the admlog.txt file, and there are indeed lots of errors, although some of them  contain the phrase "not necessarily a problem".

I have uploaded the admlog.txt file to: http://www.mediafire.com/file/r5bl3x52ywc41c9/admlog.txt

RJ

eumagga0x2a

Thanks, will look at the log.

Currently it makes no difference from the POV of Avidemux whether decoding fails due to EOF or due to video corruption. It would be indeed nice to warn the user if encoding has stopped prematurely due to decoder bailing out.

We could also try to avoid getting stuck when encountering a damaged portion of video by trying to skip to the next keyframe. Side effects of such strategy may be worse than a honest failure though.

eumagga0x2a

The decoder fails to decode frame 600 in the stream order and we don't encounter a frame within the following 19 frames where we could resume. Indeed, it would be nice to let user know, we are more than 30 seconds short of the segment end.

eumagga0x2a

Quote from: eumagga0x2a on April 08, 2018, 03:06:29 PM
We could also try to avoid getting stuck when encountering a damaged portion of video by trying to skip to the next keyframe.

Actually, this approach works nicely with your sample. No side effects spotted so far.

eumagga0x2a

The time in the sample where decoding fails permanently — did you delete a portion of video there, then saved in copy mode?

RocketJet


Yes, I originally edited the file in copy mode,
but as my hard disk started getting full,
I decided to go back and compress files using HEVC.

eumagga0x2a

Okay, it is a known but not yet properly understood issue then. I have a workaround which I will push if no solution can be found.

Info messages about decoding failure for every second frame are likely an artifact of frame vs. field handling and so far normal.