PDA

View Full Version : Unhandled exception when trying to use queue


breadstick
11-10-2008, 12:45 PM
On both 4.01 & 4.02, if I try to queue files, as soon as I click on "start converting" the iphone 3G converter throws an "unhandled exception" error saying "length cannot be less than zero"

It's exactly the error Weetbix had on
http://www.redkawa.com/forums/showthread.php?t=4466

No answer or solution was posted (just weetbix's manual work-around)

The strange thing is that if you check the console messages (see the console messages below error message) you'll see that the queue seems to supplying an empty string to the videoInfo.exe file (returning the length of -1s) when using the queue & the "start converting" button - this returned length of -1 second is what crashes the convertor. On the other hand, the same file with the "one-click convert" button produces a proper commandline to be exec'd & things are hunky dory....


The full error message is:



--------------------------------------------------------
Length cannot be less than zero
Parameter name: length.

************** Exception Text **************
System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at Videora.Conversion.Video.EncoderFlows.620de709ada5 37a6.00ec650ece53ae1e(String 391376a6a1c068ea)
at Videora.Conversion.Video.EncoderFlows.iPod.8313e67 a3e7b022b.8d28701f7999203f(Int32 01b557925841ae51, String b41a802ca5fde63b, String 391376a6a1c068ea)
at Videora.Conversion.Video.EncoderFlows.iPod.8313e67 a3e7b022b.ParseConsoleLine(Int32 state, String filename, String line)
at Videora.ShellProcess.1f4df9c4eb8b0eec.9b437076ef0d 1a5d(Object e0292b9ed559da7d, 11c4dde02ebdfce0 fbf34718e704c6bc)

<EDIT: removed info about assemblies loaded)
----------------------------------------




The console text when using the queue (look at the empty string at the end of the EXEC line!):


EXEC: C:\Program Files\Red Kawa\Video Converter App\Tools\VideoInfo\VideoInfo.exe ""

VideoInfo Tool 3.1
(C) 2007 Red Kawa Inc.
http://www.redkawa.com

MediaInfoLib - v0.7.7.6

<edit:empty lines removed>

DONE
MSG - OS - Version: Microsoft Windows NT 5.1.2600 Service Pack 3
MSG - Converter - Version: 4.02
MSG - Converter - Device: iPhone_2G
MSG - Converter - Profile: H.264 480x320 768kbps Stereo/128kbps 2-Pass
MSG - VideoInfo - Length: -1s
MSG - VideoInfo - Width: -1 pixels
MSG - VideoInfo - Height: -1 pixels
MSG - VideoInfo - Aspect Ratio: -1
MSG - VideoInfo - Framerate: -1 fps
MSG - VideoInfo - Frame Count: -1



Here's the console for the ***SAME*** file when using one-click convert (I cancelled after 10 seconds) - check out the correct string at the end of the EXEC line!:


EXEC: C:\Program Files\Red Kawa\Video Converter App\Tools\VideoInfo\VideoInfo.exe "C:\MOVIES\reel.avi"

VideoInfo Tool 3.1
(C) 2007 Red Kawa Inc.
http://www.redkawa.com

MediaInfoLib - v0.7.7.6

Container=AVI
FileSize=533 MiB
VideoCodec=dvsd
VideoPlayTime=00:02:30.000
VideoBitrate=28.8 Mbps
VideoWidth=720
VideoHeight=576
VideoAspectRatio=1.333
VideoFrameRate=25.000
VideoFrameCount=3750
AudioCodec=PCM
AudioBitrate=1 024 Kbps
AudioMode=CBR
AudioChannels=2
AudioSamplingRate=32000

AVIdwRate=25
AVIdwScale=1

DONE
MSG - OS - Version: Microsoft Windows NT 5.1.2600 Service Pack 3
MSG - Converter - Version: 4.02
MSG - Converter - Device: iPhone_2G
MSG - Converter - Profile: H.264 480x320 768kbps Stereo/128kbps 2-Pass
MSG - VideoInfo - Length: 150s
MSG - VideoInfo - Width: 720 pixels
MSG - VideoInfo - Height: 576 pixels
MSG - VideoInfo - Aspect Ratio: 1.333
MSG - VideoInfo - Framerate: 25 fps
MSG - VideoInfo - Frame Count: 3750
MSG - Converter - Automatically Resizing Resolution
MSG - Converter - New Width:426 | New Height: 320
MSG - Converter - Automatically Generating Framerate
EXEC: C:\Program Files\Red Kawa\Video Converter App\Tools\FFmpeg\ffmpeg.exe -y -i "C:\MOVIES\reel.avi" -an -pass 1 -f mp4 -title "reel" -timestamp "2008-11-10 05:23:59" -vcodec libx264 -level 21 -s 426x320 -b 768k -bt 768k -bufsize 4M -maxrate 4M -g 250 -coder 0 -partitions 0 -me_method dia -subq 1 -trellis 0 -refs 1 -flags +loop -cmp +chroma -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -threads 0 "C:\MOVIES\reel.mp4"

FFmpeg version Sherpya-r15596, Copyright (c) 2000-2008 Fabrice Bellard, et al.
libavutil 49.11. 0 / 49.11. 0
libavcodec 52. 0. 0 / 52. 0. 0
libavformat 52.22. 1 / 52.22. 1
libavdevice 52. 1. 0 / 52. 1. 0
libswscale 0. 6. 1 / 0. 6. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Oct 11 2008 17:20:38, gcc: 4.2.5 20080919 (prerelease) [Sherpya]
Input #0, avi, from 'C:\MOVIES\reel.avi':
Duration: 00:02:30.00, start: 0.000000, bitrate: 29829 kb/s
Stream #0.0: Video: dvvideo, yuv420p, 720x576, 25.00 tb(r)
Stream #0.1: Audio: pcm_s16le, 32000 Hz, stereo, s16, 1024 kb/s
Output #0, mp4, to 'C:\MOVIES\reel.mp4':
Stream #0.0: Video: libx264, yuv420p, 426x320, q=10-51, pass 1, 768 kb/s, 25.00 tb(c)
Stream mapping:
Stream #0.0 -> #0.0
[libx264 @ 015FC7D0]width or height not divisible by 16 (426x320), compression will suffer.
[libx264 @ 015FC7D0]using cpu capabilities: MMX2 Cache64
Press [q] to stop encoding
frame= 44 fps= 0 q=10.0 size= 87kB time=1.68 bitrate= 425.9kbits/s
frame= 67 fps= 66 q=18.0 size= 339kB time=2.60 bitrate=1066.6kbits/s
frame= 104 fps= 69 q=17.0 size= 473kB time=4.08 bitrate= 950.2kbits/s
frame= 145 fps= 72 q=18.0 size= 605kB time=5.72 bitrate= 866.7kbits/s
frame= 186 fps= 74 q=21.0 size= 856kB time=7.36 bitrate= 952.4kbits/s
frame= 222 fps= 74 q=21.0 size= 989kB time=8.80 bitrate= 920.7kbits/s
frame= 263 fps= 75 q=24.0 size= 1150kB time=10.44 bitrate= 902.7kbits/s
frame= 303 fps= 75 q=22.0 size= 1308kB time=12.04 bitrate= 889.7kbits/s
frame= 345 fps= 76 q=28.0 size= 1511kB time=13.72 bitrate= 902.4kbits/s
frame= 371 fps= 74 q=29.0 size= 1670kB time=14.76 bitrate= 927.1kbits/s
frame= 388 fps= 70 q=29.0 size= 1764kB time=15.44 bitrate= 936.2kbits/s
frame= 408 fps= 68 q=30.0 size= 1866kB time=16.24 bitrate= 941.5kbits/s
frame= 440 fps= 68 q=31.0 size= 2021kB time=17.52 bitrate= 944.9kbits/s
frame= 479 fps= 68 q=25.0 size= 2128kB time=19.08 bitrate= 913.7kbits/s
frame= 522 fps= 69 q=25.0 size= 2232kB time=20.80 bitrate= 879.0kbits/s
frame= 560 fps= 70 q=24.0 size= 2335kB time=22.32 bitrate= 857.0kbits/s
frame= 604 fps= 71 q=28.0 size= 2446kB time=24.08 bitrate= 832.2kbits/s
frame= 639 fps= 71 q=24.0 size= 2547kB time=25.48 bitrate= 818.8kbits/s
frame= 684 fps= 72 q=22.0 size= 2650kB time=27.28 bitrate= 795.8kbits/s
frame= 722 fps= 72 q=24.0 size= 2780kB time=28.80 bitrate= 790.7kbits/s
frame= 760 fps= 72 q=29.0 size= 2985kB time=30.32 bitrate= 806.4kbits/s
frame= 799 fps= 72 q=23.0 size= 3138kB time=31.88 bitrate= 806.3kbits/s
frame= 841 fps= 73 q=23.0 size= 3278kB time=33.56 bitrate= 800.2kbits/s
frame= 876 fps= 73 q=23.0 size= 3396kB time=34.96 bitrate= 795.8kbits/s
frame= 918 fps= 73 q=22.0 size= 3531kB time=36.64 bitrate= 789.4kbits/s
frame= 956 fps= 73 q=22.0 size= 3649kB time=38.16 bitrate= 783.3kbits/s
DELETE: C:\MOVIES\reel.mp4
frame= 996 fps= 74 q=23.0 size= 3776kB time=39.76 bitrate= 777.9kbits/s


Any ideas why this is happening...?

cheers!

Hud1ai2
11-13-2008, 05:36 AM
Hi, i need some advice too. This tool is realy great, but with working convert in queue will be the best one.;)

Red Kawa
11-26-2008, 12:48 PM
This wasn't really a bug, it's just the Queue function was never really intended to work that way.

However, a lot of people are probably trying to use the Queue your way so we decided to add functionality to make your way work as well.

To summarize, you should no longer encounter this error in 4.04.

Thanks for re-reporting this issue and also pointing to the older post.