AVIsynth for MAC users

User avatar
Gepetto
Mr. Poopy Pants
Joined: Thu Jun 10, 2004 10:11 pm
Status: Bored to tears
Location: The Tokyo Settlement
Contact:
Org Profile

Post by Gepetto » Mon Jun 11, 2007 3:12 pm

If it's in Lossless mode, shouldn't the b-frames and such be deactivated by default?
And God spoke unto the Chicken, and He said: "Thou shalt crosseth the road", and the Chicken did cross the road, and there was much rejoicing.
My DeviantART profile

User avatar
Qyot27
Surreptitious fluffy bunny
Joined: Fri Aug 30, 2002 12:08 pm
Status: Creepin' between the bullfrogs
Location: St. Pete, FL
Contact:
Org Profile

Post by Qyot27 » Mon Jun 11, 2007 10:36 pm

Gepetto wrote:If it's in Lossless mode, shouldn't the b-frames and such be deactivated by default?
From what I saw in both x264's VFW way back when, and in Avidemux's options, no they don't automatically get deactivated, unless it does and just doesn't grey the options out. Doing it through ffdshow's VFW would probably not have those options available period since H.264 Lossless is a completely separate item on it's encoder list (but I haven't looked, so I don't know).

User avatar
Greggus1
Joined: Wed Dec 14, 2005 12:07 pm
Org Profile

Post by Greggus1 » Wed Jun 13, 2007 1:32 pm

Results of Experiment :

Trying to encode at Quantizer 0 didn't seem to work : The encode bar would always show it at 1 at least. After doing some research, it seems x.264 for Avidemux was not implemented with all features, among them lossless encoding. In addition, there seems to be no real way to disable B-frames, or at least I didn't see one in the options.

What I tried next was encoding an x.264 AVI file through MPEG Streamclip, which resulted in a probably lossless, but unreadable file, even though I'd unchecked the B-frames box.

I'm trying an x.264 MP4 right now with the same settings, just to see if I can play it.

User avatar
Gepetto
Mr. Poopy Pants
Joined: Thu Jun 10, 2004 10:11 pm
Status: Bored to tears
Location: The Tokyo Settlement
Contact:
Org Profile

Post by Gepetto » Wed Jun 13, 2007 2:41 pm

That should be a safer bet than AVI. x264 in AVI is a big no-no AFAIK
And God spoke unto the Chicken, and He said: "Thou shalt crosseth the road", and the Chicken did cross the road, and there was much rejoicing.
My DeviantART profile

User avatar
Qyot27
Surreptitious fluffy bunny
Joined: Fri Aug 30, 2002 12:08 pm
Status: Creepin' between the bullfrogs
Location: St. Pete, FL
Contact:
Org Profile

Post by Qyot27 » Wed Jun 13, 2007 3:27 pm

Gepetto wrote:That should be a safer bet than AVI. x264 in AVI is a big no-no AFAIK
That's primarily because of the B-frames and Reference frames. If neither are enabled, then the problems (which are sync-related) don't arise. And with Lossless encoding, it's not a matter of really trying to get the best compression, per se - just usable compression (and if it happens to be the best, so be it - even though I can probably confidently bet that Lagarith or Huffyuv would perform better than H.264 Lossless, in both speed and size).

The problem is fundamentally complicated because Perian - from what I can tell - only supports H.264 in AVI. So unless Apple has made it possible to decode H.264 Lossless through their own components, putting the encode in MP4 won't amount to much.
Greggus1 wrote:In addition, there seems to be no real way to disable B-frames, or at least I didn't see one in the options.
Not even setting B-frames to 0 worked?

User avatar
Gepetto
Mr. Poopy Pants
Joined: Thu Jun 10, 2004 10:11 pm
Status: Bored to tears
Location: The Tokyo Settlement
Contact:
Org Profile

Post by Gepetto » Wed Jun 13, 2007 4:56 pm

Qyot27 wrote:unless Apple has made it possible to decode H.264 Lossless through their own components, putting the encode in MP4 won't amount to much.
OS X has native support for H264 (I don't know specifically about the lossless mode, but I've never heard otherwise) and MP4, so it should work.
Qyot27 wrote:That's primarily because of the B-frames and Reference frames.
Are you sure? MPEG-4 ASP has those as well, and it works well in AVI. (even though with a much smaller complexity)

Sorry for the stupid questions, but I have absolutely no in-depth knowledge about containers.
And God spoke unto the Chicken, and He said: "Thou shalt crosseth the road", and the Chicken did cross the road, and there was much rejoicing.
My DeviantART profile

User avatar
Qyot27
Surreptitious fluffy bunny
Joined: Fri Aug 30, 2002 12:08 pm
Status: Creepin' between the bullfrogs
Location: St. Pete, FL
Contact:
Org Profile

Post by Qyot27 » Wed Jun 13, 2007 10:21 pm

Gepetto wrote:OS X has native support for H264 (I don't know specifically about the lossless mode, but I've never heard otherwise) and MP4, so it should work.
Last I checked, the native support Apple has given for H.264 - in reference to Quicktime, anyway - wasn't nearly as complete as ffdshow or CoreAVC support is. For instance, I don't believe High Profile was supported at all, and Main Profile was severely limited if it was even supported at all. As it stood, the early H.264-encoded trailers from the Quicktime site were made with a bastardized version of Baseline Profile that supported B-frames.

In general reference, AMVs and fansubs are more than likely to overwhelmingly make use of High Profile because of the massive compression gains. I'm sure Lossless mode is in the same boat, so it would be necessary for Apple to have updated their support.
Gepetto wrote:
Qyot27 wrote:That's primarily because of the B-frames and Reference frames.
Are you sure? MPEG-4 ASP has those as well, and it works well in AVI. (even though with a much smaller complexity)

Sorry for the stupid questions, but I have absolutely no in-depth knowledge about containers.
It's still a rather hacky solution to force ASP into AVI specifically because of the B-frames - since AVI doesn't support B-frames, the DivX and XviD teams hacked them in, albeit in differing ways (this is where the Packed Bitstream option comes from, as well as the source of the B-frame decoder lag error message/legacy initial black frame in XviD-based ASP encodes in AVI). There really isn't anything else that comes to mind which I think would affect it, except maybe the GMC warp points, but I know next-to-nothing about that feature.

H.264 allows a heck of a lot more B-frames and Reference frames than ASP does, though, and that's where the shit hits the fan when trying to stuff it into AVI, as the other options (discounting things that work on Reference and B-frames, like Mixed refs and the B-pyramid, which really should not be done in AVI). It requires even worse hacks and because AVI isn't equipped to handle it, it keels over and you get sync problems. To remedy the problem and make H.264 function without sync problems, the solution is not to use B-frames or Reference frames (or at least limit their usage to 1 or 2 as one would with XviD's VFW encoder, although that will still eventually introduce the lagging problem as well) and especially not Mixed refs or the B-pyramid, but in doing so it seriously affects the ability of H.264 to compress as well as it can - even if the resulting quality is still better than a comparably-sized ASP encode.

User avatar
Kalium
Sir Bugsalot
Joined: Fri Oct 03, 2003 11:17 pm
Location: Plymouth, Michigan
Org Profile

Post by Kalium » Wed Jun 13, 2007 10:32 pm

I once asked an Apple guy (as in worked for Apple) this very question.

I got a t-shirt instead of an answer.

OK, OK, it was a stump-the-experts event, where you either got your question answered or a prize. I wanted an answer.

User avatar
Greggus1
Joined: Wed Dec 14, 2005 12:07 pm
Org Profile

Post by Greggus1 » Thu Jun 14, 2007 8:49 am

Qyot27 wrote:
Greggus1 wrote:In addition, there seems to be no real way to disable B-frames, or at least I didn't see one in the options.
Not even setting B-frames to 0 worked?
There doesn't seem to be a simple B-frames checkbox, with custom amount or not. There are alot of options though, and I may have interpreted some wrong.

Anyway, the x.264 MP4 simply will not encode in Lossless mode.I get an error at 99 percent. I wonder if it's me :/

User avatar
Qyot27
Surreptitious fluffy bunny
Joined: Fri Aug 30, 2002 12:08 pm
Status: Creepin' between the bullfrogs
Location: St. Pete, FL
Contact:
Org Profile

Post by Qyot27 » Thu Jun 14, 2007 11:11 am

Greggus1 wrote:
Qyot27 wrote:
Greggus1 wrote:In addition, there seems to be no real way to disable B-frames, or at least I didn't see one in the options.
Not even setting B-frames to 0 worked?
There doesn't seem to be a simple B-frames checkbox, with custom amount or not. There are alot of options though, and I may have interpreted some wrong.

Anyway, the x.264 MP4 simply will not encode in Lossless mode.I get an error at 99 percent. I wonder if it's me :/
Granted, I've got the Windows version of Avidemux in front of me, but after selecting x264 from the Video drop-down menu, click the Configure button. The Reference frame option and the various B-frame options are on the 'Motion & Misc' and 'Partitions & Frames' tabs, respectively.

Locked

Return to “Video & Audio Help”