Reply 100 of 106, by theelf
- Rank
- Oldbie
SSTV2 wrote on Yesterday, 01:36:This is awesome! You should definitely open a new thread specifically just for this video converter/player so that it doesn't ge […]
This is awesome! You should definitely open a new thread specifically just for this video converter/player so that it doesn't get lost in the pages of this thread.
I tested conversion of four videos in total and noticed that converter tends to mess up color palette. Out of four different videos, only one converted properly. One video turned out grayscale, other had light brown/red colors replaced with white and last video didn't even convert into a playable file, not sure why, but its palette file turned out entirely black.
Video that didn't convert is the same one that I attached in my last post of this thread, interestingly enough, neither original MP4 file, nor raw AVI, nor compressed AVI file converted.
A few observations:
-The image quality of the converted file is good, but the output file also takes up a lot of space. A 66s video at 320x200 res. takes up 20MB of hard disk space, at 160x120 res. it takes up 7MB (this is the video that turned out grayscale), for reference, the same video converted using Aviedit and MS Video 1 compressor at 75% quality - takes up only 3.2MB at 12FPS, though its quality is crap in comparison 😀
-Video player won't play a video if PC has no sound card installed. It would be nice to have an option that would omit sound track entirely and allow player to run this way.
-Converter allows custom resolution selection, but no option to change frame rate, thus some videos turn out way too jerky/uneven at 10FPS, it would be nice to have 12, 12.5 and 15FPS options, so that most commonly used video frame rates could be halved.
-It would be great to have more 4:3 aspect ratio resolution options among the existing ones, such as 224x168, 256x192 and 280x208.
-Videos does not play under DOSBox, which complicates testing.
Regarding the performance - I didn't notice any slowdowns running 160x120 videos on a 286-16 MHz machine, one of the tested video's playback at 320x200 res. turned out way too jerky by default, mainly because it was converted from 30 down to 10FPS, so I couldn't tell whether it lagged or not, but the benchmark results were as follows:
=== ANALISIS Y RECOMENDACION (basado en mediciones reales) ===Presupuesto por frame a 12.5fps: 80000 us- Full-frame video (320x200=64000 bytes): 16386.1 us (20.5% del frame)- Llenado de audio (882 bytes, rep movsb): 238.9 us (0.3% del frame)- Margen reservado disco/overhead: 20000 us (25.0% del frame)- TOTAL usado (peor caso, 320x200): 36625.0 us (45.8% del frame)Costo por bloque cambiado: 22.89 us/bloque>> En tu 286, el maximo cambio de bloques antes de que>> convenga mandar el frame completo es: 715 bloquesNot sure how to read them to be honest, does it mean that this machine covers only 20.5% of a full frame at 320x200?
Hi, thaanks for testing!! no, this bench means your computer need 20.5% of cpu to decode video and send to vgaa, 0.3% for pcm audio, for 10fps. Of course then you will have overhead of hdd/cd/etc then it will depend your media, 20+%
Your PC is pretty fast, you can decode 320x200 - 10fps at 40-50% of your cpu, less if your media is fast
About palette, is not my converter, is ffmpeg tht made the work, try for example this commands in ffmpeg
ffmpeg -i input.avi -vf scale=320:200:flags=lanczos,palettegen" -y palette.png ffmpeg -i palette.png -f rawvideo -pix_fmt rgb24 […]
ffmpeg -i input.avi -vf scale=320:200:flags=lanczos,palettegen" -y palette.png
ffmpeg -i palette.png -f rawvideo -pix_fmt rgb24 -y palette.raw
ffmpeg -i input.avi -f u8 -acodec pcm_u8 -ac 1 -ar 11000 -y audio.pcmffmpeg -i input.avi -i palette.png -filter_complex "[0:v]curves=all='0/0 0.0784/0 0.9216/1 1/1',fps=10,scale=320:200:flags=lanczos[v];[v][1:v]paletteuse=dither=bayer:bayer_scale=3" -pix_fmt pal8 -y frames\frame_%%05d.bmp
check the output, bmp, palette, etc
ffmpeg in my script, take care of everything exept compression. if you want my python script instead the exe, i can send in MP, but for now i dont waant to distribute
Anyways please share to me your videos info that fail
About size, a msvideo1 at 75% like you said is bad quality, very crapy, is not what i want in my videos. If you want to reduce size Threshold and Colorlimit is only way, Threshold check if one 8x8 block is XX% similar to the one in last frame to no update, less is more compression much blocky, and color limit tell the compressor how different colors can make a block change, for example, in one frme you have a black block, and next you haave same block but one pixel in middle in white. With a Threshold of less of 90% for sure this block will be eliminated and just not draw, but in a scene of alien in space this means maybe a lot of starts will dissapear! jeje in this case the Colorlimit will stop the compressor and check "hey the block is 95% similar, but white-black is very strong difference, not repeat". Colorlimit less number more strict
The good side of use less resolution is that you will have of course less 8x8 blocks to manage, the bad side is that compression is not linear, a 160x100 video, for example, will not be 1/4 of a 320x200 video, because the 320x200 video have MUCH chances of duplicated 8x8 blocks. Not always less is more
160x120 or similar, the goal is not much disk space, but CPU, aa 286-8mhz for sure will be more happy with this size of video than 320x200
Whe are in 2026, thank good, no more space limits, I have aa 256GB usb drive in my 286 for cdrom emulation,and two 16GB CF internal cards, but CPU and video card same in 90s, this is what i care
About fps, 10fps for me look perfect fluid in most situations, are you sure your ffmpeg is doing goood job selecting frames? did you check the bmps? anyways, if your ffmpeg is working fine, maybe you have videos with too much motion, in this case, yes, 15 or even 20fps will be better
The problem is that i work in integer in my code, not div or muls, 12-15 fps will not work, maybe 20fps yes, but uff 20fps in aa 286.. maybe i will try
I was thinking to write a timer pit divisor, nd check if i can addapt the pit to the fps, for sure i can do 18.2 fps, i will test
thanks