QS Fix produced very sped-up video by removing tens of thousands of audio resyncs

jhyler

New member
This is with 6.60.10.816, and has occurred on multiple files.

I have a 120 minute video, which is playable and perfectly watchable but it has bunch of extra recorded junk on each end that I wanted to clip off. Videoredo would become unresponsive as I tried to position the cursors for the cut, so I tried a QS Fix on the video. It claimed to do a fast frame copy but it took over 10 minutes to do it. When it completed it told me it removed 181,612 audio resync frames (!) from the video. The input video was is 7,691,733 KB, the output video is 7,312,058 KB. Windows and VLC report the length of the input video as 2:02:10, but the output video is only 00:57:38. The output video plays but is very sped up as those times would suggest.

The log of the QS Fix (I cleaned it out before starting the fix) is over 2.2 GIGABYTES! (Zips to 412K if you want it).

Bottom line: the input video may or may not have its problems, but VRD changed it from a watchable to an unwatchable video. What can we do?

(Note the file sizes if you want the video or log uploaded. I have no dropbox to upload it to).

Thanks.
 
Last edited:

cp2

Member
Have you tried the Trim and Copy Source file option? With a little bit of trial and error you could chop off the start and then the end. It would be a bit rough, as in approximate, but then you got try a normal edit.
 
Last edited:

jhyler

New member
Have you tried the Trim and Copy Source file option? With a little bit of trial and error you could chop off the start and the end.
I have used it in the past. That "trial and error" can turn into a huge time sink depending on how many videos you have to do and how fussy you are, and I'm afraid this situation is turning into the new normal for me. Thanks for the suggestion, though.
 

cp2

Member
i updated my post as you were replying but I understand your comment. You might want to state the source of the video(s) as this may give a clue to others if they have encountered similar problems.
 

jhyler

New member
I use a TiVo mini connected to a Colossus 2 video capture card controlled by NPVR. The setup has worked great until a couple of days ago. Here's what "Show Video Program Info" has to say:

File: Name : C:\edit\avideofile.ts
Size : 7.876 GB
Duration : 02:02:10.02
Mux type : TS Stream
TS mux rate : 4.979 Mbps
Video: Encoding : H.264
VideoStreamID : x1011
Frame rate : 29.97 fps
Frame rate flag : Constant
Encoding size : 1920 x 1080
Aspect ratio : 16:9
Header bit rate : 25.000 Mbps
VBV buffer : 572 KBytes
Profile : High/4.0
Progressive : Interlaced (MBAFF)
Chroma : 4:2:0
Entropy mode : CABAC
Bit rate : 8.252 Mbps
Captioning : None found
Audio Stream: 1 (Primary) Codec : AAC
Format : ADTS
Channels : 2.0
PID : x1100
PES Stream Id : xC1
Sampling rate : 48000
Sample size : 16 bits
 

Dan203

Senior Developer
Staff member
Can you open the file in MediaInfo and copy/paste the info here? I want to see how it compares to what we're picking up.
 

jhyler

New member
Is this what you want?

General
ID : 0 (0x0)
Complete name : C:\edit\avideofile.ts
Format : MPEG-TS
File size : 7.34 GiB
Duration : 2 h 2 min
Overall bit rate mode : Variable
Overall bit rate : 8 595 kb/s

Video
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4
Format settings : CABAC / 3 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 3 frames
Codec ID : 27
Duration : 2 h 2 min
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 29.970 (30000/1001) FPS
Standard : Component
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan type, store method : Separated fields
Scan order : Top Field First
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709

Audio
ID : 4352 (0x1100)
Menu ID : 1 (0x1)
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Format version : Version 2
Muxing mode : ADTS
Codec ID : 15-2
Duration : 2 h 2 min
Bit rate mode : Variable
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Delay relative to video : -17 ms
 

Dan203

Senior Developer
Staff member
Yeah. Nothing there should cause an issue. VRD is picking up the proper video frame rate and audio sample rate so the syncing shouldn't happen at all unless there is actually something wrong with the file.
 

cp2

Member
I use a Colossus 2 for HDMI capture but I use DVBViewer rather than NextPVR and I don’t try to change channels.
However, DVBViewer does advise me of when there are errors in the video stream. The reporting of such errors tells me that VideoRedo will have problems with the file. Often I’m fortunate and the errors are contained in the bits I’m editing out. Occurrences of VideoRedo not cooperating with file editing are low enough that recapture is the pragmatic choice.
Does NextPVR report stream errors?
 

jhyler

New member
So as an experiment I ran the file through handbrake. It successfully processed the file and produced normal video output. I found this in the log:

[14:41:52] sync: audio 0x1100 time went backwards 64 ms, dropped 3 frames. PTS 79291920
[14:41:52] sync: audio 0x1100 time went backwards 3904 ms, dropped 183 frames. PTS 79296838
[14:48:55] stream: error near frame 111891: continuity error: got 7 expected 14

I then tried putting the handbrake output back into VRD, it crashed leaving an output file behind containing the first 15% of the input, though that 15% plays at the normal rate.

Dan, where do we go from here? I hate to simply give up and say the file must be bad, especially when the point of QSFix is to repair files. I understand some files are going to be broken beyond repair but (call me naive) files that can get rendered correctly shouldn't be that broken.

CP2: if NPVR reports stream errors I'm unaware of it. Besides, in my experience video coming off of a TiVo contains stream errors more often than not. I'm used to accepting 30-100 such errors in any hour's worth of recording. VRD has always worked through them and given good results. But 180K errors I've never seen before.
 

Dan203

Senior Developer
Staff member
We need the file. Upload it to us and we'll check it out. If the whole file is too big you can use trim and copy to grab just a small section around that 15 minute mark and see if the clip is able to reproduce the issue. If it is then upload that instead.

 

jhyler

New member
The first 15 minutes or so have been uploaded; email sent. When I QS Fix the uploaded fragment I got "18,878 audio resync frames removed". The fixed file plays funny, I guess occasionally "stuttering" is the way to describe it (especially if you jump around in the file), which the pre-fixed file doesn't do. What's interesting is that the fixed file doesn't play at a higher speed as the full file from which this was taken did, after it went through the QS Fix.

Thanks for looking into this!
 
Last edited:

tobyW

Member
Comment: For what it's worth, I too have had a QSF problem. (6.60.10.816). The qsf'd file was broken up / pixelated in places.
It seemed to improve as I wound back my setting of Options/StreamParameters/DefaultEncoder, from NVEnc to QuickSync to Software.
Not sure about VRD5 result; in the end I qsf'd that particular source file with VRD4 and all was well. Sorry, I ran out of time and disk space, and ditched the files.
 
Last edited:

Dan203

Senior Developer
Staff member
Comment: For what it's worth, I too have had a QSF problem. (6.60.10.816). The qsf'd file was broken up / pixelated in places.
It seemed to improve as I wound back my setting of Options/StreamParameters/DefaultEncoder, from NVEnc to QuickSync to Software.
Not sure about VRD5 result; in the end I qsf'd that particular source file with VRD4 and all was well. Sorry, I ran out of time and disk space, and ditched the files.
QSF shouldn’t be doing any recoding, so the encoder is irrelevant. Unless you are outputting to a profile that has a set codec that’s different than the source and forcing a major recode.
 

tobyW

Member
Sorry, having ditched the files and my notes, I forgot I not only qsf'd but also edited to extract the second half, saving as Transport Stream Match Source (all in V6). The first obvious noise(s) were around 10 and 13 minutes after the cut.
(Realized this after posting, and thought I had plenty of time to edit my post before you would see it!)
Just mentioned this in case it's a clue. Probably a separate issue altogether.
 

Dan203

Senior Developer
Staff member
You can’t edit and QSF at the same time. QSF is a process that only works on the complete file and is intended to fix a file before you edit it.

As for editing... that too is unaffected by that encoder setting. The smart editor uses a special encoder that's not used for anything else.

As for your problem... send an email to support. DanR might want a sample of your file to see what’s going on. (he's in charge of smart edit)
 
Top Bottom