Post subject: TASEncodingPackage discussion
Stovent
He/Him
Publisher
Joined: 8/23/2016
Posts: 165
Location: France
Hello, I'm using the TASEncodingPackage2 (as everybody i guess) and I have an issue : Sometimes, during the encode, it stop and i have to press the spacebar on the prompt to make it run again. Does anyone had this issue before or is it just me ? Another subject to discuss but it's just informational : I saw that H.264 encoder is a 32-bits version. Can a 64-bits version make encodes faster ? I can understand that such a program is long to make and create a 64-bits would be a lot of work, that the creator may not have. Thanks for your answers
[17:37:00]<TheCoreyBurton> It's N64 - it's ALWAYS bad news.
Stovent
He/Him
Publisher
Joined: 8/23/2016
Posts: 165
Location: France
I figured out when the problem happen, it happen when I click inside the prompt window, and it is like "freezing" (the encode doesn't continue) until I press a button. Can it be problematic or not ? As far as i've seen, it doesn't affect the encode quality so I guess it's not
[17:37:00]<TheCoreyBurton> It's N64 - it's ALWAYS bad news.
Site Admin, Skilled player (1250)
Joined: 4/17/2010
Posts: 11473
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Do you mean right-click? That's the only thing that freezes it for me.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Stovent
He/Him
Publisher
Joined: 8/23/2016
Posts: 165
Location: France
No, left-click. Right-click do nothing for me
[17:37:00]<TheCoreyBurton> It's N64 - it's ALWAYS bad news.
Site Admin, Skilled player (1250)
Joined: 4/17/2010
Posts: 11473
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
I guess it's some difference in your cmd.exe. Try googling the problem.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Masterjun
He/Him
Site Developer, Skilled player (1986)
Joined: 10/12/2010
Posts: 1185
Location: Germany
Maybe you want to disable QuickEdit Mode. Click the icon on the top left -> Properties -> Uncheck QuickEdit Mode
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Stovent
He/Him
Publisher
Joined: 8/23/2016
Posts: 165
Location: France
Yes, it works now, thanks Masterjun ! And about the second part of my 1st comment, is it useless or not ?
[17:37:00]<TheCoreyBurton> It's N64 - it's ALWAYS bad news.
Publisher
Joined: 4/23/2009
Posts: 1283
I recommend using qaac instead of neroaacenc for our AAC audio. https://github.com/nu774/qaac/releases It uses Apple's AAC encoder so you also need to install Apple Application Support to have the right DLLs to use it.
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
Aktan wrote:
I recommend using qaac instead of neroaacenc for our AAC audio.
Reasons?
Publisher
Joined: 4/23/2009
Posts: 1283
creaothceann wrote:
Aktan wrote:
I recommend using qaac instead of neroaacenc for our AAC audio.
Reasons?
It's been known for a while now that Apple AAC encoder is better than Nero, but here are some links: http://listening-tests.hydrogenaud.io/igorc/aac-96-a/index.htm http://listening-tests.hydrogenaud.io/igorc/results.html Note that even later tests don't even use Nero anymore but uses Apple's AAC as shown in here: https://en.wikipedia.org/wiki/Codec_listening_test
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
Thanks.
Post subject: The Virtual Boy update no one wanted.
Spikestuff
They/Them
Editor, Publisher, Expert player (2631)
Joined: 10/12/2011
Posts: 6435
Location: The land down under.
To Incorporate BizHawk's VBoy.
Language: avisynth

Import("pack\Pantarheon3D.avsi") sauce = AVISource("movie.avi") L = sauce.Crop(0, 0, 384, 224).Levels(0, 1, 255, 0, 157) R = sauce.Crop(384, 0, 384, 224).Levels(0, 1, 255, 0, 157) yt3d(L, R).AudioDub(L)
Same stuff we've been using, just that since we're already in greyscale just go straight to doing the level to not be shit. The other code that needs to be added is this (due to YouTube's update):
ffmpeg -i input_file.mkv -c copy -metadata:s:v:0 stereo_mode=1 output_file.mkv
This forces YouTube to recognize it as a 3D video. --- This also means, that the stuff changes for VBjin. (can we nuke it now?) Just change the colouring to greyscale from what we're already meant to do and do this to the script.
Language: avisynth

Import("pack\Pantarheon3D.avsi") sauce = AVISource("movie.avi") L = sauce.Crop(0, 0, 384, 224).Levels(0, 1, 255, 0, 157) R = sauce.Crop(400, 0, 384, 224).Levels(0, 1, 255, 0, 157) yt3d(L, R).AudioDub(L)
WebNations/Sabih wrote:
+fsvgm777 never censoring anything.
Disables Comments and Ratings for the YouTube account. Something better for yourself and also others.
Site Admin, Skilled player (1250)
Joined: 4/17/2010
Posts: 11473
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Editor, Player (69)
Joined: 6/22/2005
Posts: 1050
I downloaded the x64 version of the encoding package today, and the included version of avs2pipemod hangs at line 37 of global.bat
"./programs/avs2pipemod" -info encode.avs > "./temp/info.txt"
The problem seems to be the FreeSub call in the subtitles function, since the hang occurs when hd and vb are false but not when hd is true and vb is false. The hang doesn't occur if using the latest version of avs2pipemod that I could find (1.1.1). In case it matters, I just installed AviSynth 2.6.0 today without uninstalling the previous version, which was likely 2.6.0 alpha 2. Also, the for /f calls on lines 38 and 39 of global.bat don't work properly on my system (Win7 Home Premium SP1) unless
./temp/info.txt
is replaced by
%~dp0/temp/info.txt
Everything seems to work properly for the MKV Modern HQ encode if using avs2pipemod 1.1.1 and fixing lines 38 and 39 as above. I'll test the other encode types later.
Current Projects: TAS: Wizards & Warriors III.
Site Admin, Skilled player (1250)
Joined: 4/17/2010
Posts: 11473
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Applied your tweaks, check please.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Editor, Player (69)
Joined: 6/22/2005
Posts: 1050
Found another error on line 134 of global.bat, this time for the 512kb encode:
%~dp0\programs\avs2pipemod -info encode.avs
should be
%~dp0\programs\avs2pipemod -info %~dp0\encode.avs
This change will probably be necessary on line 175, as well.
Current Projects: TAS: Wizards & Warriors III.
Site Admin, Skilled player (1250)
Joined: 4/17/2010
Posts: 11473
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Done.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Editor, Player (69)
Joined: 6/22/2005
Posts: 1050
I've updated the batch file to take command-line arguments. Other changes included localization of variables, changing the paths to use backslashes (Windows convention), and changing the command for the YouTube upload (I didn't like the use of both start and call). There are actually two commands for the upload: The first one uses the contents of ytdesc.txt, and the second one sets the description to "todo." I've commented out the second one, but you can change that as desired. I could also add an option for the (rare?) VirtualBoy encodes, if desired. It expects the command-line arguments in the same order as the current choices. If an argument is invalid, it explicitly asks, same as the current behavior. Here's the entire thing:Download global.bat
Language: batch

:: feos, 2013-2017 (cheers to Guga, Velitha, nanogyth, Aktan and Dacicus) :: This global batch is a part of "TAS Encoding Package": :: http://tasvideos.org/EncodingGuide/PublicationManual.html :: Asks whether the console is TV based to autoset the SAR parameter (4:3 only so far). :: Allows to select the encode to make. @echo off setlocal enableextensions :: Restore AVS defaults :: ".\programs\replacetext" "encode.avs" "pass = 1" "pass = 0" ".\programs\replacetext" "encode.avs" "pass = 2" "pass = 0" ".\programs\replacetext" "encode.avs" "i444 = true" "i444 = false" ".\programs\replacetext" "encode.avs" "hd = true" "hd = false" ".\programs\replacetext" "encode.avs" "vb = true" "vb = false" :: Uncomment for a VirtualBoy encode :: set /a VIRTUALBOY=1 if "%VIRTUALBOY%"=="1" (".\programs\replacetext" "encode.avs" "vb = false" "vb = true") echo. echo ----------------------- echo Hybrid Encoding Batch echo ----------------------- echo. echo Command-line arguments: global.bat ^<tv^> ^<enc_opt^> echo ^<tv^> TV-based console? y/n echo ^<enc_opt^> Encode option? 1-5 echo. if [%1]==[y] goto TV sar if [%1]==[n] goto handheld sar : SAR OPTIONS echo Is this a TV based console? (y/n) set /p ANSWER= if "%ANSWER%"=="y" goto TV sar if "%ANSWER%"=="n" goto handheld sar echo I'm not kidding! goto SAR OPTIONS : TV sar ".\programs\replacetext" "encode.avs" "handheld = true" "handheld = false" ".\programs\replacetext" "encode.avs" "pass = 0" "pass = 1" ".\programs\avs2pipemod" -info encode.avs > ".\temp\info.txt" for /f "tokens=2" %%G in ('FIND "width" "%~dp0temp\info.txt"') do (set width=%%G) for /f "tokens=2" %%G in ('FIND "height" "%~dp0temp\info.txt"') do (set height=%%G) set /a "SAR_w=4 * %height%" set /a "SAR_h=3 * %width%" set VAR=%SAR_w%:%SAR_h% ".\programs\replacetext" "encode.avs" "pass = 1" "pass = 0" goto ENCODE OPTIONS : handheld sar set VAR=1:1 ".\programs\replacetext" "encode.avs" "handheld = false" "handheld = true" goto ENCODE OPTIONS : ENCODE OPTIONS if [%2]==[1] goto 10bit444 if [%2]==[2] goto 512kb if [%2]==[3] goto HD if [%2]==[4] goto HD if [%2]==[5] goto ExtraHQ echo. echo What encode do you want to do? echo. echo Press 1 for Modern HQ MKV. echo Press 2 for Compatibility MP4. echo Press 3 for HD Stream. echo Press 4 for All of the above. echo Press 5 for extra HQ encodes. : Set choice set /p EncodeChoice= if "%EncodeChoice%"=="1" goto 10bit444 if "%EncodeChoice%"=="2" goto 512kb if "%EncodeChoice%"=="3" goto HD if "%EncodeChoice%"=="4" goto HD if "%EncodeChoice%"=="5" goto ExtraHQ echo. echo You better choose something real! goto Set choice : HD :: Audio :: ".\programs\avs2pipemod" -wav encode.avs | ".\programs\venc" -q10 - ".\temp\audio_youtube.ogg" echo. echo ---------------------------- echo Encoding YouTube HD stream echo ---------------------------- echo. :: Video :: ".\programs\replacetext" "encode.avs" "hd = false" "hd = true" ".\programs\avs2pipemod" -y4mp encode.avs | ".\programs\x264_x64" --qp 5 -b 0 --keyint infinite --output ".\temp\video_youtube.mkv" --demuxer y4m - ".\programs\replacetext" "encode.avs" "hd = true" "hd = false" :: Muxing :: ".\programs\mkvmerge" -o ".\output\encode_youtube.mkv" --compression -1:none ".\temp\video_youtube.mkv" ".\temp\audio_youtube.ogg" if "%VIRTUALBOY%"=="1" (set VBPREF="_vb_") else (set VBPREF="_") if "%VIRTUALBOY%"=="1" (".\programs\ffmpeg" -i ".\output\encode_youtube.mkv" -c copy -metadata:s:v:0 stereo_mode=1 ".\output\encode%VBPREF%youtube.mkv") echo. echo ----------------------------- echo Uploading YouTube HD stream echo ----------------------------- echo. start "" cmd /c type "%~dp0programs\ytdesc.txt" ^| "%~dp0programs\tvcman.exe" "%~dp0output\encode%VBPREF%youtube.mkv" todo tasvideos rem start "" cmd /c echo todo ^| "%~dp0programs\tvcman.exe" "%~dp0output\encode%VBPREF%youtube.mkv" todo tasvideos if "%EncodeChoice%"=="3" goto Defaults if [%2]==[3] goto Defaults : 10bit444 :: Audio :: ".\programs\avs2pipemod" -wav encode.avs | ".\programs\sox" -t wav - -t wav - trim 0.0065 | ".\programs\opusenc" --bitrate 64 --padding 0 - ".\temp\audio.opus" echo. echo ---------------------- echo Generating timecodes echo ---------------------- echo. :: Timecodes :: ".\programs\replacetext" "encode.avs" "pass = 0" "pass = 1" ".\programs\avs2pipemod" -benchmark encode.avs ".\programs\replacetext" "encode.avs" "pass = 1" "pass = 2" echo. echo -------------------------------- echo Encoding 10bit444 downloadable echo -------------------------------- echo. :: Video :: ".\programs\replacetext" "encode.avs" "i444 = false" "i444 = true" ".\programs\avs2pipemod" -y4mp encode.avs | ".\programs\x264-10_x64" --threads auto --sar "%VAR%" --crf 20 --keyint 600 --ref 16 --no-fast-pskip --bframes 16 --b-adapt 2 --direct auto --me tesa --merange 64 --subme 11 --trellis 2 --partitions all --no-dct-decimate --input-range pc --range pc --tcfile-in ".\temp\times.txt" -o ".\temp\video.mkv" --colormatrix smpte170m --output-csp i444 --demuxer y4m - :: Muxing :: ".\programs\mkvmerge" -o ".\output\encode.mkv" --timecodes -1:".\temp\times.txt" ".\temp\video.mkv" ".\temp\audio.opus" if "%EncodeChoice%"=="1" goto Defaults if [%2]==[1] goto Defaults : 512kb :: Audio :: ".\programs\avs2pipemod" -wav encode.avs | ".\programs\qaac64" -v 0 --he -q 2 --delay -5187s --threading --no-smart-padding - -o ".\temp\audio.mp4" echo ------------------------------- echo Encoding Archive 512kb stream echo ------------------------------- echo. :: Video :: ".\programs\replacetext" "encode.avs" "pass = 2" "pass = 0" ".\programs\replacetext" "encode.avs" "i444 = true" "i444 = false" ".\programs\avs2pipemod" -y4mp encode.avs | ".\programs\x264_x64" --threads auto --crf 20 --keyint 600 --ref 16 --no-fast-pskip --bframes 16 --b-adapt 2 --direct auto --me tesa --merange 64 --subme 11 --trellis 2 --partitions all --no-dct-decimate --range tv --input-range tv --colormatrix smpte170m -o ".\temp\video_512kb.h264" --demuxer y4m - :: Muxing :: for /f "tokens=2" %%i in ('%~dp0programs\avs2pipemod -info %~dp0encode.avs ^|find "fps"') do (set fps=%%i) for /f %%k in ('%~dp0programs\div %fps%') do (set double=%%k) ".\programs\mp4box_x64" -hint -add ".\temp\video_512kb.h264":fps=%double% -add ".\temp\audio.mp4" -new ".\output\encode_512kb.mp4" goto Defaults : ExtraHQ :: Extra 10bit444 :: :: Audio :: ".\programs\avs2pipemod" -wav encode.avs | ".\programs\opusenc" --bitrate 64 - ".\temp\audio_extra.opus" echo. echo ---------------------- echo Generating timecodes echo ---------------------- echo. :: Timecodes :: ".\programs\replacetext" "encode.avs" "pass = 0" "pass = 1" ".\programs\avs2pipemod" -benchmark encode.avs ".\programs\replacetext" "encode.avs" "pass = 1" "pass = 2" echo. echo -------------------------------- echo Encoding ExtraHQ downloadable echo -------------------------------- echo. :: Video :: ".\programs\replacetext" "encode.avs" "i444 = false" "i444 = true" ".\programs\avs2pipemod" -y4mp encode.avs | ".\programs\x264-10_x64" --threads auto --sar "%VAR%" --crf 20 --keyint 600 --preset veryslow --input-range pc --range pc --tcfile-in ".\temp\times.txt" -o ".\temp\video_extra.mkv" --colormatrix smpte170m --output-csp i444 --demuxer y4m - :: Muxing :: ".\programs\mkvmerge" -o ".\output\encode_extra.mkv" --timecodes -1:".\temp\times.txt" ".\temp\video_extra.mkv" ".\temp\audio_extra.opus" :: Extra 512kb :: :: Audio :: ".\programs\avs2pipemod" -wav encode.avs | ".\programs\sox" -t wav - -t wav - trim 4672s | ".\programs\neroAacEnc" -q 0.25 -if - -of ".\temp\audio_extra.mp4" echo ------------------------------- echo Encoding ExtraHQ stream echo ------------------------------- echo. :: Video :: ".\programs\replacetext" "encode.avs" "pass = 2" "pass = 0" ".\programs\replacetext" "encode.avs" "i444 = true" "i444 = false" ".\programs\avs2pipemod" -y4mp encode.avs | ".\programs\x264_x64" --threads auto --crf 20 --keyint 600 --preset veryslow --range tv --input-range tv --colormatrix smpte170m -o ".\temp\video_512kb_extra.h264" --demuxer y4m - :: Muxing :: for /f "tokens=2" %%i in ('%~dp0programs\avs2pipemod -info %~dp0encode.avs ^|find "fps"') do (set fps=%%i) for /f %%k in ('%~dp0programs\div %fps%') do (set double=%%k) ".\programs\mp4box_x64" -hint -add ".\temp\video_512kb_extra.h264":fps=%double% -add ".\temp\audio_extra.mp4" -new ".\output\encode_512kb_extra.mp4" : Defaults ".\programs\replacetext" "encode.avs" "pass = 1" "pass = 0" ".\programs\replacetext" "encode.avs" "pass = 2" "pass = 0" ".\programs\replacetext" "encode.avs" "i444 = true" "i444 = false" ".\programs\replacetext" "encode.avs" "hd = true" "hd = false" ".\programs\replacetext" "encode.avs" "vb = true" "vb = false"
EDIT: Here's another update that expands upon the aspect ratio choices, both at the command-line and in the prompts within the batch file. I haven't done any actual encodes with these changes yet. Replace the corresponding code from above with these linesDownload global.bat
Language: batch

echo ----------------------- echo Hybrid Encoding Batch echo ----------------------- echo. echo Command-line arguments: global.bat ^<arc^> ^<enc_opt^> echo ^<arc^> Aspect ratio? 1-3 or width:height echo ^<enc_opt^> Encode option? 1-5 echo. if [%1]==[] goto SAR OPTIONS if [%1]==[1] goto handheld sar if [%1]==[2] ( set ar_w=4 set ar_h=3 goto TV sar ) if [%1]==[3] ( set ar_w=16 set ar_h=9 goto TV sar ) set aspect_ratio=%1 goto parse_ar :SAR OPTIONS echo Aspect ratio options: echo. echo Press 1 for 1:1 echo Press 2 for 4:3 echo Press 3 for 16:9 echo Press 4 to enter your own echo. set /p ANSWER=Choice? if "%ANSWER%"=="1" goto handheld sar if "%ANSWER%"=="2" ( set ar_w=4 set ar_h=3 goto TV sar ) if "%ANSWER%"=="3" ( set ar_w=16 set ar_h=9 goto TV sar ) if "%ANSWER%"=="4" goto get_ar echo I'm not kidding! goto SAR OPTIONS : get_ar set ar_w= set ar_h= set /p aspect_ratio=Enter aspect ratio in the format width:height : parse_ar for /f "tokens=1 delims=:" %%g in ('echo %aspect_ratio%') do (set /a "ar_w=%%g") for /f "tokens=2 delims=:" %%g in ('echo %aspect_ratio%') do (set /a "ar_h=%%g") if [%ar_w%]==[] goto get_ar if [%ar_h%]==[] goto get_ar if %ar_w% leq 0 goto get_ar if %ar_h% leq 0 goto get_ar goto TV Sar : TV sar for /f "tokens=2 skip=2 delims== " %%G in ('find "waspect = " "%~dp0encode.avs"') do (set current_waspect=%%G) ".\programs\replacetext" "encode.avs" "waspect = %current_waspect%" "waspect = %ar_w%" for /f "tokens=2 skip=2 delims== " %%G in ('find "haspect = " "%~dp0encode.avs"') do (set current_haspect=%%G) ".\programs\replacetext" "encode.avs" "haspect = %current_haspect%" "haspect = %ar_h%") ".\programs\replacetext" "encode.avs" "handheld = true" "handheld = false" ".\programs\replacetext" "encode.avs" "pass = 0" "pass = 1" ".\programs\avs2pipemod" -info encode.avs > ".\temp\info.txt" for /f "tokens=2" %%G in ('FIND "width" "%~dp0temp\info.txt"') do (set width=%%G) for /f "tokens=2" %%G in ('FIND "height" "%~dp0temp\info.txt"') do (set height=%%G) set /a "SAR_w=%ar_w% * %height%" set /a "SAR_h=%ar_h% * %width%" set VAR=%SAR_w%:%SAR_h% ".\programs\replacetext" "encode.avs" "pass = 1" "pass = 0" goto ENCODE OPTIONS
Current Projects: TAS: Wizards & Warriors III.
Joined: 10/14/2013
Posts: 335
Location: Australia
We currently use avs2pipemod, but both ffmpeg and x264 support direct .avs script input. ffmpeg can pipe to x264 or encode on it's own (allowing the use of other formats, such as VP9) and removing avs2pipemod from the chain will get us closer to having a package that can be entirely 64-bit. Here's an example of using ffmpeg to pipe a script to an external application:
".\programs\ffmpeg_x64" -i ".\%~n1.avs" -vn -f wav - | ".\programs\flac_x64" - --best -o ".\%~n1.flac"
I'm not as active as I once was, but I can be reached here if I should be needed.