View Full Version : avisynth scripts as source is not working
migrena
03-03-2007, 02:36 PM
even when i use only simple directshowsource script i only get "starting conversion" message and nothing happens, console shows that it hangs when it invokes mediainfo to get information about source
also "mpeg4" profiles wont work when avisynth is enabled
scripts as source are quite important to me as it is the only way to add subtitles in videora
Red Kawa
03-03-2007, 02:57 PM
Thanks for reporting this issue. It seems we accidentally broke AviSynth script support in the version 2.04 while trying to fix another issue.
This issue is fixed in version 2.05.
migrena
03-03-2007, 05:51 PM
thank you
there were also some minor issues in 2.03 where some conditional scripts were not correctly compressed so i will see how it will be handled by 2.05 and post if there will be any further problems
memberako
03-04-2007, 07:01 AM
whenever i try to convert using avisynth this happens...
MediaInfo Command line, MediaInfoLib - v0.7.4.5
MSG - Converter - Profile: H.264 VGA 1400kbps Stereo/160kbps
MSG - MediaInfo - Length: -1s
MSG - MediaInfo - Width: -1 pixels
MSG - MediaInfo - Height: -1 pixels
MSG - MediaInfo - Aspect Ratio: -1
MSG - MediaInfo - Framerate: -1 fps
MSG - Converter - Resolution not detected. Using AutoResize Max Resolution as default.
MSG - Converter - Width: 640 pixels
MSG - Converter - Height: 480 pixels
btw, i used LanczosResize(368, 208) in avisynth.
Red Kawa
03-04-2007, 08:36 AM
Well MediaInfo cannot read video details AVS files so you will always see that kind of output. We can see that this may present a problem when it forces are resolution on you.
Since AVS users are typically power users, we will turn off the "Using AutoResize Max Resolution as default." feature for AVS files in our next release.
This will mean it's totally up to AVS users to resize their video properly and not go over the limits for MPEG-4 (640x480), H.264 Level 1.3 (320x240) and H.264 Level 3 (640x480).
memberako
03-04-2007, 01:06 PM
actually, the auto resize function was turned off when i did the conversion. there seems to be something wrong with this version...
Red Kawa
03-04-2007, 03:34 PM
The "Automatically Resizing Resolution" and the "AutoResize Max Resolution as default" are two different features and are not the same thing even though the labelling suggests otherwise.
It makes a lot more sense that disabling "AutoResize" would also disable the "AutoResize Max Resolution as default" feature, so we will implement that in the next release instead of targeting just AVS files as that is a cleaner solution.
migrena
03-04-2007, 06:44 PM
i have tested and in 2.05 avisynth source works only for h264 profiles
here is log from h264 encode
EXEC: C:\Program Files\Videora\Tools\MediaInfo\mediainfobatch.bat "C:\Program Files\Videora\Tools\MediaInfo\MediaInfo.exe" "C:\Program Files\Videora\Tools\MediaInfo\parameters.txt" "C:\Documents and Settings\Administrator\Pulpit\t\w.avs"
MediaInfo Command line, MediaInfoLib - v0.7.4.5
MSG - Converter - Profile: H.264 VGA 768kbps Stereo/128kbps
MSG - MediaInfo - Length: -1s
MSG - MediaInfo - Width: -1 pixels
MSG - MediaInfo - Height: -1 pixels
MSG - MediaInfo - Aspect Ratio: -1
MSG - MediaInfo - Framerate: -1 fps
MSG - Converter - Resolution not detected. Using AutoResize Max Resolution as default.
MSG - Converter - Width: 640 pixels
MSG - Converter - Height: 480 pixels
EXEC: C:\Program Files\Videora\Tools\FFmpeg\ffmpeg.exe -y -i "C:\Documents and Settings\Administrator\Pulpit\t\w.avs" -f mp4 -title "w" -timestamp "2007-03-04 06:40:01" -vcodec h264 -s 640x480 -b 768k -bt 768k -flags +loop -cmp +chroma -partitions +parti4x4+partp4x4+partp8x8+partb8x8 -me umh -subq 7 -trellis 2 -refs 1 -coder 0 -me_range 16 -g 300 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -maxrate 10M -bufsize 10M -rc_eq "blurCplx^(1-qComp)" -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -acodec aac -ac 2 -ab 128 "C:\Program Files\Videora\Videos\iPod\H264\w.mp4-1"
FFmpeg version SVN-r8047, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-liba52 --enable-avisynth --enable-libdts --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libogg --enable-libtheora --enable-libvorbis --enable-x264 --enable-xvid --enable-amr_nb --enable-amr_wb --cpu=i686 --enable-memalign-hack --extra-ldflags=-static
libavutil version: 49.3.0
libavcodec version: 51.34.0
libavformat version: 51.10.0
built on Feb 21 2007 23:20:24, gcc: 4.3.0 20070126 (experimental)
Input #0, avs, from 'C:\Documents and Settings\Administrator\Pulpit\t\w.avs':
Duration: 00:00:33.4, start: 0.000000, bitrate: 0 kb/s
MSG - Video Length is 33s
Stream #0.0: Video: rawvideo, yuv420p, 848x352, 85881 kb/s, 23.98 fps(r)
Stream #0.1: Audio: pcm_s16le, 44100 Hz, stereo, 1411 kb/s
Output #0, mp4, to 'C:\Program Files\Videora\Videos\iPod\H264\w.mp4-1':
Stream #0.0: Video: h264, yuv420p, 640x480, q=10-51, 768 kb/s, 23.98 fps(c)
Stream #0.1: Audio: aac, 44100 Hz, stereo, 128 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
[h264 @ 009C3820]using cpu capabilities MMX MMXEXT SSE 3DNow!
Press [q] to stop encoding
frame= 11 q=10.0 size= 5kB time=0.4 bitrate= 120.5kbits/s
(...)
frame= 802 q=25.0 size= 4064kB time=33.3 bitrate= 999.2kbits/s
frame= 802 q=17632307.1 Lsize= 4098kB time=33.4 bitrate=1006.2kbits/s
video:3559kB audio:520kB global headers:1kB muxing overhead 0.444616%
[h264 @ 009C3820]slice I:3 Avg QP:16.00 size: 16702
[h264 @ 009C3820]slice P:799 Avg QP:18.42 size: 4499
[h264 @ 009C3820]mb I I16..4: 48.6% 0.0% 51.4%
[h264 @ 009C3820]mb P I16..4: 5.0% 0.0% 3.2% P16..4: 28.9% 15.5% 1.2% 0.1% 0.0% skip:46.1%
[h264 @ 009C3820]final ratefactor: 20.71
[h264 @ 009C3820]SSIM Mean Y:0.9901944
[h264 @ 009C3820]kb/s:871.6
EXEC: C:\Program Files\Videora\Tools\NicMP4Box\NicMP4Box.exe -itags "Name=w" -add "C:\Program Files\Videora\Videos\iPod\H264\w.mp4-1" "C:\Program Files\Videora\Videos\iPod\H264\w.mp4"
Importing ISO File: | | (01/100)
(...)
ISO File Writing: |=================== | (99/100)
EXEC: C:\Program Files\Videora\Tools\AddToItunes\AddToItunes.exe -add "C:\Program Files\Videora\Videos\iPod\H264\w.mp4"
iTunes Library Tool
Red Kawa Inc.
http://www.redkawa.com
Success
DELETE: C:\Program Files\Videora\Videos\iPod\H264\w.mp4-1
and here is from mpeg4
EXEC: C:\Program Files\Videora\Tools\MediaInfo\mediainfobatch.bat "C:\Program Files\Videora\Tools\MediaInfo\MediaInfo.exe" "C:\Program Files\Videora\Tools\MediaInfo\parameters.txt" "C:\Documents and Settings\Administrator\Pulpit\t\w.avs"
MediaInfo Command line, MediaInfoLib - v0.7.4.5
MSG - Converter - Profile: MPEG4 VGA 768kbps Stereo/128kbps
MSG - MediaInfo - Length: -1s
MSG - MediaInfo - Width: -1 pixels
MSG - MediaInfo - Height: -1 pixels
MSG - MediaInfo - Aspect Ratio: -1
MSG - MediaInfo - Framerate: -1 fps
MSG - Converter - Resolution not detected. Using AutoResize Max Resolution as default.
MSG - Converter - Width: 640 pixels
MSG - Converter - Height: 480 pixels
EXEC: C:\Program Files\Videora\Tools\FFmpeg\ffmpeg.exe -y -i "C:\Documents and Settings\Administrator\Pulpit\t\w.avs" -f mp4 -title "w" -timestamp "2007-03-04 06:42:28" -vcodec xvid -s 640x480 -b 768k -flags +aic+mv4+trell -mbd 2 -cmp 2 -subcmp 2 -g 250 -maxrate 2.5M -bufsize 2.5M -acodec aac -ac 2 -ab 128 "C:\Program Files\Videora\Videos\iPod\MPEG4\w.mp4"
EXEC: C:\Program Files\Videora\Tools\AddToItunes\AddToItunes.exe -add "C:\Program Files\Videora\Videos\iPod\MPEG4\w.mp4"
iTunes Library Tool
Red Kawa Inc.
http://www.redkawa.com
Success
i hope it will help
about mediainfo not being able to determine resolution from script - you can fool mediainfo by using makeavis but if you do videora will not be able to handle such fake avi file :(
i have found a possible problem with autoresizing - the "maximum resolution" only works for width, so 848x848 video with "max 640x480" will be encoded to 640x640, ipod will not be able to handle this (maybe yes - for mpeg4 and if pixelcount limit is not excedeed)
memberako
03-04-2007, 11:42 PM
The "Automatically Resizing Resolution" and the "AutoResize Max Resolution as default" are two different features and are not the same thing even though the labelling suggests otherwise.
It makes a lot more sense that disabling "AutoResize" would also disable the "AutoResize Max Resolution as default" feature, so we will implement that in the next release instead of targeting just AVS files as that is a cleaner solution.
oh ok. i will be waiting for the next release then. thanks.
Red Kawa
03-05-2007, 12:31 PM
It would seem that FFmpeg will not let you convert AVS scripts to MPEG-4 when xvid is used as the video codec. However, FFmpeg will allow AVS conversions when using mpeg4 as the video codec. So we will enable this in the next release. One very important thing to note though is the mpeg4 vcodec is VERY picky about the framerate so you must set it properly in your AVS scripts (ChangeFPS) or else the conversion will fail with timebase messages.
Since people who use AVS scripts are generally power users, reading the details through mediainfo isn't necessary, since such people have already taken the time to write a script for a specific video and will already analysed the original video themselves with a tool like MediaInfo, GSpot, etc.
Its very rare that a video's height will exceed or equal a video's width so we initially didn't do any such checking. We will fix this in the next release so it will check and scale such videos properly.
Red Kawa
03-05-2007, 04:31 PM
The 3 things we mentioned before have been fixed in version 2.06.
migrena
03-05-2007, 05:44 PM
It would seem that FFmpeg will not let you convert AVS scripts to MPEG-4 when xvid is used as the video codec. However, FFmpeg will allow AVS conversions when using mpeg4 as the video codec. So we will enable this in the next release.ok now im totally lost... afaik avisynth doesnt carry over neither source file encoder information nor decoder information, and because i'm using ditrectshowsource then followed with some operations on the video this means output video stream is totally different than input
but - there are some problems with inacurate framerate calculating in avisynth that might cause this if ffmpeg is so picky about that as you noted, and well in that case its not videora bug but ffmpeg bug
Since people who use AVS scripts are generally power users, reading the details through mediainfo isn't necessary, since such people have already taken the time to write a script for a specific video and will already analysed the original video themselves with a tool like MediaInfo, GSpot, etc.personally i have automated conversion process with batch script and a few avisynth functions that i wrote, but when i showed this to my friends they judged that it is too complicated for average user, videora is easy enough for them to handle :)
and thank you for your work
[edit]
its fixed! :)
there was indeed some problems when script doensnt explicitly states what framerate im using, but it happens only with ffmpeg, other cli necoders are fine without that, anyway, thanks again