Post subject: Gens splitted Encode
Player (96)
Joined: 12/12/2013
Posts: 376
Location: Russia
There is warning:
When Gens splits videos at 2GB, a video frame is lost at each split. There is no correct way to fix this, other than to use a lossless codec which compresses well enough to avoid making the split in the first place.
at page: http://tasvideos.org/EncodingGuide/VideoDumping.html#Gens All information below is for gens-rerecording. I was encoding 10000 frames of several movies, each avi was split into approximately 50 parts. From my tests, it turns out that nothing is lost, if you have turned off FrameSkip and you have CleanAVI option turned on. Issue comes from different moments of time when sound and image is coded into avi. All data is stored. Audio of last frame may be placed in next avi, thus having bad effect for some muxers that you'll use during concatenation. For example, you're using ffmpeg concat demuxer. You have file qwe.txt with content:
file 'g:\dedede\Demolition Man (UE) [!].avi'
file 'g:\dedede\Demolition Man (UE) [!]002.avi'
file 'g:\dedede\Demolition Man (UE) [!]003.avi'
...
and then you use ffmpeg -f concat -i qwe.txt ... if you encode both video and audio, ffmpeg will try to sync all stuff and it will bend audio to match video. but if you extract all audio like this:
ffmpeg -i "Demolition Man (UE) [!].avi" 001.wav
ffmpeg -i "Demolition Man (UE) [!]002.avi" 002.wav
...
and then concatenate all audio using concat demuxer file:
file 001.wav
file 002.wav
file 003.wav
...
then encode video and audio separately and mux -> you'll get correct encode. this is ugly approach. there is better. just use same qwe.txt with all avi to encode whole video with no sound using concat demuxer, then use same qwe.txt with all avi to encode whole sound without video using concat demuxer and then mux it. last step is ultra fast. I was using ffmpeg-20180418-223f3df-win64-static other way is to use avisynth:
avisource("Demolition Man (UE) [!].avi")avisource("Demolition Man (UE) [!].avi")+avisource("Demolition Man (UE) [!]002.avi")+avisource("Demolition Man (UE) [!]003.avi")...
it will work fine. Now, appendix: in old gens rerecording like gens-rerecording 11, if you have frameskip, you'll have not-updated frames in encode. For example for frameskip = 8 you'll have 8 identical frames each 8 frames. In other words, each skipped frame will be duplicate of previous non-skipped frame. But if you turn on CleanAVI option, it may fix it. Also funny note, that encode works well even with latency-compensation and sonic tas tools while they draw collision overlay :o
Dimon12321
He/Him
Active player (478)
Joined: 4/5/2014
Posts: 1120
Location: Ukraine
Never liked splitted encodes. Who needs them? You have to spend more time on joining them afterwards because noone will like a movie that stops in the heat of the game. Oh, nevermind, nice work ;-)
TASing is like making a film: only the best takes are shown in the final movie.
Player (96)
Joined: 12/12/2013
Posts: 376
Location: Russia
Dimon12321 wrote:
Never liked splitted encodes. Who needs them?
Splitted encodes are inevitable if you have long run. Or if you have big resolution. Gens never had big resolution, but I'm planning to do atlas encodes with it so I had to investigate bugs involved.
Spikestuff
They/Them
Editor, Expert player, Publisher (2254)
Joined: 10/12/2011
Posts: 6324
Location: The land down under.
Fun fact. At every split the audio/video should progressively desync. And a suggestion to this, there's a very obscure lossless codec that exists. Ut Video. Crazy Amounts of Colours not Big Resolution for Genesis that is (just letting you know).
WebNations/Sabih wrote:
+fsvgm777 never censoring anything.
Disables Comments and Ratings for the YouTube account. These colours are pretty neato, and also these.
Site Admin, Skilled player (1234)
Joined: 4/17/2010
Posts: 11251
Location: RU
Finally someone has researched it! The trick with avisynth command here is that it splices video and audio independently and then muxes them. + means UnalignedSplice() which we need here. If we do ++, it's AlignedSplice() and it splices segments preserving the gaps in audio and video. http://avisynth.nl/index.php/Splice
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.