VOGONS

Common searches


First post, by Grunt

User metadata
Rank Newbie
Rank
Newbie

Ok, so now I have video recorded directly from DOSBox. It is beautiful, crispy, colorful (as much as you can get from VGA palette), with integrated Fluidsynth MIDI, choppy as hell and I would like to share it.
Question: Where exactly?

Would you recommend any specific platform? I mean for streaming videos recorded directly from DOSBox? Or let me generalize the question: Do you know guys any internet platform suitable for this job? „Let's Play“, Game Walkthrough or Longplays of old games. 320x200 video resolution (or different resolutions whatsoever), bright 256 color palette, different framerates, etc.

  1. Youtube – first shot in mind, sure…; So first and foremost: NO! Hell NO!
    Let me give you a few reasons why not:
    • There is a need of account when I want to upload anything on Youtube. Do I have one? Sure. Am I willing to link my personal account with random stuff from DOSBox lying somewhere on internet? Absolutely no! I appreciate my anonymity on internet and I would like to maintain myself in this condition.
    • Technical reasons. Have you ever heard about pixel-perfect scaling? Do I need to use some patch or something? No reason to do so. Simply record thing as is (640x400 and 320x200, 24-bit RGB in my case) and let do the media player rescaling. With nearest-neighbor interpolation. --scale=oversample parameter for mpv. Combined with -fixed-vo to get perfect (and fast!) result even on full-screen. I've tried Youtube. Almost hour of chewing and processing and with this result:
      YouTubeQuality.png
      Filename
      YouTubeQuality.png
      File size
      176.36 KiB
      Views
      310 views
      File license
      Fair use/fair dealing exception
      YouTubeQuality2.png
      Filename
      YouTubeQuality2.png
      File size
      98.65 KiB
      Views
      310 views
      File license
      Fair use/fair dealing exception
      On given bitrate I'm able to get 4× better result with 5-10 minute x264 encoding on my laptop. Now I know exactly what „Youtube quality“ means. I can set bitrate, choose codec, strength of deblocking filter, encoding preset, container format, everything. What can I choose on Youtube?:
    • YUV422P, YUV444P, BGR24, RGB24 (libx264rgb), GRAY8, 10-bits? Completely different codec? Libopus? No? – No. Forget it. You'll get questions if is content suitable for kids, if I want to place age restrictions, I have to choose category, title picture, license, language, product placements. Why do I have to choose subtitles? What about commercials? You know what? Screw that! No Youtube, no problem.
  2. File sharing services (Megaupload, Hellshare, Mediafire, etc.)
    • Free ✔
    • Anonymous ✔
    • Codec or container of my choice ✔
    • No stupid questions ✔
    • No stupid restrictions ✔
    • No stupid commercials
    Ok, we have found one flaw. And frankly, it is better choice than YouTube by miles. And even though I'm not sharing anything illegal, I don't feel like it. Unfortunatley I'm not aware of any sharing service where I can stream content directly into browser before complete download. Do you know something guys? And how to embed it into a post? Advices appreciated.
  3. Animated GIF – You'd be surprised how good choice it is. Custom palette, effective coding. Just look at it:

    file.php?mode=view&id=65655

    For a short clip is surprisingly good choice. But
    • no sound
    • no stop button
    • no seeking
    • and definitely not suitable for game walkthrough, longplay or anything longer.
    Bummer.

So…

And now technical questions:

  • Pixel format? Yuv420p, Yuv444p, RGB24? Or can I somehow recode ZMBV diretly into PAL8 aka 8-bit palette? And stream it?
  • Targer bitrate? 0.5 Mbps? 1Mbps? Or more?
  • Deblocking? Yes or no?
  • Can I fit chunks with different resolutions into one stream or file? DOSBox solution is simple and witting but what should I do with multiple files?

Reply 1 of 8, by Kisai

User metadata
Rank Member
Rank
Member
Grunt wrote on 2019-12-23, 20:29:

Ok, so now I have video recorded directly from DOSBox. It is beautiful, crispy, colorful (as much as you can get from VGA palette), with integrated Fluidsynth MIDI, choppy as hell and I would like to share it.
Question: Where exactly?

Would you recommend any specific platform?

Youtube works fine, but if you want high quality you kinda have to feed Youtube a pre-sanitized version of the video. If you want absolute perfect pixel scale you need to turn the 4:3 320x200 VGA into 2880x2160 which is a 9x rescale from the source resolution post DAR.

ffmpeg -i "%1" -sws_flags neighbor+full_chroma_inp -vf scale=-1:2160 -g 30 -coder 1 -bf 2 -flags +cgop -vcodec libx264 -x264opts ref=5:opencl:crf=22.0 -pix_fmt yuv420p -profile:v high -level 52 -r 60 -movflags faststart -codec:a aac -b:a 512k -f mp4 %1.mp4

This is obviously overkill, since a 720p video is usually enough to get youtube to not turn it into mush, but if you want to keep the nearest-neighbor scaling, you need to make sure it keeps it even when viewing it at the highest resolution. Unfortunately there is no way to upload an 8K video to youtube using h264 (it's not supposed to take a 4Kp60 video in it either as that maxes out level 5.2,) and youtube won't accept a 4320p video in anything other than h265.

Which comes back to what is the right resolution to use to have the least amount of artificating? If you're absolutely trying to retain 4:3 with 320x240, then an 9x scale to 4K is perfect, but for 320x200, it's slightly not, and to date, I had been using a similar setting but with 1080p, but that still has some minor artifacting.

So if you're going to make any edits to the input video (eg in Premiere Pro) then you're better off just using the 320x200 input video if you want to correct the aspect ratio in the software, or a hybrid approach where you make a "lossless" mp4 by setting CRF to 0, and then do your editing. ZMBV's codec allows for small videos, but editing it can't be done without recompressing it.

Reply 2 of 8, by Grunt

User metadata
Rank Newbie
Rank
Newbie
Kisai wrote:

Youtube works fine, but if you want high quality you kinda have to feed Youtube a pre-sanitized version of the video. If you want absolute perfect pixel scale you need to turn the 4:3 320x200 VGA into 2880x2160 which is a 9x rescale from the source resolution post DAR.

Absolutely no way. I've acctualy tried to do testing and I thing 4× oversampling (1280x800) with NNI is just fine. Unfortunately I have to do it before upload. So codec of choice is x264 or x265 lossless. With result around 900MB for short clip. And upload it. This is dumb as I live on unreliable Wi-Fi. After upload there is absolutley no control over bitrate, color encoding is yuv420p fixed, audio is fixed. I don't like it.

Kisai wrote:

This is obviously overkill, since a 720p video is usually enough to get youtube to not turn it into mush

Not true. As bonus, non-static scenery is turned into mush. Check your PM box.

Kisai wrote:

Which comes back to what is the right resolution to use to have the least amount of artificating? If you're absolutely trying to retain 4:3 with 320x240

Simple answer: 320x200, 320x240, 640x400 and so on, with suitable scaling filter. But in media player on client side.

Kisai wrote:

So if you're going to make any edits to the input video (eg in Premiere Pro)

No. Nothing else than just pure ffmpeg.

Last edited by Grunt on 2020-01-30, 19:08. Edited 1 time in total.

Reply 3 of 8, by ZellSF

User metadata
Rank Oldbie
Rank
Oldbie

I consider 1440p minimum for good quality on Youtube, 720 would be awful.

Obviously, native resolution would be adequate if the client player knew how to scale it, but that isn't happening (though it might be possible if you give up embedding).

Reply 5 of 8, by konc

User metadata
Rank Oldbie
Rank
Oldbie

About 2: create a dummy gmail and share it via google drive.
You get the benefits of #2 since you prefer it from YouTube, you get anonymity from the dummy email without any real data, you don't serve ads

Reply 6 of 8, by VileR

User metadata
Rank Oldbie
Rank
Oldbie
Grunt wrote on 2020-03-26, 18:32:

Ok and anything for H264/RGB? Youtube does not support H264/RGB.

I use ffmpeg's libx264rgb and yutube supports it nicely enough. libx264rgb with -crf 0 produces lossless RGB video.

ffmpeg -i "%1" -sws_flags neighbor+full_chroma_inp  -c:v libx264rgb -crf 0 [...other options...] %1.avi

If the final dimensions are NOT an integer multiple of the source resolution, you have to ensure gamma-correct scaling (make a 2.2 gamma adjustment before scaling, and the inverse after).
I tend to scale up using nearest-neighbor first, by say x8 or more, and then scale that *down* to an actual 4:3 resolution using bilinear filtering (and pad the result to 16:9) . Reason is, unless the viewer's monitor resolution is exactly that of the video, then youtube and/or the player will scale it down anyway - which negates the benefit of uploading a 100% integer-scaled video.

e.g. if targeting 4K (3840x2160) , I would maybe do something like:

:: 1. Scale  x12 (to 3840x2400) while setting gamma
ffmpeg -i input.avi -r 60 -sws_flags neighbor+full_chroma_inp -vf scale=iw*12:ih*12,lutrgb='r=gammaval(2.2):g=gammaval(2.2):b=gammaval(2.2)' -c:v libx264rgb -crf 0 phase1.avi
:: 2. Go to the largest 4:3 rectangle that fits in our target resolution (-> 3456x2160)
ffmpeg -i phase1.avi -sws_flags bilinear+full_chroma_inp -s 3456x2160 -c:v libx264rgb -crf 0 phase2.avi
:: 3. Correct gamma again and pad to 3840x2160
ffmpeg -i phase2.avi -filter_complex lutrgb='r=gammaval(0.454545):g=gammaval(0.454545):b=gammaval(0.454545)',pad=3840:2160:((3840-iw)/2):0:black -c:v libx264rgb -crf 0 final.avi

(Other options at your discretion)

web  /   blog   /   tube

Reply 7 of 8, by Grunt

User metadata
Rank Newbie
Rank
Newbie
konc wrote on 2020-03-26, 19:06:

via google drive.
You get the benefits of #2 since you prefer it from YouTube, you get anonymity from the dummy email without any real data, you don't serve ads

You know what is sick? That it actually works! Look.
file.php?mode=view&id=79585%5D
For some odd reason video is reprocessed into 360p/YUV420 but it is with YouTube controll and link for original which can be embedded as HTML5 video. As long as it is YUV420/YUV444p because HTML5 video doesn't support RGB mode.

  • Free ✔
  • Anonymous - yeah, more or less; just Google
  • Codec or container of my choice ✔ (more or less)
  • No stupid questions ✔
  • No stupid restrictions ✔
  • No stupid commercials ✔

I don't know what to say.


VileR: Thanks but simply no. Result has few gigs and I'm not gonna upload few gigabits of 320x200 video just because YouTube is stupid.

Attachments

  • mpv-shot0001.png
    Filename
    mpv-shot0001.png
    File size
    256.14 KiB
    Views
    70 views
    File license
    Fair use/fair dealing exception

Reply 8 of 8, by konc

User metadata
Rank Oldbie
Rank
Oldbie
Grunt wrote on 2020-03-27, 15:12:

...
I don't know what to say.

😄 Of course it does, I proposed it for a reason. Anyway what suits anyone I guess, but from your requirements this is what came to my mind