C++ "ASCII" Video Player Demo - Bad Apple

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ก.ย. 2024
  • Source code: github.com/nat...
    I still need to implement audio support, I had to edit the music in for this video.
    I wrote a simple terminal video player using avformat, avcodec, avutil, swscale and pure C++20. It's still a bit rough around the edges, but it works most of the time.
    I recommend watching this video on a high resolution monitor to avoid graphical artifacts from dithering.
    Sorry about the shitty audio quality, I am still tweaking kdenlive settings.
    Yes, I know. This is not true ASCII, since I use UTF-8 braille dot characters with a special font. :)
    -----------------------------
    My Discord: / discord
    www.natty.sh/
    -----------------------------

ความคิดเห็น • 27

  • @NattyGfx
    @NattyGfx  3 ปีที่แล้ว +3

    Damn Moiré patterns ruining my thumbnail 😠

  • @Caenen_LeagueTechnical
    @Caenen_LeagueTechnical 3 ปีที่แล้ว +11

    "What is your favorite video player?"
    "My own."

  • @touhoudelivery3831
    @touhoudelivery3831 3 ปีที่แล้ว +5

    I love how bad apple can be on everything

  • @Moeshi
    @Moeshi ปีที่แล้ว

    Omg.. it is good, an art of code :v. Even is black and white I know the whole story lol

  • @hypercmdcataclsymco-founde188
    @hypercmdcataclsymco-founde188 3 ปีที่แล้ว +2

    fancy!

  • @MrThomas20121
    @MrThomas20121 3 ปีที่แล้ว +3

    nice

  • @ENRAEGE
    @ENRAEGE 3 ปีที่แล้ว +2

    Let's make a comment for possible algorithm.
    Still a really nice, smooth animation. Did you speed it up or is it real time?

    • @NattyGfx
      @NattyGfx  3 ปีที่แล้ว

      It can just enough keep up to be real time, I tried 640x360 pixels, but it struggled to stay in sync. WIth further optimizations, I think I'd get another 50%-100% characters out of it.

    • @Apollyion
      @Apollyion 3 ปีที่แล้ว

      @@NattyGfx I think this would be a perfect candidate for multi threading. That should get a lot of work done faster. There's also a faster formula for calculating relative brightness from pixel RGB. Also I don't know if GPU acceleration is possible or of any benefit for encoding to ASCII but those are some ideas since there is no source code yet :p

    • @NattyGfx
      @NattyGfx  3 ปีที่แล้ว

      ​@@Apollyion Thanks for the input. I already decode the video on a different thread and converting from RGB to luminance is handled by swScale. My part of the code mostly consists of image resizing, ordered dithering and a wrapper around avformat/avcodec.
      I think the biggest bottleneck right now is pushing all characters to the screen.
      I just haven't had the time to finish this project yet as I am busy work and other projects.

    • @Apollyion
      @Apollyion 3 ปีที่แล้ว

      @@NattyGfx It's really amazing the work you've already finished. I hope to see more of this project one day!

    • @NattyGfx
      @NattyGfx  3 ปีที่แล้ว

      Thanks!

  • @JohannYuumi
    @JohannYuumi 3 ปีที่แล้ว +3

    I got no idea what to comment.

  • @MetinCloup
    @MetinCloup 3 ปีที่แล้ว +1

    if you watch 144p it seem no ascii character and awesome

  • @namesurname6645
    @namesurname6645 ปีที่แล้ว

    Please share source code soon as possible.

    • @NattyGfx
      @NattyGfx  ปีที่แล้ว

      Actually happened to remember this project today, added it to the description

  • @deezusstudio2232
    @deezusstudio2232 ปีที่แล้ว

    I still wait turtorial

    • @NattyGfx
      @NattyGfx  ปีที่แล้ว

      I'll try to get back to this at some point, but it's mostly code anyway. If you wanna try something that actually works, I think VLC (?) supports ASCII art output?

    • @deezusstudio2232
      @deezusstudio2232 ปีที่แล้ว

      @@NattyGfx thx

    • @deezusstudio2232
      @deezusstudio2232 ปีที่แล้ว

      @@NattyGfx damn, I thought u used read file to do that lol, Is that open cv?

    • @NattyGfx
      @NattyGfx  ปีที่แล้ว

      @@deezusstudio2232 It uses libavformat and libavcodec, it's basically what ffmpeg uses under the hood.

    • @NattyGfx
      @NattyGfx  ปีที่แล้ว

      ​@@deezusstudio2232 I added a link to the source to the description