• jeroen (unregistered)

    'Since this is video, we can assume a frame-rate of 29.97' is a nice WTF on its own....

  • LM (unregistered)

    "an advanced version of Idiot was released a few weeks later" -- Ah yes... those maintainers of Idiot are way too active for my taste.

  • (nodebb) in reply to jeroen

    Yeah, is 29.97 frames per second some American thing? Any fule kno that video comes at 25 frames per second(1), just like God intended.

    (1) Well, no, it doesn't. It comes at 50 fields per second.

  • Patrick (unregistered)

    AS2 and DASH? Slight anachronism there...

  • Herr Otto Flick (unregistered) in reply to Steve_The_Cynic

    Black and white NTSC was 30 fps, when they added colour they didn't want to reduce resolution, so they slowed it down a small amount and shoved the chroma in there.

    PAL was designed for colour so is just 25 fps.

  • Hakko (unregistered) in reply to Steve_The_Cynic

    And not forgetting that film is usually 24fps. (unless it's on a NTSC broadcast, in which case it is 23.976).

  • Bert (unregistered) in reply to jeroen

    Right? Is 60FPS not standard yet?

  • TheCPUWizard (unregistered) in reply to Bert

    Bert - 59.94 is becoming pretty standard ;)

  • Idiot Maintainer (unregistered) in reply to LM

    Idiot is the most actively contributed to open source project since the beginning of human history. It's in constant development all the time. I would know, I have first hand experience.

  • gleemonk (unregistered)

    Shit like this makes me angry. The perpetrator had no concept of object structure in JS and copied a primitive JS-implementation of PHP's print_r() without understanding how it works not without haphazard modification to get field separator ".mp4n". Then they wrote a clumsy "parser" for its output format.

    I'd blissfully forgotten about JS block labels and now this submission makes me painfully aware of them again. The labels appear to be malformed though, they should read "frame_9:" or somesuch.

    If I could rip it out and replace it with the one line... I would feel good again. But this is going to stay like like it is because I can't push to TDWTF.

  • Chronomium (unregistered)

    "So Cédric “fixed” this problem by randomizing the order of the keys, thus forcing them to parse the data as JSON."

    This is reasonably clever, but isn't order of JSON object keys naturally non-deterministic anyways? If so, and the keys kept ending up in the same order every time anyway, there might be something else fishy going on.

  • Burner (unregistered)

    That's a lot of work just for some pron.

  • NoLand (unregistered)

    OK – I'm reasonably shocked. How did they even manage dot-notation as in testvar.indexOf()? This is rather inconsistent. (BTW, Is the pre-AS2 Lingo-style ActionScript with backslash notation still active? I would have liked to see it in action once more for this one.)

  • Gumpy Gus (unregistered)

    The odd frame rate is a inspired bit of math-- if you use that as a frame rate, the 3.58545 color subcarrier changes phase on alternate lines (alternate frames), so the subcarrier cancels out, visually. Also the color sidebands end up interleaved with the luminance sidebands, so with a spiffy surface-wave filter the luminance can be cleanly separated from the color information. Of course this has nothing to do with any digital transmissions, except it's best to keep the frame rate the same for digital so music doesn't sound a bit off-key.

  • Avium (unregistered) in reply to Chronomium

    The parser needs to be non-deterministic because - as the receiver of the data - you can never be sure how the serialization of the object occurred. The serialized data will likely be generated in the same order every time but there is no guarantee.

  • Jerepp (unregistered) in reply to Idiot Maintainer

    And not one buggy version yet... every version works as intended!

  • LM (unregistered) in reply to Idiot Maintainer

    At least the open source Idiot can be reviewed and/or mocked by the community. It's all the closed source Idiots that really go all out.

  • Herby (unregistered)

    Color standards... Yuck. The 29.97 frame rate for NTSC color was done by none other than (drum roll...) the FCC. The original standard had the frame rate at 30, just like black & white. The problem was that if you did all the math and came up with carrier frequencies and the like, it interfered with the sound carrier at 4.5 MHz. The original proposal was to shift the sound carrier up 0.1% (4500 Hz) which would have been easily accommodated as most TV receivers could handle the difference in the sound channel with ease. But in their infinite wisdom, the FCC didn't like that, and reduced the picture stuff down 0.1% so the frame rate went from 30.00 to 29.97, dropping a frame every thousand. So, we're stuck with it for over 60 years.

    Gotta like the FCC.

  • Verisimilidude (unregistered) in reply to Herby

    Come now Herby, you give too much credit to a bunch of underpaid civil servants. They relied on HEAVY industry input.

  • (nodebb) in reply to Gumpy Gus

    Of course this has nothing to do with any digital transmissions, except it's best to keep the frame rate the same for digital so music doesn't sound a bit off-key.

    In the lands of 50 Hz video, films are commonly played back 4% faster, shifting music up 2/3 of a semitone. It's only a problem for those gifted/afflicted with perfect pitch. I doubt even they would notice a 0.1% difference.

    For TV production I would guess it's safer to stick with 29.97/59.94 Hz across the board than to go back to integer frame rates and risk mixing sources with a 0.1% difference that you won't notice for a few minutes.

  • Harris M (unregistered)

    That 0.03 fps difference is a real waste of time, if we sped everything up to 30, we could save almost 4 seconds per hour of video!

  • Cédric (unregistered)

    Submitter here – the "frames" in this case actually are animation frames. The whole thing is an online Flash game on an educational platform that contains some short videos.

    There's also quite a bit of WTFy PHP all over the place, but those are mostly the usual, run-of-the-mill WTFs. This one is the first that left me literally slack-jawed ("mp4n", for crying out loud!), and triggered an immediate TDWTF submission.

    Oh, and the streaming sources API is used by other clients (e.g. plain VoD players) as well, so DASH is in there for those, while never being used by anything Flash-y.

  • gnasher729 (unregistered) in reply to Chronomium

    You missed his point. It's JSON. You either use a JSON parser, then everything is fine, or you use some handwritten monstrosity, and you and your users will be in trouble sooner or later. By randomizing the three lines, he makes sure that anyone using a JSON parser is just fine, but people using handwritten code will be in trouble, and hopefully notice before they ship.

  • Anonymous (unregistered)

    The picket-fence escaping in the URL is TRWTF.

  • Abe (unregistered)

    It's very difficult to make something idiotproof, as idiots are very inventive.

  • (nodebb)

    I found some code this week that gets the (JSON) response from the server, puts it into JSON.stringify, (yes) and then strips out non-numbers using regexp, then uses that. Because the numbers in that response would be the number we are after and it will never change. Instead of using the built-in jQuery data parameter.

  • (nodebb) in reply to Herr Otto Flick

    Guys, you need to retune your joke detectors...

  • Randal L. Schwartz (google)

    I heard that the reason it's not 30 Hz was so that any 60 Hz "hum" from powerline interference would slowly crawl through the picture, rather than being stable and messing up the image.

Leave a comment on “print_a_idiot()”

Log In or post as a guest

Replying to comment #:

« Return to Article