Wierd problem with zarx264gui

If you have questions about compression/encoding/converting look here.
Locked
User avatar
Moonie
Give me some candy!
Joined: Sun Aug 17, 2003 9:37 am
Status: HP:11900 Strength: 940 Gold:60000 MP:1200
Location: Garland, Tx
Org Profile

Wierd problem with zarx264gui

Post by Moonie » Wed Jan 13, 2010 12:31 pm

For some reason whenever i use ZarxGui now, it only encodes the audio and when it gets to the video, it gives this message
Image
"Cannot find H264 start code" and "BitStream Not Compliant"

I thought it was just that I was using an older version so I updated to the recent one
and it does the same thing.
I tried by using avisynth scripts and just putting the avi directly but neither one works.
The video formats are the same as ones i enconded with it in the past and didn't have a problems.
I'm on the same computer and don't recall uninstalling any important codecs so i'm not sure whats going on.

The video is Lagarith, 640x480 at 29fps with uncompressed audio
ImageImageImage
ImageImageImage

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

Re: Wierd problem with zarx264gui

Post by Qyot27 » Wed Jan 13, 2010 4:55 pm

1) After you configure everything to your liking in Zarx264gui, hop over to the Command Line tab. Click the Create .BAT button and save it to the directory of your choice. Close Zarx264gui.

2) Open the .bat file in Notepad. You should be able to do so by right-clicking on it and choosing 'Edit'.

3) Start a new line at the end, with only a single command: pause. So if you have this (I was just using the defaults, so this will likely differ from what yours reads):
"C:\dap\BT\Zarx264gui_1.3\BePipe.exe" --script "import(^C:\dap\BT\Zarx264gui_1.3\test.avs^).Normalize()" | "C:\dap\BT\Zarx264gui_1.3\neroAacEnc.exe" -br 128000 -ignorelength -if - -of "C:\dap\BT\Zarx264gui_1.3\test-temp.m4a"
"C:\dap\BT\Zarx264gui_1.3\avs2yuv.exe" "C:\dap\BT\Zarx264gui_1.3\test.avs" -raw - | "C:\dap\BT\Zarx264gui_1.3\x264.exe" --crf 18 --preset slower --tune animation --filter 1:1 --aq-strength 0.6 --psy-rd 0.4:0 --frames 3927 --fps 23.97602 --output "C:\dap\BT\Zarx264gui_1.3\test-temp.264" - 848x480
"C:\dap\BT\Zarx264gui_1.3\MP4Box.exe" -fps 23.97602 -add "C:\dap\BT\Zarx264gui_1.3\test-temp.264" -add "C:\dap\BT\Zarx264gui_1.3\test-temp.m4a" -new "C:\dap\BT\Zarx264gui_1.3\test.mp4" -tmp "C:\dap\BT\Zarx264gui_1.3"
it should look like this:
"C:\dap\BT\Zarx264gui_1.3\BePipe.exe" --script "import(^C:\dap\BT\Zarx264gui_1.3\test.avs^).Normalize()" | "C:\dap\BT\Zarx264gui_1.3\neroAacEnc.exe" -br 128000 -ignorelength -if - -of "C:\dap\BT\Zarx264gui_1.3\test-temp.m4a"
"C:\dap\BT\Zarx264gui_1.3\avs2yuv.exe" "C:\dap\BT\Zarx264gui_1.3\test.avs" -raw - | "C:\dap\BT\Zarx264gui_1.3\x264.exe" --crf 18 --preset slower --tune animation --filter 1:1 --aq-strength 0.6 --psy-rd 0.4:0 --frames 3927 --fps 23.97602 --output "C:\dap\BT\Zarx264gui_1.3\test-temp.264" - 848x480
"C:\dap\BT\Zarx264gui_1.3\MP4Box.exe" -fps 23.97602 -add "C:\dap\BT\Zarx264gui_1.3\test-temp.264" -add "C:\dap\BT\Zarx264gui_1.3\test-temp.m4a" -new "C:\dap\BT\Zarx264gui_1.3\test.mp4" -tmp "C:\dap\BT\Zarx264gui_1.3"
pause
Save and close the .bat file.

4) Now, double-click on the .bat file (or right-click->Open), and it'll open the Command Prompt and do all the encoding and muxing automatically. If something fails, it should leave the Command Prompt on the screen, which you can then use to diagnose the problem, if one exists. Right click and choose to Select All, and after everything's highlighted, hit Enter to copy it. Paste it in a regular Notepad file and then you can relay it here if something went wrong.

The 'pause' command is what tells the Command Prompt to stay open and give you that 'Press any key to continue' line. If pause wasn't there, it would close and any error you got would be lost.
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog

User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Contact:
Org Profile

Re: Wierd problem with zarx264gui

Post by Zarxrax » Wed Jan 13, 2010 5:00 pm

The error is coming from x264, so it will likely just say the same thing if she does that.
I must admit, I am at a complete loss as to what could be going wrong here.

Edit:
Actually, that error would be coming from MP4Box. Apparently something is causing x264 to terminate early.

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

Re: Wierd problem with zarx264gui

Post by Qyot27 » Wed Jan 13, 2010 5:17 pm

Zarxrax wrote:The error is coming from x264, so it will likely just say the same thing if she does that.
I must admit, I am at a complete loss as to what could be going wrong here.

Edit:
Actually, that error would be coming from MP4Box. Apparently something is causing x264 to terminate early.
Whether from x264 or MP4Box, it would still print more information about the problem, though. But let me see here:

A) What version of AviSynth is installed? Which source filter is the script using, and is the proper decoder being used? A problem in Lagarith could be the reason x264 could be crashing, as I know ffdshow (between November 2008 and January 2009) would crash any app it was used in* if the command line went over a certain number of characters and the path to the executable wasn't explicitly defined. Something similar may be going on here, although not a # of characters issue, nor something as easily solvable by using absolute paths.

*'used in' includes being called by AVISource or DirectShowSource to do decoding, whether the go-betweens were in ffdshow's whitelist or not.

B) Even if I terminate x264 'early', MP4Box continues without error; the difference is that I'm stopping the process after x264 started coding frames - whatever's doing it, is probably doing it before it gets to that step, which would indeed give an empty, borked stream to MP4Box.


As an aside, is there a particular reason the workflow doesn't use y4m out of avs2yuv and output .mp4 from x264 (especially since x264 was compiled with GPAC)? That way the fps and resolution needn't be specified at all - it'd be autodetected by x264 and MP4Box.
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog

User avatar
Moonie
Give me some candy!
Joined: Sun Aug 17, 2003 9:37 am
Status: HP:11900 Strength: 940 Gold:60000 MP:1200
Location: Garland, Tx
Org Profile

Re: Wierd problem with zarx264gui

Post by Moonie » Wed Jan 13, 2010 6:19 pm

The version of avisynth I have installed is 2.5 and the script uses Directshowsource
I created and ran the .bat file and this is what it shows when it gets to the video
Image
ImageImageImage
ImageImageImage

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

Re: Wierd problem with zarx264gui

Post by Qyot27 » Wed Jan 13, 2010 6:33 pm

Moonie wrote:The version of avisynth I have installed is 2.5 and the script uses Directshowsource
I created and ran the .bat file and this is what it shows when it gets to the video
Quoted Image converted to link:
http://img511.imageshack.us/img511/8425 ... ard02q.gif
Then what you've got is a DirectShowSource error. If you tried to play the script in Windows Media Player it'd probably fail there as well. Try using AVISource instead, or even FFmpegSource (although if you do choose to use FFmpegSource, you'll need to open the file in VDub and convert it to ffvhuff or FFV1 using ffdshow's video encoder, since neither the 1.21 or 2.00 versions of FFmpegSource support Lagarith*).

*they could if they were specially-built, but as I can't find an easy-to-follow compilation guide for FFMS2 I can't tell you how well that would work. I've been able to compile the Lagarith-decoding-patched ffmpeg, though.

Is that AviSynth 2.56, 2.57, 2.58? The references I got to the CoInitialize error on Doom9 were from back in 2007.
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog

User avatar
Moonie
Give me some candy!
Joined: Sun Aug 17, 2003 9:37 am
Status: HP:11900 Strength: 940 Gold:60000 MP:1200
Location: Garland, Tx
Org Profile

Re: Wierd problem with zarx264gui

Post by Moonie » Wed Jan 13, 2010 6:49 pm

Qyot27 wrote:
Moonie wrote:The version of avisynth I have installed is 2.5 and the script uses Directshowsource
I created and ran the .bat file and this is what it shows when it gets to the video
Quoted Image converted to link:
http://img511.imageshack.us/img511/8425 ... ard02q.gif
Then what you've got is a DirectShowSource error. If you tried to play the script in Windows Media Player it'd probably fail there as well. Try using AVISource instead, or even FFmpegSource (although if you do choose to use FFmpegSource, you'll need to open the file in VDub and convert it to ffvhuff or FFV1 using ffdshow's video encoder, since neither the 1.21 or 2.00 versions of FFmpegSource support Lagarith*).

*they could if they were specially-built, but as I can't find an easy-to-follow compilation guide for FFMS2 I can't tell you how well that would work. I've been able to compile the Lagarith-decoding-patched ffmpeg, though.

Is that AviSynth 2.56, 2.57, 2.58? The references I got to the CoInitialize error on Doom9 were from back in 2007.
It looks like the Avisynth version is 2.58.8
I tried the script with AVISource and its working =)
Don't know why its not working with directshowsource anymore though
I tested the script in windows media player with directshowsource and it played it without any problems.
But its good thats its working with avisource
ImageImageImage
ImageImageImage

User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Contact:
Org Profile

Re: Wierd problem with zarx264gui

Post by Zarxrax » Wed Jan 13, 2010 6:54 pm

Qyot27 wrote:As an aside, is there a particular reason the workflow doesn't use y4m out of avs2yuv and output .mp4 from x264 (especially since x264 was compiled with GPAC)? That way the fps and resolution needn't be specified at all - it'd be autodetected by x264 and MP4Box.
To be honest, I'm not even familiar with Y4M. The current workflow is just the result of asking a few people (who ought to know what they are talking about).
I don't output mp4 from x264 for a couple reasons:
- since I have to use mp4box anyways to mux the audio, why not?
- if something screws up, and you are only left with a .264 file, then its very obvious. However if something screws up and just leaves you with a .mp4 file, then its not so obvious that there was a problem.


Back on topic: I'm rather surprised that it didn't report the avisynth error in the form of a popup messagebox. I'll have to check into how that slipped through.

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

Re: Wierd problem with zarx264gui

Post by Qyot27 » Wed Jan 13, 2010 8:33 pm

Zarxrax wrote:To be honest, I'm not even familiar with Y4M. The current workflow is just the result of asking a few people (who ought to know what they are talking about).
I don't output mp4 from x264 for a couple reasons:
- since I have to use mp4box anyways to mux the audio, why not?
- if something screws up, and you are only left with a .264 file, then its very obvious. However if something screws up and just leaves you with a .mp4 file, then its not so obvious that there was a problem.
Well, the main thing is that y4m/yuv4mpeg stores the framerate and resolution info and raw input doesn't, which forces you to tell x264 what those are. It's the format avs2yuv uses by default; x264 can use the --stdin y4m option to accept it through standard input (actually, it can also use .y4m files that avs2yuv or ffmpeg output physically). I'm not sure how long the --stdin y4m option has been in x264, though. Just makes for a shorter command line.
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog

Locked

Return to “Conversion / Encoding Help”