Log in

View Full Version : Problem importing H264 HD video


ChibiBoi
23rd June 2013, 17:55
It seems like a lot of people have this problem where using DGAVCIndex on HD H264 footage gives them blocks in the video that weren't there before. I'm having the same issue, and I haven't been able to find a solution to it on the internet.

So I tried alternative ways of loading my .TS files. I tried extracting the video into .MKV format and using FFMSIndex and FFVideoSource to load it, but it messes up the framerate for some reason when I load it into AviSynth (it doubles it, or converts it into variable frame rate??) And also when I try to play the video in MeGui's preview window unfiltered, it creates a jerky, stuttering movement where it plays the video forward a few frames, then jumps back one or two frames, then plays the video forward again.

I've also tried using DirectShowSource but I don't think it's handling the interlaced footage very well. It gives me this weird color dropping/ghosting especially with red colors. It's like blended frames, but it messes up the colors.

Does anyone have suggestions as to what I should do? I've attached a little clip:
http://www.mediafire.com/download/tr53o6c07zf39c3/antm_clip_clip.ts

Guest
23rd June 2013, 18:17
DGDecNV and DGAVCDecDI both can handle it without any issues.

ChibiBoi
23rd June 2013, 18:27
DGDecNV and DGAVCDecDI both can handle it without any issues.

I didn't consider DGDecNV since I have an Intel graphics card. For DGAVCDecDI are there any other requirements besides the DiAVC decoder?

creaothceann
23rd June 2013, 18:48
What about DSS2 ?

Groucho2004
23rd June 2013, 18:56
Try LWLibavVideoSource (http://forum.doom9.org/showthread.php?t=167435&highlight=lsmash).

ChibiBoi
23rd June 2013, 20:16
What about DSS2 ?

Try LWLibavVideoSource (http://forum.doom9.org/showthread.php?t=167435&highlight=lsmash).

DSS2 has the same problem :-/
LWLibavVideoSource freezes the program for me :(
EDIT: LWLibavVideoSource works! :D
EDIT: Actually, LWLibavVideoSource loads the video without any blocks or color drops or other artifacts, but it somehow increases the video length (looks like it doubles it?)

Reel.Deel
23rd June 2013, 20:46
...but it somehow increases the video length (looks like it doubles it?)

Yes I can confirm that, DGDecNV returns 660 frames and LWLibavVideoSource returns 1320.

VFR maniac
23rd June 2013, 21:41
Yes I can confirm that, DGDecNV returns 660 frames and LWLibavVideoSource returns 1320.

Set repeat=true .


+ repeat (default : false)
Reconstruct frames by the flags specified in video stream and then treat all frames as interlaced if set to true and usable.
If set to false, video frames consisting of two separated field coded pictures are displayed twice consecutively.

Currently, I don't distinguish PAFF field coded pictures and pulldown flags.

Reel.Deel
23rd June 2013, 21:56
Set repeat=true.

Just tried that but it still returns double the frames.

VFR maniac
23rd June 2013, 22:03
Hmmm? It's weird.

Sorry, unfortunately my PC (motherboard) is dead.
I can't test, confirm and debug that.

EDIT:
Reel.Deel, your file is a raw H.264 stream?
Libavcodec returns no PTS for some file formats, and we can't get frames in presentation order for such files.
Therefore, as long as seeking by frame number (the way LWLibavVideoSource does), repeat=true won't work for them.

Reel.Deel
23rd June 2013, 22:28
No the file is in a .ts container. It's the sample that the OP uploaded.
Remuxing to mkv solves the issue.

Edit:
Don't know if this any help to you but after your (bottom) post I thought the original file might be corrupted.
So I used TSMuxer to remux to TS and M2TS but the problem is still there.

VFR maniac
23rd June 2013, 22:39
So, some PTSs returned by libavformat are invalid in that TS file I guess.

Invalid PTSs are an annoying issue for frame-accurate seek.
It is solved if the libavcodec parser returned POC though.

I may send a patch to libav to support returning POC.

ChibiBoi
23rd June 2013, 23:03
So, some PTSs returned by libavformat are invalid in that TS file I guess.

Invalid PTSs are an annoying issue for frame-accurate seek.
It is solved if the libavcodec parser returned POC though.

I may send a patch to libav to support returning POC.

Interesting. It was captured with the Hauppauge HD PVR2 and Arcsoft Showbiz, then cut with VideoReDo

No the file is in a .ts container. It's the sample that the OP uploaded.
Remuxing to mkv solves the issue.


Set repeat=true .

Looks like it's working! :D

Music Fan
27th June 2013, 08:40
Cool, repeat=true works with my TS files (recorded on hdtv) encoded in interlaced h264, otherwise I get 50 fps instead of 25.

So, some PTSs returned by libavformat are invalid in that TS file I guess.

Invalid PTSs are an annoying issue for frame-accurate seek.
It is solved if the libavcodec parser returned POC though.

I may send a patch to libav to support returning POC.
Great.:)