View Full Version : What to use to import H264 TS?
RedDwarf1
13th April 2010, 03:42
I have tried dgavcindex and that gave some blocky video. I don't have a nVidia graphics card so cannot use the newer nVidia version of dgavcindex so what can I use?
7ekno
14th April 2010, 06:38
Ffms2?
7
Alex_ander
14th April 2010, 08:26
If you have some commercial decoder installed (like CoreAVC), you can force DirectShowSource() using it (at least via GraphEdit .grf file). Use fps=... and convertfps=true in DirectShowSource() parameters for better frame handling.
Blue_MiSfit
14th April 2010, 23:53
Yes, I suggest FFMS2 for most sources, to get frame accuracy.
For "sane" content, you can use DirectShowSource / DSS2 with ffdshow or CoreAVC (or any other H.264 DirectShow decoder for that matter) and get the same results, provided you don't trim anything. For "not sane" content (like some of the MPG files I get from post-production companies), DSS2 / FFMS2 return different numbers of frames :P
Your blocking issue probably shouldn't occur with DGAVCIndex though. Are you sure your source is undamaged?
~MiSfit
RedDwarf1
15th April 2010, 03:15
I did see FFMS2 mentioned in another thread but I have been unable to get it to work with a DGAVCIndex demuxed .h264 file. The indexing throws an error: FFIndex: Invalid initial pts and dts
Maybe muxing the h264 stream into an Mkv container would get it working, but it seems a bit of a long winded way of doing it.
I have got FFMS2 working with other files okay but not .h264. I don't know whether that is an unsupported file type, I can find very little information on supported file types. I didn't want to use the .ts file as FFMS2 docs does say there can be problems when reading from them. That is why I attempted to use the demuxed .h264 file.
There will appear decoding artifacts on h264 in transport streams.
What is the bold referring to and how would that relate to my video or FFmpegSource2? Could this be what is causing the .h264 file failing to index?
Because of LAVF's demuxer most raw streams will fail to work properly such as elementary h264 and other mpeg video streams.
Trim might be required, in fact in one instance I can say it will almost certainly be required.
The blocking problem is a known problem with DGAVCIndex when decoding certain content. ie BBC HD video in particular. The blocks are not in the source, I have tried multiple videos with the same result.
I did post an image and small sample for people who wanted to see the problems that DGAVCIndex has with some content.
http://forum.doom9.org/showthread.php?p=1391454#post1391454
Here are some specs on the video:
General
ID : 802
Complete name : L:\Encode\BBC HD (AC3,eng).ts
Format : MPEG-TS
File size : 3.13 GiB
Duration : 42mn 40s
Overall bit rate : 10.5 Mbps
Video
ID : 5500 (0x157C)
Menu ID : 6940 (0x1B1C)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.0
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Duration : 42mn 40s
Bit rate : 9 116 Kbps
Width : 1 440 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 fps
Resolution : 8 bits
Colorimetry : 4:2:0
Scan type : Interlaced
Bits/(Pixel*Frame) : 0.234
Stream size : 2.72 GiB (87%)
Color primaries : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
Transfer characteristics : BT.709-5, BT.1361
Matrix coefficients : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177
Audio #1
ID : 5501 (0x157D)
Menu ID : 6940 (0x1B1C)
Format : AC-3
Format/Info : Audio Coding 3
Duration : 42mn 40s
Bit rate mode : Constant
Bit rate : 384 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Video delay : -968ms
Stream size : 117 MiB (4%)
Language : English
Audio #2
ID : 5502 (0x157E)
Menu ID : 6940 (0x1B1C)
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 2
Duration : 42mn 40s
Bit rate mode : Constant
Bit rate : 256 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Video delay : -888ms
Stream size : 78.1 MiB (2%)
Language : nar
Text #1
ID : 5503 (0x157F)
Menu ID : 6940 (0x1B1C)
Format : Teletext
Language : English
Text #2
ID : 5504 (0x1580)
Menu ID : 6940 (0x1B1C)
Format : DVB Subtitles
Language : English
Blue_MiSfit
15th April 2010, 05:55
Index the TS directly with FFMSIndex. Don't demux to an ES first with DGAVCIndex.
~MiSfit
JungleBoy
19th April 2010, 16:31
Try replacing the AVCSource() statement in the AVS file with DirectShowSource() like this:
DirectShowSource("C:\DVD\B01.ts")
#AVCSource("C:\DVD\B01.dga")
The DGAVCIndex method stopped working when BBC HD introduced their new encoders on 5th Aug 2009.
DGAVCIndex uses the libavcodec decoder which has trouble decoding the new 1080 PAFF files.
The DGAVCIndexNV works like a charm but you need a CUDA supported NVidia graphics card.
You can use the cheaper 8400 or 8500 - you don't need anything too fancy - I'm using a passive cooled 8600.
It doesn't work with the cheapest 8300GS card as there's not enough memory for CUDA.
You need a card with a minimum of 256Mbyte.
asarian
23rd June 2010, 09:21
I did see FFMS2 mentioned in another thread but I have been unable to get it to work with a DGAVCIndex demuxed .h264 file. The indexing throws an error: FFIndex: Invalid initial pts and dts
Maybe muxing the h264 stream into an Mkv container would get it working, but it seems a bit of a long winded way of doing it.
I have got FFMS2 working with other files okay but not .h264. I don't know whether that is an unsupported file type, I can find very little information on supported file types. I didn't want to use the .ts file as FFMS2 docs does say there can be problems when reading from them. That is why I attempted to use the demuxed .h264 file.
Hmm, I'm experiencing the exact same issue. Instead of remuxing a 30GB+ demuxed .h264 stream (from a m2ts) yet again to .mkv or some such, I fed the .h264 stream directly to FFVideoSource. And I get the same "Invalid initial pts and dts" error. Is there any way to do this directly, after all?
Thanks.
foxyshadis
23rd June 2010, 10:31
It is unsupported. In fact, item # 10 on the todo list (http://doom10.org/index.php?topic=25.0) is:Implement raw mpeg 1/2/4 and h.264 parsers to support those input formats for more than linear reading
Instead of muxing to mkv, maybe (maaaaybe) you could pipe the output of a TS/PS muxer into it. But I have no idea how that would work, it seems like you'd need a separate input plugin to wrap FFMS, or more likely patch it.
asarian
24th June 2010, 16:47
It is unsupported. In fact, item # 10 on the todo list (http://doom10.org/index.php?topic=25.0) is:
Instead of muxing to mkv, maybe (maaaaybe) you could pipe the output of a TS/PS muxer into it. But I have no idea how that would work, it seems like you'd need a separate input plugin to wrap FFMS, or more likely patch it.
Thanks.
Actually, muxing to .mkv does work; it's a raw .h264 stream that gave me the error.
But not to worry, I can mux a m2ts stream from Blu-Ray to .mkv directly with eac3to (instead of creating a raw .h264 file first); so there's no problem, after all. :) Besides, FFVideoSource's frame accuracy alone makes it worthwhile, regardless.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.