Publisher
Joined: 4/23/2009
Posts: 1283
nanogyth wrote:
Looking good. Archive.org asks for hinting on the 512kb encode. ( -hint on the mp4box line) http://archive.org/about/faqs.php#Movies Encoding Parameters MPEG-4 -- 512Kbps h.264 VBR 320x240 video with 64Kbps AAC audio. Hinted for streaming. Created with ffmpeg and mp4creator. You dropped the SelectOdd on ng_deblink, so the HD is coming out at 60fps. I would leave ng_deblink parameterless, which defaults to .67. 0.5 and 1.0 should really be saved for use with replace. Is the 512 suppose to use TV range? Do the "--input-range pc" parameters work correctly? I thought they were backwards or something.
About hinting, hmm, never noticed this, but since we are using pseudo HTTP-streaming, hinting is not required for it to work on our site. The range bug existed with RGB input, but even then I think the bug has been fixed.
Patryk1023
He/Him
Joined: 3/1/2011
Posts: 288
Location: Inside out house.
Well, I must to say that, because on IRC no one sees that. Link to Brandon's encoding setup died. Anyone will resend it?
<Nach> scrimpy is fretty with her sunglasses on I'm here. never visible.
Site Admin, Skilled player (1251)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Patryk1023 wrote:
Well, I must to say that, because on IRC no one sees that. Link to Brandon's encoding setup died. Anyone will resend it?
Is mine that bad?
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.
Patryk1023
He/Him
Joined: 3/1/2011
Posts: 288
Location: Inside out house.
feos wrote:
Patryk1023 wrote:
Well, I must to say that, because on IRC no one sees that. Link to Brandon's encoding setup died. Anyone will resend it?
Is mine that bad?
No, right now I'm using it. Only I get to use Brandon's setup...
<Nach> scrimpy is fretty with her sunglasses on I'm here. never visible.
joel96
He/Him
Joined: 12/27/2009
Posts: 9
The first lines of the instructions for the hybrid encode script mention the automated method, along with an archive that "contains all executionals, scripts and DLLs you are going to need," along with a link to the archive. The archive mentions that several other files are needed:
You will need to get some stuff yourself though: - Lossless codec - VirtualDub - AviSynth
Based on the forum threads on the topic, it seems that x264 and H264 are the preferred video codecs, and the preferred audio codec is ogg. I have installed ffdshow tryouts to C:\Program Files (x86)\ffdshow. Ffdshow video encoder/decoder configuration under the decoder tab listed in format H.264/AVC says that a supported format is x264, so I assume the codec has already been installed for use by the hybrid script and does not need to be downloaded again in this scenario. While it is apparently already enabled for use in my case, I'd like to know the right place to install it to if I need to reinstall again for any reason. I have AviSynth installed to C:\Program Files (x86)\AviSynth 2.5; ffdshow's multiple configuration utilities list AviSynth as an option, so I assume it is also installed in the location of ffdshow. Does AviSynth or "lossless codec" need to be placed in the same folder as the hybrid encoder archive? Which codec does "lossless codec" refer to? The next lines of the instructions for the hybrid encoder script say to "Unzip, put the AVI dump named "movie.avi" in a root folder." It might be that this is a placeholder name for files the user is to drop into the root folder, but usually those are named something indicative of it being a placeholder, like "examplemovie.avi". Otherwise, the archive does not contain any files named "movie.avi." The script might need the placeholder name altered by the user in order to run on the user's movie, but there is nothing in the instructions to confirm this theory. It's causing the error image linked at the end of this post. I have the archive placed in C:\Program Files (x86)\TASVideo Encoding\TASEncodingPackage. I placed the avi dump from DOSBox into the same folder. What location does "a root folder" refer to? http://img825.imageshack.us/img825/2159/sp3220121027233251.jpg
Site Admin, Skilled player (1251)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Why you omitted the second important link in the package download page? http://tasvideos.org/EncodingGuide/Requirements.html It gives links to Camstudio and Lagarith, lossless codecs one of which you need to install. Yeah, ENCODING script page misses the link to video DUMPING guide. I added those: http://tasvideos.org/EncodingGuide/VideoDumping.html http://tasvideos.org/EncodingGuide/Logo.html But why you didn't try reading the Encoding Guide that is the very irst link on the hybrid page? PS: don't post such images directly, link to them instead.
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.
Publisher
Joined: 4/23/2009
Posts: 1283
Hi joel96. Nice to see you are lurking less now =p. Anyway a couple of misconceptions I should fix for you. Indeed H.264 (x264) is the preferred video codec, but ogg is not the only preferred. Besides ogg, there is also AAC, which is also preferred. Next, while indeed ffdshow does decode H.264, it does not encode to it (unless you have an old version, in which I would say get a new version due to the outdated encoding to the H.264 part). The x264 executable is what encodes to H.264. As for Avisynth, ffdshow lists it as saying it can use it, but to use it you still need to install Avisynth, which you seem to have done. For lossless codecs, like all codecs, it really just needs to be registered in Windows to be usable, so the location of the lossless codec is not really important. Just as the location of ffdshow and Avisynth is not important. The location of x264 is important though. As for which lossless codecs, there are several which feos has kindly linked to. What the hybrid encoder script means is that you should rename your DOSBox AVI to movie.avi and place it in the same folder as where you ran the batch file. I'm guessing that would be "C:\Program Files (x86)\TASVideo Encoding\TASEncodingPackage\".
joel96
He/Him
Joined: 12/27/2009
Posts: 9
I was able to encode a video as soon as I had the information about renaming the user's video dump to movie.avi, but not in YUV 4:4:4, and not without several issues with running the programs and with nonlineardocumentation. I would like to be able to add an audio track on top of the original game audio, but based on what I've been reading it sounds like that would only require a rip, encode, and packaging of the audio with the video, mostly using VirtualDub (that research is still ongoing, but responses in this thread might provide some advice to make the learning process shorter). Step one in the Encoding Guide / Requirements gives a summary of the requirements for a logo. I created a .png at 1728x1080 resolution, which I thought was the target resolution of the end video, but for preset 4 need to be 2560x1600. The logo encoding page gives instructions on creating a video from the image; however, the logos in the archive package are simply images, so the instructions appear to pertain only to doing it from scratch and as a general standard. The encoding guide says to "Replace the logo;" in the context of the encoding package, there are two logo files, logo.png and hdlogo.png; I think the intended message of the instruction is to replace one or more of the logo files depending on the user's desired output quality. Step 3's Video Dumping page does not address DOSBox dumping or the page that outlines TASVideos' requirements for DOSBox recording. http://tasvideos.org/EncodingGuide/VideoDumping.html Step 4.2. mentions the feos AVISynth syntax highlighter http://code.google.com/p/feos-tas/downloads/detail?name=userDefineLang.xml. After getting it running the way it is supposed to (following instructions from Notepad++'s site, which are not mentioned in the Encoding Guide / Requirements), I closed out of Notepad++, started it back up, and encountered this error:
An exception occurred. Notepad++ cannot recover and must be shut down. The exception details are as follows: Code: 0xC0000005 Type: Access violation Exception address: 0x1006CB0D
After ending the notepad++ process from task manager, uninstalling version 5.9.3, installing 6.2, then pasting userDefineLang.xml into C:\Program Files (x86)\Notepad++\localization, choosing AVISynth from the language menu in notepad++, loading an .avs file, restarting notepad++, and loading an .avs file, I confirmed that the .xml would run without issue. After following Aktan's clarifications for running the TAS Encoder Package, I was able to encode a video twice, but with an error that does not seem to affect the encoder from completing an encode. The script encounters an error after aoTuV Beta 6.03 runs:
avs2pipemod[error]: Exception while processing ScriptEnvironment::ThrowError(). (encode.avs, line 174) Error: Not found RIFF WAVE header.
I ran global.bat twice, which resulted in successful encodes. After modifying the subtitles regarding tool-assisted speedruns to leave only the \n flags (because it does not apply to the genre of the videos I'm making), it encountered an error stating zlib1.dll is missing. I downloaded the file and placed it into C:\Windows\system, and then this sequence of errors appeared, after which it would close without pausing to display the error (I used GameCompanion to keep grabbing screenshots until the errors appeared):
avs [error]: Evaluate: System exception - Access Violation (encode.avs, line 201) x264 [error]: could not open input file 'encode.avs' mkvmerge v5.6.0 [...] built on May 27 [...] Error: The file './temp/video_youtube.mkv' has unknown type. Please have a look at the supported file types ('mkvmerge --list-types') and contact the author [...] if your file type is supported but not recognized properly.
After replacing the absent spots in the text with placeholder periods, the video encoded without errors other than the RIFF WAVE error. I deleted the placeholders and \n flags, and the video also encoded successfully. I ran preset 4. VLC tells me that it uses Planar YUV 4:2:0, which does not comply with the 4:4:4 standard, so unless VLC is giving incorrect media information, I need to know what to do next to enable YUV 4:4:4. One possible cause might be DeDup's implementation. sgrunt said "Our old standby of DeDup only supports YV12 and YUY2 input/output, which doesn't play nicely with our current projects involving YUV444." http://tasvideos.org/forum/viewtopic.php?t=12065 Step 4.2.* in the Encoding Guide / Requirements http://tasvideos.org/EncodingGuide/Requirements.html says that ExactDedup http://tasvideos.org/forum/viewtopic.php?t=12065 should be used due to the unspecified issues mentioned by sgrunt. feos gave a link to the .dll only http://code.google.com/p/feos-tas/downloads/detail?name=ExactDedup.dll; this file does not contain the "Further [documentation] available in the package" originally included by sgrunt. Based on the context discussing AVISynth, it sounds like it is to be placed in the AVISynth plugin folder included in the TAS encoder package (mine is located in C:\program files (x86)\TASVideo Encoding\TASEncodingPackage\programs\Applications\AviSynth plugins). AVISynth autoloads plugins at launch, so next time that global.bat runs, it should load ExactDedup.dll. I was unable to figure out how to launch AVISynth aside from my installation of ffmpeg independent of the one included with the TAS encoder package; the independent one includes a GUI/frontend for AVISynth, but based on the separate installation and location of the ExactDedup.dll file, it is not likely that the plugin is loaded in the package installation of AVISynth prior to running global.bat. sgrunt's next steps for enabling ExactDedup are as follows:
replace the DupMC call with an ExactDedup(firstpass = true) call; and replace the DeDup call with an ExactDedup(firstpass = false) call.
Based on the inclusion of text reading "DupMC," "DeDup," and "ExactDeDup," I think sgrunt is referring to encode.avs. encode.avs already makes calls to ExactDedup, so it is possible that the notes in encode.avs no longer apply and ExactDedup is already in use by the package; these calls to DupMC and DeDup within the encode.avs were references to the global.bat file's script, so no modification should happen to encode.avs:
# Batch sets a pass for downloadable/streaming encodes:
# 0: audio extraction / streaming (archive.org 512kb; AR correction);
# 1: DupMC (no AR correction);
# 2: DeDup (no AR correction).
pass = 0
global.bat does not have text reading "dupMC," "DeDup," or "ExactDedup" in the file.
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
joel96 wrote:
I would like to be able to add an audio track on top of the original game audio, but based on what I've been reading it sounds like that would only require a rip, encode, and packaging of the audio with the video, mostly using VirtualDub
If you want to replace the audio, you can do so with MKVmerge/MKVmergeGUI after encoding. If you want to mix the audio, you can do so with Avisynth, or extract the audio after you have the final timeline (e.g. via VirtualDub) and edit it in an audio editor.
Site Admin, Skilled player (1251)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Encoding Guide, speaking of encoding and muxing, is a few yearts old and has nothing to do with my package. Synthax highlighter is at all THE LEAST necessary thing, and it also has nothing to do with encoding package. Dedupping plugin IS included in my pack, and works perfectly as long as you provide logo and video. Replacing the audio track with something of another source than the original dump has nothing to do with TASVideos official encodes needs. Please ignore all you read in the Encoding Guide about encoding and muxing (dumping and creating a logo is still helpful). Try using all default settings of the package at first. Trim the video at frame ~2000 or so to make sure all 4 encodes process well. Placing AVI in a root folder of the package (...\TASEncodingPackage) is right. Logo resolution may be any. If you succeed to get correct encodes the default way, we may help adjusting the thing to your own needs. IRC is a good place to ask too.
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.
Publisher
Joined: 4/23/2009
Posts: 1283
I'm now curious. joel96 what is your main goal? To make TASVideo publishable encodes? If so, then you are on the right track. If this isn't so, then well it might be a bad idea to use the script at all. The point of the script was to make publishable encodes on TASVideos. Also to speed things up, it be preferred you get on IRC to get help from us.
Site Admin, Skilled player (1251)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
I'm going to rewrite the encoding manual, to cover everything from installing codecs to the publication routine. This could help to request for new publishers to handle zombies.
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, Experienced player (860)
Joined: 8/12/2008
Posts: 845
Location: Québec, Canada
feos wrote:
I'm going to rewrite the encoding manual, to cover everything from installing codecs to the publication routine. This could help to request for new publishers to handle zombies.
Great idea. Already like the encoding package you released, feos!
Site Admin, Skilled player (1251)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Wiki: EncodingGuide/PublicationManual The encoding package was also reuploaded. Try out with small vids to save on time.
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.
Player (66)
Joined: 4/21/2011
Posts: 232
if "%ANSWER%"=="y" "./programs\tvcman.exe" "./output/encode_youtube.mkv" todo yt:stretch=4:3,tasvideos < "./programs/ytdesc.txt"
You can just echo the todo instead of needing a file for it.
if "%ANSWER%"=="y" echo todo | "./programs\tvcman.exe" "./output/encode_youtube.mkv" todo yt:stretch=4:3,tasvideos
Joined: 1/1/2013
Posts: 27
hey, just got a question about encoding a dump from psxjin. can the encoding package be used for psxjin dumps as well? because when dumping a psxjin movie there are 2 files, video and audio and i think the package only encode movie files and no sound files. /
Player (66)
Joined: 4/21/2011
Posts: 232
You're using TASEncodingPackage? Make a file called movie.avs (change the file names to match psxjins output)
AudioDub(AviSource("000.avi"), WavSource("000.wav"))
Then edit encode.avs and change
AVISource("movie.avi").Trim(0,-0).ConvertToRGB32()
to
AVISource("movie.avs").Trim(0,-0).ConvertToRGB32()
P.S. Does the resolution not change? Encoding something like FF8 gets tricky because the resolution is constantly changing, making hundreds of files at a half dozen different resolutions.
Site Admin, Skilled player (1251)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
To stitch different resolution fragments, determine the biggest one (or better the one the gameplay is in) and resize each avisourced clip on import, then append them.
Language: avisynth

a1 = AVISource("1.avi").LancozResize(360,240) a2 = AVISource("2.avi").LancozResize(360,240) a3 = AVISource("3.avi").LancozResize(360,240) a4 = AVISource("4.avi").LancozResize(360,240) sound = WAVSource("audio.wav") last = a1 + a2 + a3 + a4 AudioDub(last, sound)
The very encoding script goes then
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.
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
For lots of files this will be better to copy&paste:
Language: avisynth

x = 360 y = 240 ( \ AVISource("00_01.avi").LancozResize(x, y) + \ AVISource("00_02.avi").LancozResize(x, y) + \ AVISource("00_03.avi").LancozResize(x, y) + \ AVISource("00_04.avi").LancozResize(x, y) \).AudioDub(WAVSource("audio.wav"))
("00_x" = parts of encode 0, "01" = encode 1, etc.) Alternatively it would be possible to find the least common multiple of each dimension, use PointResize to upscale to that resolution, then downscale with Biliniear/Lancoz.
Player (66)
Joined: 4/21/2011
Posts: 232
creaothceann wrote:
For lots of files this will be better to copy&paste:
The number of files is limited to ~50 by "video for windows". If you run into that you might need to concatenate the parts with similar dimensions together, then trim and splice it back together after loading. Did anyone have a tool for automating that, or a different method altogether?
res1 = AviSource("320x240.avi")
res2 = AviSource("368x240.avi").LancozResize(320,240)

s1 = res1.trim(0,1279)
s2 = res2.trim(0,2559)
s3 = res1.trim(1280,3200)
s4 = res2.trim(2560,6400)
...
video = s1 + s2 + s3 + s4...
creaothceann wrote:
Alternatively it would be possible to find the least common multiple of each dimension, use PointResize to upscale to that resolution, then downscale with Biliniear/Lancoz.
The youtube resize should be different from the others. But the encoding package doesn't have anything in place for dealing with that particular issue.
res1 = AviSource("320x240.avi").PointResize(2560,1920)
res2 = AviSource("368x240.avi").PointResize(2944,1920).BilinearResize(2560,1920)

s1 = res1.trim(0,1279)
s2 = res2.trim(0,2559)
s3 = res1.trim(1280,3200)
s4 = res2.trim(2560,6400)
...
video = s1 + s2 + s3 + s4...
You could pointresize to 7360 or 14720 as well, but that seems a bit of a snipe hunt.
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
nanogyth wrote:
The number of files is limited to ~50 by "video for windows".
Even with DSS2?
Player (66)
Joined: 4/21/2011
Posts: 232
creaothceann wrote:
nanogyth wrote:
The number of files is limited to ~50 by "video for windows".
Even with DSS2?
The AviSource limit is pretty well known, I'm not sure about other sources, but I'd be surprised if you could have an unlimited number of them open at once. With FF8 you're looking at a total of ~400 files. Grouping by resolution can potentially simplify some things, even if there wasn't a file limit.
Publisher
Joined: 4/23/2009
Posts: 1283
DSS2 is not using VfW, hence the DirectShowSource2. DirectShow technically doesn't have a limit, but Avisynth does have a memory limit =p. Usually, what I do is concat some files and make a bigger AVI file. Obviously this requires more space.
Joined: 1/1/2013
Posts: 27
maybe i am wrong but when resizing the movie later, wouldn't it be easier to dump to the gameplay resolution by stretching to window size instead of dumping into several resolutions by 11?
Publisher
Joined: 4/23/2009
Posts: 1283
Easier, yes, but you have less control on the resize method. The better resize methods are usually more CPU intensive and will be harder to do on fly. As an encoder, I would like to have the choice of what resize method.