Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

how on earth does copy/paste work from inside a video?

i'm way more confused than disappointed and wonder how easy it would be to rip this for use in a non-public environment?



This is a JSON-based container format for timestamped terminal sequences, including the terminal dimensions, the shell and the terminal used. (i.e., values of SHELL and TERM). See this minimal example [0]:

  {"timestamp": 1526123655, "version": 2, "height": 55, "env": {"SHELL": "/bin/bash", "TERM": "screen"}, "width": 179}
  [0.046457, "o", "namibj@nb:~/git/namibj/ind3xlite$ "]
  [3.021128, "o", "l"]
  [3.116894, "o", "s"]
  [3.468747, "o", "\r\n"]
  [3.472283, "o", "\u001b[0m\u001b[01;32mind3xlite\u001b[0m  LICENSE  main.c  main.h  Makefile  README.md  sqlite3.c  sqlite3.h  sqlite3.o\r\n"]
  [3.472869, "o", "namibj@nb:~/git/namibj/ind3xlite$ "]
  [4.092707, "o", "e"]
  [4.340945, "o", "x"]
  [4.548934, "o", "i"]
  [4.653126, "o", "t"]
  [4.859118, "o", "\r\n"]
  [4.859605, "o", "exit\r\n"]
As you can see, it was easy for me to redact the user and hostname from the prompt, without you even seeing it. The canonical implementation is in python (3 iirc), but you should be able to hook a non-x11 terminal emulator up and make that spew out frames for each individual timestamp, and just create a variable framerate mkv from that. With uncompressed video. This is then trivial to feed into ffmpeg for transcoding into your favourite codec, possibly even including a different stream for audio into the resulting mux. I might, if I'd get a reason to do this before other projects, take an existing terminal emulator and teach that to do this (or possibly directly to lossless VC1, removing the need to search for matching glyphs later in the process, which should yield reasonably small files directly from the conversion, without quality loss). So, if someone want's me to do this, email's in my profile.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: