Post subject: What's wrong with my SD encodes?
GabCM
He/Him
Joined: 5/5/2009
Posts: 901
Location: QC, Canada
I see people can't read my SD encodes. I was simply using the method showed in sgrunt's encoding guide. Here are my AviSynth and my batch scripts. That's what I always use for my SD encodes. Can someone tell me what's wrong with that? EDIT : I'm using the Camstudio Lossless Codec. AviSynth Step 1
framerate = 60
framestdebut = 662

titrejeu = """Bonk's Adventure "any%""""
auteur = "Jerfo"
temps = "24:03.63"
rerecords = "8203"

tailletexte = 16

a = AVISource("movie.avi").ConvertToRGB24()
b = ImageSource(file="logo.png", start=0, end=119, fps=a.FrameRate).ConvertToRGB24()
c = BlankClip(b, audio_rate=44100, channels=2)
d = AudioDub(b, c).Lanczos4Resize(c.width, c.height).AssumeFPS(a.FrameRateNumerator, a.FrameRateDenominator)
last = d + a
Subtitle(titrejeu + "\nPlayed by " + auteur + "\nPlaying time: " + temps + "\nRerecord count: " + rerecords, y=0, align=8, first_frame=framestdebut, last_frame=(framestdebut + (5 * framerate) - 1), size=tailletexte, font="TF2 Secondary", text_color=$30FFFFFF, halo_color=$00000000, lsp=1)
Subtitle("This is a tool-assisted recording.\nFor details, visit http://TASVideos.org/", y=0, align=8, first_frame=(framestdebut + (5 * framerate)), last_frame=(framestdebut + (2 *(5 * framerate)) - 1), size=tailletexte, font="TF2 Secondary", text_color=$30FFFFFF, halo_color=$00000000, lsp=1)
ConvertToYV24(chromaresample="point")
ConvertToYV12(chromaresample="lanczos4")
DupMC(log="dup.txt")
AviSynth Step 2
framerate = 60
framestdebut = 662

titrejeu = """Bonk's Adventure "any%""""
auteur = "Jerfo"
temps = "24:03.63"
rerecords = "8203"

tailletexte = 16

a = AVISource("movie.avi").ConvertToRGB24()
b = ImageSource(file="logo.png", start=0, end=119, fps=a.FrameRate).ConvertToRGB24()
c = BlankClip(b, audio_rate=44100, channels=2)
d = AudioDub(b, c).Lanczos4Resize(c.width, c.height).AssumeFPS(a.FrameRateNumerator, a.FrameRateDenominator)
last = d + a
Subtitle(titrejeu + "\nPlayed by " + auteur + "\nPlaying time: " + temps + "\nRerecord count: " + rerecords, y=0, align=8, first_frame=framestdebut, last_frame=(framestdebut + (5 * framerate) - 1), size=tailletexte, font="TF2 Secondary", text_color=$30FFFFFF, halo_color=$00000000, lsp=1)
Subtitle("This is a tool-assisted recording.\nFor details, visit http://TASVideos.org/", y=0, align=8, first_frame=(framestdebut + (5 * framerate)), last_frame=(framestdebut + (2 *(5 * framerate)) - 1), size=tailletexte, font="TF2 Secondary", text_color=$30FFFFFF, halo_color=$00000000, lsp=1)
ConvertToYV24(chromaresample="point")
ConvertToYV12(chromaresample="lanczos4")
DeDup(threshold=0.00001, trigger2=100, show=false, dec=true, maxcopies=20, maxdrops=20, log="dup.txt", times="times.txt")
Batch script to encode
start /wait oggenc2 -q 1 encoded.wav
echo Trame sonore de la version SD faite!
start /wait x264.exe --crf 0 --keyint 999999 --fullrange on -o encoded.mp4 sdencode.avs
echo Passe 1 de la trame vidéo de la version SD faite!
start /wait x264.exe --crf 20 --keyint 600 --ref 16 --no-fast-pskip --bframes 16 --b-adapt 2 --direct auto --me tesa --merange 64 --subme 10 --trellis 2 --partitions all --fullrange on --rc-lookahead 250 --no-dct-decimate -o encoded.mp4 sdencode2.avs
echo Trame vidéo de la version SD faite!
rem Utiliser --me tesa au lieu de --me uhm si ça se passe sur un ordinateur puissant.
start /wait mkvmerge --timecodes 1:times.txt encoded.mp4 encoded.ogg -o bonksadventure-anypercent-tas-jerfo.mkv
echo Version SD faite!
(Is me --tesa the problem or what?)
Joined: 11/4/2007
Posts: 1772
Location: Australia, Victoria
I still personally think it's the use of AviSynth's DeDup.
GabCM
He/Him
Joined: 5/5/2009
Posts: 901
Location: QC, Canada
Flygon wrote:
I still personally think it's the use of AviSynth's DeDup.
Aktan's telling me that's not the problem, but he doesn't know what it is. That's weird.
GabCM
He/Him
Joined: 5/5/2009
Posts: 901
Location: QC, Canada
Well, Aktan gave two ways to fix this problem. First, I tried to use this to fix the video track.
MP4Box -nhml 1 encoded.mp4
MP4Box -add encoded_track1.nhml -new encoded.mp4
That improved my encode a lot, but it's still not perfect. Then, I tried to use x264 to encode the video track in an MKV file (instead of MP4). It made the whole thing worse. So, I seriously need help. Until the problem's solved, I won't do any SD encodes. I declare these SD encodes (I did with this DeDup technique) now invalid, which are: Arcade Bionic Commando in 05:48.1 by Mukki SGB Daffy Duck - The Marvin Missions in 01:58.07 by MUGG (The HD encode for this one is fine) Arcade The Simpsons (World) "4-player" in 13:37.73 by adelikat and K. Thomson (DarkKobold) SegaCD The Terminator (USA) in 13:20.67 by adelikat & Cardboard Those are the published movies with the bad encodes. Now, for the pending submissions, these invalid encodes are: SNES 7th Saga, The "any%" in 1:50:17.43 by Kirkq and Nitrodon PCE Bonk's Adventure "any%" in 24:03.63 by Jerfo SNES Earthbound in 30:42.12 by pirohiko & mugg DS Spider-Man 2 in 14:20.21 by adelikat Genesis Tails in Sonic The Hedgehog in 14:13.7 by marzojr (Good thing I didn't post this encode.) If anyone wants to encode those in SD, it's fine, but if my encoding problem's solved, I might redo some of these encodes. I will post in the submission's corresponding forum thread if I do it.
Former player
Joined: 2/19/2007
Posts: 424
Location: UK
You didn't say exactly how they don't work, but I tried one of your encodes, and it looked fine to me with both mplayer and vlc. I also had an old version of mplayer at hand, and that one failed straight away, complaining about missing video frames. So it sounds like this is an issue with missing support for variable frame rate in older players. But how many people does this really affect?
GabCM
He/Him
Joined: 5/5/2009
Posts: 901
Location: QC, Canada
When I'll find out a way to encode properly, I will at least reencode unpublished movies. Then, I may redo those published movies, I'll think about it.
Joined: 11/4/2007
Posts: 1772
Location: Australia, Victoria
I'm beginning to think it's just a problem with peoples players. It's worth asking them if their players are up to date or not.
GabCM
He/Him
Joined: 5/5/2009
Posts: 901
Location: QC, Canada
Flygon wrote:
I'm beginning to think it's just a problem with peoples players.
If it's the case, I will simply go back the method I've always used... I hope. Maybe if I update my own VLC, it would read my encodes properly. Gotta check that. EDIT : The latest VLC still can't take my encodes properly. Maybe VLC hates DeDuped MKVs. That's why I'm trying to make DeDuped MP4s using Aktan's NHMLTransform.
Joined: 11/4/2007
Posts: 1772
Location: Australia, Victoria
Odd. Your encodes work perfectly in my VLC... if anything, it's MP4s that are likely to break my machine!
GabCM
He/Him
Joined: 5/5/2009
Posts: 901
Location: QC, Canada
Flygon wrote:
Odd. Your encodes work perfectly in my VLC...
You serious?! Then, we have to ask members to update their video player before they try to read my encodes! Gotta try with MPlayer. EDIT: You're kidding me, right? It works flawlessly with the latest MPlayer!
Publisher
Joined: 4/23/2009
Posts: 1283
I don't think it does, as I have the latest VLC and the MKVs indeed doesn't work. MPlayer does seem to work though. Edit: It's a bit interesting that you found MPlayer working fine surprising, as I told you about it on IRC when we were trying to troubleshoot this. Ah well.
GabCM
He/Him
Joined: 5/5/2009
Posts: 901
Location: QC, Canada
Anyway, I will be using another encoding methode and I'll make MP4s. I will reencode all those submissions I've mentionned above + that Kirby's Dream Course TAS + that Shining Soul II TAS. Thanks to Flygon for suggesting me this method.
Publisher
Joined: 4/23/2009
Posts: 1283
I must mention that method does have some problems, though minor. 1. It may drop non-duplicate frames. While most of the time this isn't noticeable, it does happen and sometimes is noticeable, as confirmed by Grunt and I. 2. It takes slightly more CPU/GPU power to decode. This is due to the way direct264 does VFR MP4s. direct264 doubles the framerate so it can insert P-frames and weighted B-frames in between "original" frames to make the decoding order correct. Edit: While Flygon is helpful a lot of the times, it does irk me when he becomes stubborn due to whatever reason. From my observation, he refuses to acknowledge that this is a problem with direct264 despite both Grunt and I saying otherwise. He also dislikes Avisynth's Dedup, due to it being more complex to do than direct264 (which indeed is true). Lastly, his dislike for MP4s is for the same reason; AAC encoding is more complex than OGG. Again, this is my observation.
GabCM
He/Him
Joined: 5/5/2009
Posts: 901
Location: QC, Canada
Aktan wrote:
I must mention that method does have some problems, though minor. 1. It may drop non-duplicate frames. While most of the time this isn't noticeable, it does happen and sometimes is noticeable, as confirmed by Grunt and I. 2. It takes slightly more CPU/GPU power to decode. This is due to the way direct264 does VFR MP4s. direct264 doubles the framerate so it can insert P-frames and weighted B-frames in between "original" frames to make the decoding order correct. Edit: While Flygon is helpful a lot of the times, it does irk me when he becomes stubborn due to whatever reason. From my observation, he refuses to acknowledge that this is a problem with direct264 despite both Grunt and I saying otherwise. He also dislikes Avisynth's Dedup, due to it being more complex to do than direct264 (which indeed is true). Lastly, his dislike for MP4s is for the same reason; AAC encoding is more complex than OGG. Again, this is my observation.
I'll remember that, but I don't notice any difference in encoding speed between AviSynth's DeDup and direct264's deldup.
Publisher
Joined: 4/23/2009
Posts: 1283
Mister Epic wrote:
I'll remember that, but I don't notice any difference in encoding speed between AviSynth's DeDup and direct264's deldup.
When I say more complex, I'm not talking in encoding speed, but instead in steps an encoder needs to do (basically to be blunt, I'm calling Flygon a bit lazy).
Joined: 11/4/2007
Posts: 1772
Location: Australia, Victoria
DeDup purely irks me simply because it seems to have more compatibility issues. That is all.
Banned User, Former player
Joined: 5/22/2010
Posts: 80
Location: WAR TOWN, Georgia (USA)
It's kinda strange because my VLC is up to date and it plays MP4's more smoothly than MKV's and AVI's. I'm using Windows 7, but would that matter?
Do I look like someone who really cares what God thinks?! "GI Joe: The Atlantis Factor" - May be improved in the future.
Publisher
Joined: 4/23/2009
Posts: 1283
Flygon wrote:
DeDup purely irks me simply because it seems to have more compatibility issues. That is all.
But it doesn't. You only stubbornly think it does. As C0DE RED even pointed out, MP4s plays more smoothly than MKVs.
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
Wouldn't that depend on the codec?
Publisher
Joined: 4/23/2009
Posts: 1283
creaothceann wrote:
Wouldn't that depend on the codec?
It would normally, but practically all of our encodes here on TASVideos are now in H.264. So, basically we are talking about H.264 video.