Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 26th August 2007, 09:35   #1  |  Link
Caleb13
Registered User
 
Join Date: Nov 2002
Posts: 14
Please help with non-standard (?) H.264 TS files

Hi all,

a few months ago, one company in my country began an experimental DVB-T broadcast using H.264 codec for the video. The resolution is 1440x1088, 25 fps, apparently interlaced, bitrate around 6 Mbits. Audio is stereo MP3 CBR. Trouble is, that even after some 2 days of time spent reading various forums, I'm unable to load the video AviSynth or VirtualDub, let alone to convert it. But first things first:

To "capture" and record the DVB-T broadcast, I'm using DVB Viewer v3.6.1.20 with TV card Hauppauge HVR1100. Now, DVB Viewer can record H.264 streams to *.TS format only. But with help of CoreAVC decoder, DVB Viever is able to play these TS files... and it seems to be the only player which is able to do so, as WinDVD 7, BSPlayer and Windows Media Player all lock up when I load the TS files into them. Weird, but this didn't bother me... intially.

I wanted to convert the H.264 video to XviD, preferably with help of my favourite filters in AviSynth. Naturaly, my first step was to demux streams from the TS file. After some experimentation, I learned this:

-TSConverter (v2.5) just freezes upon loading the TS file ("program is not responding...")

-Elecard XMuxer Pro (v2.2.71) and Lite (v1.2.61) both crash ("program has performed an illegal operation...")

-The only program that seems to work is TSRemux v0.0.18. After I load the TS file, I right-click on the individual streams and choose "demux XYZ stream". So far, this is the only way I was able to demux the streams.

-It seems that TSConverter and Elecard XMuxer crash because they attemtpt to preview the video, whereas TSRemux is mere demuxer with no preview. I tried to uninstall/unregister all H.264 decoders, but TSConverter and Elecard XMuxer still kept crashing - they have an internal decoder?

Anyway, now I finally got a H.264 raw stream. How to load it into AviSynth and/or VirtualDubMod? I tried following:

-Neuron2's DGAVCIndex (v1.0.0 alpha 6) was the first choice, as it is direct tool for Avisynth. Sadly, when I tried to open the H.264 stream, I got "Field pictures (PAFF) not currently supported by libavcodec" error message and the program was unable to index the file.

-For the same reason, ffdshow did not work too, so I uninstalled it.

-I created one-line AviSynth script DirectShowSource("file.264",fps=25) and tried to open it in VirtualDubMod, but Avisynth "could not locate decompressor for fourcc h264". I thought this was weird, because I had the CoreAVC v1.3.0.0 decoder installed.

-Frustrated, I muxed the raw H.264 stream to an AVI file using AVC2AVI. I was able to play this AVI in DVB Viewer, but only the upper half of the picture could be seen. AVC2AVI reported 1440x544 resolution after conversion, but the resolution of the original stream is supposed to be 1440x1088 - AVC2AVI screwed the conversion somehow, perhaps it is unable to deal with interlaced source. I checked AVC2AVI's help, but I couldn't find any way to correct the problem. As side comment, BSPlayer (v1.36 - old, I know, but free) also played this AVI, but it was "torn" into skew lines and therefore unwatchable. Windows Media Player crashed with arcane "error 80040204". VirtualDubMod again complaints "could not locate decompressor". AviFileSource() in AVS does the same.

-I read somewhere that CoreAVC v1.3.0.0 is buggy and v1.2.0.0 works better. So I tried v1.2.0.0 and yes, BSPlayer and WMP suddenly began to play the AVI file - but like in DVB Viewer, only upper half of the picture...

-I disabled CoreAVC and installed evaluation version of LEAD H.264 Decoder. It was unable to decode anything, all players kept crashing. So I got rid of it.

-I found out that there is VfW version of x264, which was supposed to work with WDM and/or AviSynth. So I downloaded and installed it... But when I loaded the AVI file into ANY player or editor, it crashed. Even DVB Viewer couldn't play the file now. Later I found out that VfW x264 apparently uses libavcodec, so it is no wonder it didn't work. So I got rid of it, too.

-To be sure, I deleted all H.264-related files I could find in codec list (I used GSpot v2.6) and left CoreAVC v1.2.0.0 only. This did not help in any way.

-I ditched the AVI file, installed the newest AviSynth (v2.57) and tried to play with the raw H.264 stream again. I modified the AVS script to DirectShowSource("file.264",fps=25,framecount=xxxx). This actually DID open the video in VirtualDubMod, BUT only 352 x 240 upper left part of the picture appeared in VDM's window!

-I also tried to process the TS files on another PC, with practically the same results.

I simply don't know what to do now. The H.264 stream is apparently non-standard in some way. Or TSRemux screws it up during demuxing. Or perhaps I have some arcane codec problem in both PCs. Or I just can't find a good H.264 decoder - but CoreAVC seems to be the only working decoder for "my" TS streams....

Here is link to a sample of the TS stream (4 MB):

http://www.bigupload.com/d=CPAIZXGJVA

Here is H.264 stream demuxed with TSRemux v0.0.18:

http://www.bigupload.com/d=F8S985ORTP

And here is H.264 stream muxed into an AVI file with AVC2AVI:

http://www.bigupload.com/d=K8OVCA0VC6

Thanks in advance for any help. Oh, and in case you manage to decode the video, don't be shocked - it has BIG black borders around the actual picture, perhaps to save bandwidth - it is just an experimental broadcast, mind you. But it should turn into regular, full-resolution broadcast soon, hence my interest.
Caleb13 is offline   Reply With Quote
Old 26th August 2007, 10:36   #2  |  Link
Jay Bee
Registered User
 
Join Date: May 2006
Posts: 451
Just tested:

-open file in graphedit

-use haali as splitter and coreavc as decoder

-remove the renderers from the graph

-set the coreavc decoder to "no deinterlacing"

-save the graph as clip.grf

-create an avs file with DirectShowSource("clip.grf")

-open avs with vdub

voila

PS: use avisynth 2.56, 2.57 likes to fail when using this technique. And use CoreAVC 1.5, older versions are buggy.

And just because ffdshow can't play the stream doesn't mean it's non-standard.

Last edited by Jay Bee; 26th August 2007 at 10:39.
Jay Bee is offline   Reply With Quote
Old 26th August 2007, 14:47   #3  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
as mentioned the stream uses paff interlacing. that explains why the libavcodec based tools (dgavcindex, ffdshow..) didnt work and why avc2avi reported a wrong resolution

for me the file plays fine with haali splitter and coreavc
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 27th August 2007, 03:41   #4  |  Link
richardlfyang
Registered User
 
Join Date: Sep 2005
Posts: 17
Quote:
Originally Posted by Jay Bee View Post
PS: use avisynth 2.56, 2.57 likes to fail when using this technique. And use CoreAVC 1.5, older versions are buggy.
Hi Jay Bee,

Many tks for your guidance above!

I tried, but have following problems
1. Entironment: Avisynth 2.58, CoreAVC 1.5;
When open AVS, avisynth have below error message:
"GRF file dose not have a compatible open video pin..."


2. Entironment: Avisynth 2.55, CoreAVC 1.5;
When open AVS, avisynth have below error message:
"The filter graph manager won't talk to me."

AVS
DirectShowSource("clip.grf",audio=false,fps=23.976,Pixel_type="YV12")
When I use directshow directly open the XXX.h264, it's no problem.

How to correct my problem?

TKS!
richardlfyang is offline   Reply With Quote
Old 27th August 2007, 06:29   #5  |  Link
Jay Bee
Registered User
 
Join Date: May 2006
Posts: 451
I think error 1 is the reason I recommended using avs 2.56. And error 2 should be because of settings of CoreAVC itself. Try changing them in graphedit and then resaving the graph.

Also, I was working with xxx.ts not xxx.h264 like you seem to be doing.

BTW, are you the OP?
Jay Bee is offline   Reply With Quote
Old 27th August 2007, 12:21   #6  |  Link
Caleb13
Registered User
 
Join Date: Nov 2002
Posts: 14
It works!

Thank you very much, Jay Bee! The Haali splitter really works! Well, except I had to modify the AVS script to DirectShowSource("clip.grf",audio=false) to work with AVS 2.57. Also, CoreAVC 1.2.0.0 seem to work just fine.

However, I want to ask you - do you see any black borders around the video? If so, how big they are? I'm asking because DVB Viever keeps playing the files with roughly 200-pixel black borders, whereas little to no borders appear when I open the TS files in VDM.

For richardlfyang: My video samples have 25 fps, but you force 23.976...
Caleb13 is offline   Reply With Quote
Old 27th August 2007, 14:00   #7  |  Link
Jay Bee
Registered User
 
Join Date: May 2006
Posts: 451
Quote:
Originally Posted by Caleb13 View Post
except I had to modify the AVS script to DirectShowSource("clip.grf",audio=false) to work with AVS 2.57.
Ah cool, learnt something myself. I don't have the file anymore but I don't remember any large borders.
Jay Bee is offline   Reply With Quote
Old 28th August 2007, 03:34   #8  |  Link
richardlfyang
Registered User
 
Join Date: Sep 2005
Posts: 17
I figure out the problem! It's working well!

Thank you Jay Bee!

Last edited by richardlfyang; 28th August 2007 at 04:03.
richardlfyang is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:50.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.