[RESOLVED] AVI with H.264 (from x264vfw)

Support forum for DGDecNV
Post Reply
DAE avatar
TCmullet
Posts: 54
Joined: Sun May 03, 2015 12:51 pm

[RESOLVED] AVI with H.264 (from x264vfw)

Post by TCmullet »

I have videos for which I bought DGDecNV that were encoded via Virtualdub to AVIs with video x264vfw (the AVI codec for H.264) and audio as PCM or AC-3. How can I get to where I can index with DGIndexNV and use DGDecNV? I think I need to either demux the video and audio stream to elementary (which I've not been able to do) or remux them into a transport stream (which has also failed). These AVIs with H.264 video and ac3 or pcm audio seem to work fine in other contexts.

I will appreciate your help. (I've tried to search this forum, but can't locate anything.)

P.S. I hope you won't suggest ffmpeg as my file names are too long to deal with command line utilities.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: AVI with H.264 (from x264vfw)

Post by admin »

Please try AviDemux to extract the streams and report back your findings.

http://sourceforge.net/projects/avidemux/

Also, I see that VirtualDub has File/Export/Raw video (or audio) that may work for you.
DAE avatar
TCmullet
Posts: 54
Joined: Sun May 03, 2015 12:51 pm

Re: AVI with H.264 (from x264vfw)

Post by TCmullet »

I've been using Avidemux for a couple years now, but only for editing. I'm in process now of attempting to interact there for info on demuxing. You can see the dialog here:
http://avidemux.org/smuf/index.php/topic,16412.0.html

It's not going well.

I'll try the Vdub options you suggested. It seems Vdub has SO many features hidden all over the place and sometimes it too is hard to learn how to use. (Their own forum has been pretty good over the years.)
DAE avatar
TCmullet
Posts: 54
Joined: Sun May 03, 2015 12:51 pm

Re: AVI with H.264 (from x264vfw)

Post by TCmullet »

I'm doubtful that Vdub "export" is what we want. When I pick "export", it gives a huge dropdown with the default choice being,
"4:2:0 YCbCr planar, R.601, 8-bit, Y:16-235, coaligned".

I don't think this is an elementary video stream.

Don, I rather expected you'd instantly know what tool or tool is good to use for either demuxing. AVIs have been around a long time, so I figured you'd know how to demux one yourself. But I also wonder why you don't have DGdecNV decoding directly from AVIs, seeing as AVIs have been around "forever".
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: AVI with H.264 (from x264vfw)

Post by admin »

I stopped doing anything with AVI's 15 years ago! Maybe you can find some relevant help over at Videohelp.

Did you try AviDemux?
DAE avatar
Aleron Ives
Posts: 126
Joined: Fri May 31, 2013 8:36 pm

Re: AVI with H.264 (from x264vfw)

Post by Aleron Ives »

I'm pretty sure that H.264 in AVI is nonstandard and technically "wrong" to have, as AVI itself doesn't support things like having several consecutive B-frames that are perfectly normal for H.264. As such, standard AVI tools may not be able to handle the stream. AVI isn't even supposed to have VBR audio, but there are hacks to do that, too. I use Avidemux for trimming and remuxing, but I'm not sure it can do what you want. My version has a "video only" output option that might let you export a .264 file, but I don't see an option to output audio only.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: AVI with H.264 (from x264vfw)

Post by admin »

Thanks for the input, Aleron! Of course, one can export the raws from VirtualDub and then re-encode. Maybe not ideal but it shouldn't be too bad.
DAE avatar
Aleron Ives
Posts: 126
Joined: Fri May 31, 2013 8:36 pm

Re: AVI with H.264 (from x264vfw)

Post by Aleron Ives »

That was sort of my point: can VirtualDub export a .264 file from an AVI? I was under the impression that vanilla VirtualDub does not support H.264 at all and would puke if you tried to load a video encoded with H.264. AVI isn't supposed to contain H.264 in the first place, so Avery could make a reasonable argument that VirtualDub doesn't need to support it. I really wish he would support H.264 and MKV, though, as VirtualDub would become that much more useful if it could handle modern codecs and containers.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: AVI with H.264 (from x264vfw)

Post by admin »

OP says VirtualDub can't do it. I'm pretty sure AviDemux can do it, but OP seems to have lost interest.
DAE avatar
TCmullet
Posts: 54
Joined: Sun May 03, 2015 12:51 pm

Re: AVI with H.264 (from x264vfw)

Post by TCmullet »

I'm happy that I've made a number of successful runs of DGIndexNV, both with release 2049 and with 2041. They were .M2TS files created by one of the Hauppage capture devices. (Some by the Colossus and some by the USB based PVR2.)

But now I tried to take an AVI that has H.264 video (encoded by X264-vfw in Virtualdub 1.10.4) and AC3 audio and convert it to .M2TS using AviDemux. I don't remember why the earlier attempts (May) failed. This one seemed to succeed and I was able to load the resultant M2TS into another instance of AviDemux. It rebuilt an index and I was able to play as well as scrub the file on the timeline easily.

But when I ran DGIndexNV against it, DGIndexNV blew up immediately. I'll give the Windows 7 error data and a listing from MediaInfo.

Code: Select all

Problem signature:
  Problem Event Name:	APPCRASH
  Application Name:	DGIndexNV.exe
  Application Version:	0.0.0.2049
  Application Timestamp:	550af5ea
  Fault Module Name:	DGIndexNV.exe
  Fault Module Version:	0.0.0.2049
  Fault Module Timestamp:	550af5ea
  Exception Code:	c0000005
  Exception Offset:	0006274a
  OS Version:	6.1.7601.2.1.0.256.1
  Locale ID:	1033
  Additional Information 1:	0a9e
  Additional Information 2:	0a9e372d3b4ad19135b953a78882e789
  Additional Information 3:	0a9e
  Additional Information 4:	0a9e372d3b4ad19135b953a78882e789

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt

Code: Select all

General
ID                                       : 1 (0x1)
Complete name                            : D:\Video-Work\2014-NCAA-wv\Work-area\2014-11-26.wv.AL-v-MO.x264v-q0.432p30.ac3-640.nodups.M2TS
Format                                   : BDAV
Format/Info                              : Blu-ray Video
File size                                : 21.6 GiB
Duration                                 : 2h 11mn
Overall bit rate mode                    : Variable
Overall bit rate                         : 23.5 Mbps

Video
ID                                       : 256 (0x100)
Menu ID                                  : 1 (0x1)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High 4:4:4 Predictive@L3
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 3 frames
Codec ID                                 : 27
Duration                                 : 2h 11mn
Bit rate                                 : 22.0 Mbps
Width                                    : 768 pixels
Height                                   : 432 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 29.970 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 2.208
Stream size                              : 20.1 GiB (93%)
Writing library                          : x264 core 144 r2525bm 40bb568
Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=7 / psy=0 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=0 / threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc=cqp / mbtree=0 / qp=0

Audio
ID                                       : 257 (0x101)
Menu ID                                  : 1 (0x1)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Codec ID                                 : 129
Duration                                 : 2h 11mn
Bit rate mode                            : Constant
Bit rate                                 : 640 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Stream size                              : 601 MiB (3%)

Menu
ID                                       : 4096 (0x1000)
Menu ID                                  : 1 (0x1)
Duration                                 : 2h 11mn
List                                     : 256 (0x100) (AVC) / 257 (0x101) (AC-3)
Service name                             : Service01
Service provider                         : FFmpeg
Service type                             : digital television

Could you please look at this, Donald, and figure out why it is crashing? Let me know what further information you might need. The video was encoded using the lossless setting.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: AVI with H.264 (from x264vfw)

Post by admin »

But the Chroma sampling line says 4:2:0. Also, if it was really 4:4:4 there would have been an error message saying that.

The Compression mode line says Lossy but TCmullet claims it is lossless. DGDecNV does not support lossless. It is designed for DVD and Bluray sources.

Best thing is for TCmullet to link to a sample that I can use to debug it and resolve the above ambiguities.
DAE avatar
TCmullet
Posts: 54
Joined: Sun May 03, 2015 12:51 pm

Re: AVI with H.264 (from x264vfw)

Post by TCmullet »

We can pursue inconsistency resolution if you wish. But I had to rush onward (I'm very behind.) I thought any H.264 in an M2TS container could be used with DGDec. (I never noticed a restriction against any particular encoding parameters as long as it was valid H.264.) But as you say lossless is not supported, I got around the problem by rencoding from lossless to q=1 (nearly lossless but x264vfw doesn't use the special lossless mode). This solves it for now (DGIndex worked).

To further clarify the file origin:

"Started out" with non-h.264. Encoded to .AVI via VirtualDub and x264vfw, setting to lossless. Used AVIDemux to repackage it into M2TS so that DGIndex / DGDec can use. Then after your comments, I did the reencode to q=1 trick.

I'm not savy much at the internals of H.264, but I thought colorspace (4:2:0) was a different animal than the level of the H.264 profile (which was 4:4:4), that is I thought each was an independent item. I thought that the fact that both are 3 digits separated by 2 colons was a coincidence.

You let me know if you want me to create a fragment for you. Just letting you know that I think the bug is either in how x264vfw does some of it's encoding or in Vdub. (More likely the former, IMHO.)
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: AVI with H.264 (from x264vfw)

Post by admin »

TCmullet wrote:We can pursue inconsistency resolution if you wish.
You can ignore my clear request for a sample if you wish. But then I may consider you a troll.
You let me know if you want me to create a fragment for you. Just letting you know that I think the bug is either in how x264vfw does some of it's encoding or in Vdub.
What bug? This one:

:bug:
User avatar
flyordie
Posts: 39
Joined: Thu Nov 18, 2010 10:07 am

Re: AVI with H.264 (from x264vfw)

Post by flyordie »

TCmullet wrote:

Code: Select all

General
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High 4:4:4 Predictive@L3
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
As stated in another post in this forum:
admin wrote: Lossless and/or 4:4:4/4:2:2 chroma is not supported.
As of yesterday I ran in to a very similar issue. I converted the AVC High 4:2:2@L4.2 with chroma 4:2:2 to AVC Baseline@L4.2 with chroma 4:2:0 and DGIndexNV opens it instantly.

Code: Select all

ffmpeg -i input.avi -c:v libx264 -crf 1 -preset ultrafast -filter:v "format=yuv420p" ouput_yuv420p.mp4
Note I specified ultrafast and crf 1. If you specify crf 0 you end up with a profile High 4:4:4 Predictive, level 4.2, 4:2:0 8-bit, but specifying crf 1 gets you profile Constrained Baseline, level 4.2.
There are a few more things to add to that ffmpeg command line if you want to copy over audio etc.
I had originally failed to specify preset ultrafast the other day so it encoded with preset medium which defaulted to the AVC High 4:4:4@L4.2 lossless profile, but it appears preset has very little to do with the profile and the real change happens between specifying crf 0 and crf 1. If you're using x264.exe, the switch --qp 0 also give you this High 4:4:4 Predictive, level 4.2, 4:2:0 8-bit AVC profile.
Post Reply