4cs
/
4chan Media Player
Firefox:
  1. If you don't have Greasemonkey or Scriptish installed:
    1. Install Greasemonkey (preferred over Scriptish)
    2. Restart your browser
  2. Install 4cs
Chrome:
  1. Download 4cs to your computer

    Make sure to not have Tampermonkey install it

  2. Open chrome://extensions in a tab in your browser

    Same as opening your browser settings and navigating to the Extensions tab

  3. Drag and drop the 4cs.user.js file you downloaded into the chrome://extensions tab

    Should say "Drop to install" or something similar. Let it install this way

* If you still have Tampermonkey installed, be sure to disable previous versions through Tampermonkey

* You may lose the ability to play Youtube videos through the player though, but sounds will work

For developers:/Hardlink

If you want to review the code or modify it yourself, there are 32 versions of the script:

If you are using Chrome + Tampermonkey, it is advisable to not use 4cs.dev.user.js if you plan on modifying it, as Tampermonkey stores userscripts in an odd way.

Browser not shown:/Hardlink

If your browser isn't listed, chances are it's not directly supported. That is, it might work on it, but hasn't been tested on it.

You can try using it in your browser, but there is no guarantee it will work.

Userscript not working:/Hardlink
  • Be sure to uninstall any previous userscripts
  • If you use NoScript, be sure to allow scripts
  • If you use Scriptish, try using Greasemonkey
  • If you are using Greasemonkey, try updating it
  • If you aren't using Tampermonkey, try using it
ATTENTION CITIZENS
and other estranged wanderers
It turns out, having the helpful info links up at the top of the page is too hard to find for some people.
As such, downloaders will now be forced to participate in this involuntary readme page before installing.
Question 1: Are you literate?
As you have answered "Yes," it is safe to assume that you can read.
Please spend the next 10 seconds reading the navigation links at the top of the page.
Time remaining:
As you have answered "No," it is safe to assume that you think you're being very clever by choosing the obviously false answer.
Please spend the next 10 seconds re-evaluating your life.
Time remaining:
Now that you've had some self-searching time and have likely come to the conclusion that you are, in fact, literate:
Please spend the next 10 seconds reading the navigation links at the top of the page.
Time remaining:
A brief English lesson:
Guide - noun
Pronunciation: /gīd/
Definitions:
a person who advises or shows the way to others
a thing that helps someone to form an opinion or make a decision or calculation
a structure or marking that directs the motion or positioning of something
Now that you have an intimate knowledge of the definition of the word guide, you should know when and why you might want to click the "guide" link at the top.
If your hunger for knowledge is not satisfied by merely the "guide" link, or simply if you have a question you want answered, you may be inclined to click the "q&a" link.
And if you consider yourself an intellectual giant, akin to the likes of Einstein or Tesla, you may even find yourself going as far as clicking any of the other links up there because they also contain a lot of information.
Finally, it really cannot be stressed enough that this site contains most of the information that people typically ask about. So keep these thoughts in mind:
Don't ask pointless questions
It will make you look like an idiot, which will subsequently make everyone else act like idiots instead of ignoring you.
Don't answer pointless questions
If a link hasn't been posted, go ahead and post a link to this website don't do that because apparently it's a banned url. Post search "google dnsev" instead. Otherwise, ignore people and let them read the thread.
That being said, don't pretend like this is some sort of "secret club," or that "spoonfeeding" people this website is in any way negative.
It's not immediately obvious that someone should just google "4chan media player". Even when searching "4chan sounds", it hasn't historically been the first link, and is still cluttered with obsolete script links; and it's even worse when searching "4cs".
I understand
(After exiting this readme, re-click the download link to install)
ogglify:

ogglify is an encoder designed to replace oggchan.

Since oggchan is no longer under development, it doesn't encode files to the correct type. Thus, one way or another, the resulting file has to be masked after it's created.

This application performs conversion from .mp3, .flac, and similar file types to .ogg and embeds them.

Setup: Hardlink

Create a folder and put the following files inside:

* ffmpeg is not provided on this site as it is too large, and also not mine. If you want to get a version that isn't 32-bit static, check their downloads page for Windows.

Embedding: Hardlink
  1. In your explorer, select your image file, your sound(s) you want to embed
  2. Drag them all onto "ogglify.exe" or "ogglify-fast.bat"
  3. Sit back and wait
  4. When the command prompt disappears, you should be left with an image named "image-embed.ext"

The only difference between "ogglify.exe" and "ogglify-fast.bat" is that "ogglify-fast.bat" may be quicker and won't try to get the best possible audio quality.

bigger:

bigger is a re-encoding program designed to upscale images.

This application was made so it could be easier to upscale an image while keeping the sound data intact and in an up-to-date format.

It should help bypass any minimum resolution constraints placed on images.

Setup: Hardlink

Create a folder and put the following file inside:

And that's it!

You can also rename it to "bigger.best.exe" to get the best quality image. (Check the Settings section for detailed info)

Usage: Hardlink

Usage is just as simple as setup: simply drag and drop your image(s) onto the application and let it work its magic.

A command prompt window should appear and disappear. When done, you should be left with new files named "filename-bigger.ext".

In addition to upscaling, it should also convert your source files to the proper format (if they weren't already.)

Settings: Hardlink

Settings are set by changing the application file's name. Each setting is separated by a . in the file name, and order does not matter. Check the presets for examples.

There are 3 main settings the bigger application uses:

  1. Pixels:

    The desired number of pixels to appear in the file. Can be in one of two formats:

    • n
      Resulting image will have at least n*n pixels
    • nxm
      Resulting image will have at least n*m pixels

    Where n and m represent integer numbers.

    (Default size is 800*800)

  2. Quality:

    If a parameter called "best" is included, the resulting upscale will have the best possible quality.

    This means that the upscale will scale with an integer factor, and will increase image quality if possible.

    If this parameter is omitted, scaling might not be an integer factor, and quality will never be increased; only decreased if necessary.

    (Starting quality is 85%)

  3. Size Limit:

    Sets the maximum file size limit for upscaled images. Example usage:

    • limit=3145728
    • limit=3145728b
    • limit=3072k
    • limit=3m

    All result in a file size limit of 3 megabytes.

    (Default limit is 3 megabytes)

Change log:
Issues:

Issues can be tracked on this page.

If you come across any problems with the script, please refer to the above url and post a new issue.

Try to include information about the problem such as browser, userscript plugin (Greasemonkey, Scriptish, Tampermonkey, etc.), any other userscripts installed which may be conflicting, and a description of the problem.

If you are having issues with sound playback, you can make sure your browser supports the <audio> tag on this page.

Issues / Audio: Hardlink

This page is for testing if your browser can properly support <audio> tags the way they are used in the player.

The audio shouldn't be visible, but playback should still work.

Click generate to start the test.

Log:

(audio sampled from: ZUN - Romantic Children)
Source:

Source code is available on Github.

Wiki:

Additional project information can be viewed in the wiki.

About:

The userscript is designed primarily to be an extension to 4chan's image boards, but is designed with modularity in mind.

Currently it supports detecting and playing embedded .ogg Vorbis sounds in images, replacing inline URLs, playing Youtube videos, playing Vimeo videos, and playing Soundcloud sounds.

Other Pages:
About / Userscript: Hardlink

The userscript is designed as a plugin to be used on 4chan's image boards, as well as the Foolz archive.

The main functionalities it adds are the ability to play embedded .ogg Vorbis sounds, replace inline URLs, and play embedded Youtube/Vimeo videos.

Player: Hardlink

The script functions by embedding sounds or videos into a small player window inside the browser. This window can be resized, dragged across the screen, and customized to the user's liking.

Settings are accessed by the [S] link in the top right corner, hidden by default. For more information about the title bar buttons, check the preview images section.

Sounds: Hardlink
  • Clicking [tags] in posts load sounds into the player from the relative image
  • The "sounds" link next to the image attributes loads all available sounds in the image
  • The "Detect Sounds" link will attempt to passively detect any sounds inside images in the entire thread
  • The "Load All Sounds" will attempt to load all sounds in the entire thread into the player
  • You can click and drag images onto the player
    (either from your computer or from the web browser)
Link Replacement: Hardlink
  • Links inside posts will be replaced with clickable links; middle clicking on a link will open it, so that it will open in a new tab and not the current one
  • Video links which can be opened in the player will display an icon next to them, along with the video title
  • This feature can be disabled in the settings if desired
Youtube/Vimeo: Hardlink
  • Videos can be intermixed in your playlist
  • If you have URL replacement enabled, clicking on a video link will queue the video in the player
  • You can also click and drag video URLs onto the player
Video Previews: Hardlink
  • Preview screenshots of videos can be viewed by hovering the link
  • This feature can be enabled/disabled in the player's settings page
  • Additionally, the size and hover time can be modified
Soundcloud: Hardlink
  • In addition to videos and sounds, Soundcloud media can also be embedded
  • Soundcloud links are replaced similarly to Youtube/Video links
Videncode: Hardlink
  • A file type similar to the Sounds files, except it supports .webm video as well
  • For more information on these files, visit the homepage
Uploader: Hardlink

There is also a built in sound uploader which can be used to add, remove, or re-tag sounds in an image.

This can be particularly useful to re-tag all the images with the [1] tag. It can also auto-detect any sounds in the image you select to upload on the fly.

Preview Images: Hardlink
  • Image 1
    • Player with 2 items loaded
    • Image being hovered by mouse; clicking on the image plays/pauses the sound
    • Clicking and dragging the volume bar on the left changes the volume
    • Title-bar buttons all visible for explanatory purposes.
      Left to right: "Settings", "Downloads", "Info", "Min/maximize", "Close"
    - Basic display
  • Image 2
    • Player having the resize borders being hovered (in this case, hovering the bottom-right corner)
    • Clicking and dragging on the image resizes the image
    • Player controls are now 50% transparent since the main image is not being hovered
    - Resize regions
  • Image 3
    • Player is playing a Youtube video
    • Default look of the title bar; i.e. title-bar buttons are transparent when not hovered
    • Player controls are now 100% transparent since the player is not being hovered
    • Hard to see, but above the seek-bar time (1:11), there is a color difference on the line above it. The dark grey indicates how much of the video is loaded
    - Youtube playback
  • Image 4
    • Playlist item is being hovered, in this case a sound file.
    • Controls are displayed on the right.
      From left to right: "Remove", "Move Up", "Move Down", "Save Sound", "Save Image"
    • Clicking and dragging the volume bar on the left changes the volume
    • Similar functionality for Youtube/Vimeo videos, except "Save Sound", and "Save Image" are replaced with "Video", which functions as a link to the video.
    - Playlist controls
About / Development: Hardlink

The origin of the name "4cs" comes from the abbreviation of 4chan sounds, but since its conception, it has moved on to be more than just a sound player. As it stands now, "4cs" is just a fun way of spelling "forks".

The project is focused on 2 major parts: steganographic image encoding and a web plugin for playback.

Steganography: Hardlink

If you already know how steganography with images works, you'll probably not need to read this, but steganography is basically a way to hide information. 4cs makes use of it by allowing users to embed files inside of .png images.

Each pixel in an image has 3 or 4 components to it, each of which takes up 8 bits of memory. The image steganography in this project works by reducing the number of bits that a pixel's color component uses (to, say, 5 bits instead of 8) and uses the remaining bits (3 bits in the example) to encode data. Since not all of the color bits are used, the image will still maintain (to an extent) the original picture.

Motivation: Hardlink

The motivation behind this project was essentially "sound threads" on 4chan. While I never actively partook in them, occasionally I would listen to some of them.

However, sometime in December 2012, the site developers disallowed the (at that time) current method of uploading sound images.

Since the method of embedding files in images is fairly simple (just concatenating the file to the end of an image file,) detection was also easy.

I decided I wanted to find a new way to put sounds/files inside of images. Thus the conclusion of steganography, and the only suitable file type for this was .png's.

Steganography was chosen because it has a higher CPU usage overhead to detect a sound within a .png image: you can do it easily locally, but it's probably a bad idea to implement large scale on a server.

Python: Hardlink

Originally this project started out as a toy project using Python, as Python's an easy language to get a quick prototype working with.

Both a working encoder and decoder were built using Python.

At a certain point, the performance of Python became undesirable, and I ported it to C++. This version ran much faster and presently has many additional features over the deprecated Python version.

Additionally, they both run as standalone .exe files, so users wouldn't have to install Python to use it.

Userscript: Hardlink

Once a working C++ encoder/decoder were made, I worked on modifying the 4chan Sound Player userscript. This was a major pain in the ass for multiple reasons:

  • The code had atrocious style:
    • Nearly everything used abbreviated variable names
    • Code is dispersed poorly; no good visual groupings to try and find something
    • Formatting is highly inconsistent, possibly due to multiple parties forking/working on it
    • etc.
  • I (at the time) had no idea what the exact nature of the old embedding formats were, only the vague idea of it
  • It was difficult to find the correct place to insert my modifications, and keep track of where they were for when I made future modifications
  • Finding a Javascript library to decode .png images, as html's <canvas> butchers images, especially ones with an alpha channel
  • The sound player itself was had hideously poor design

But with much struggles, I finally got a working version of it out and posted 1 thread about it on Christmas.

Complete rewrite: Hardlink

At a certain point I got tired of the horrible old script, due to the aesthetics of both the code and the sound player. Visually, I wanted users to have a nicer looking player, because this is what every thread revolved around.

I redesigned the player to have a more visually pleasing design while maintaining (and adding) features.

Improvements include:

  • Better follows the basic design of an application window
  • Player movement is restricted to screen area
  • Player is resizable
  • Image is resizable
  • Seek bar boundaries are more exact
  • Better volume boundaries, along with a text display
  • Playlist area is more exact
  • Dragging files displays a distinct notification
  • Less clutter when not interacting with the player
  • Links aren't scattered across the player window
  • Options are located in a more unified location
  • More flexible style editing
  • Comes with 4 default styles
  • Hovering a playlist item shows a list of options
  • No little-known/buggy right click feature

This redesign was posted shortly after New Year's.

Click here for a comparison image.

New features: Hardlink

While maintaining all features of the original userscript, this script also adds the ability to auto-load all image-sounds in the thread, and an option to attempt to passively detect all image-sounds.

Passive sound detection runs in the "background" (or at least it shouldn't disrupt the browsing experience by freezing the browser) and scans every image in the thread. The trade-off is that this works very slowly compared to normal loading.

Additionally, inline URL replacement was added; this feature can be optionally disabled in the player's settings.

Youtube playback: Hardlink

After sound playing was completed, I thought that the player looked nice in and of itself, so I thought that adding Youtube video playback would be a nice way to make it able to be used more often, especially since sound playback and video playback can interweave.

So after much struggle to get it to work in Google Chrome, here we are.

Vimeo playback: Hardlink

Vimeo playback support was also added; functions similar to Youtube playback.

As an aside, as much of a hassle as it was to get it to work again, I found the API nicer than Youtube's, since you can (and I did) write my own wrapper easily.

Batch applications: Hardlink

Two batch extraction applications were also created for older formats: a decoder and a re-encoder.

About / Image encoders/decoders:

There are 6 applications related to encoding and decoding images. Click on the *.exe links to learn how to use them:

embed.exe is an application designed to efficiently embed files inside of images.

Currently it supports input types of .png, .jpg, and .gif and always outputs as a .png image.

If you want to encode files using this application, use the following process:

Setup: Hardlink
  1. Create a folder
  2. Create a blank file named "_" (with no quotes and no extension) inside the folder
  3. Download embed.exe and put it in the folder
  4. Get your image file(s) and place them in the folder
  5. Get your files you want to embed (e.g. sounds in .ogg format) and place them in the folder
Embedding: Hardlink
  1. In your explorer, select your image file, your file(s) you want to embed, and the file named "_"
  2. Drag them all onto "embed.exe"
  3. Sit back and wait
Vorbis audio (.ogg): Hardlink

This application currently does not function as an audio encoder. As such, if you wish to convert your .mp3 or other audio files into .ogg files, you'll need an external program.

Currently, I suggest using Audacity, as it's a decent audio application. To encode .ogg files using Audacity:

  1. Download, install, and run Audacity
  2. Open your music file
  3. "File" -> "Export..."
  4. Change the "Save as type" to "Ogg Vorbis Files"
  5. Click "Options..." and lower the quality to get a decent output file size
  6. Save; make sure the file size is decent
Advanced options: Hardlink

If you know how to work command line tools, you can view all the command line options available by running it in a terminal. (The reason the file named "_" is required is because it sets several default options that would normally be set using command line flags.)

To view a list of flags, simply run "embed.exe" to view usage information.

An image guide that serves as a shorthand for the above information.

About / Image codecs / extract.exe:

extract.exe is an application designed extract files hidden in steganographic images created by embed.exe.

Extracting files is easy:

Setup: Hardlink
  1. Create a folder
  2. Download extract.exe and put it in the folder
Extracting steganographic images: Hardlink
  1. Put your images you want to extract files from inside the folder
  2. Click and drag them onto "extract.exe"
  3. You should be left with any files that were located inside the image(s)
Extracting older formats: Hardlink

If want to extract files from non-steganographic images, go to this page.

Advanced options: Hardlink

While not very many, there are still a few command line flags that you can use when extracting images.

To view a list of flags, simply run "extract.exe" to view usage information.

batch-decode.exe and batch-re-encode.exe are two applications used to extract from older (non-steganographic) image file formats.

This application is used to extract sounds from images.

It renames any sounds found as sound_tag.ogg and outputs it to the current folder. Any naming conflicts will be resolved.

This application is used to re-encode old image formats into steganographic images.

It renames any sounds found as sound_tag.ogg and outputs it to the current folder. Any naming conflicts will be resolved.

Note: this requires embed.exe to be in the same folder.

Usage options: Hardlink

Both applications are used in the same manner:

  1. Click and drag any images with embedded content onto the executable
  2. Wait for the cmd window to close and then view your new files
About / Acknowledgements:

cornarxgm: for concurrently working on his version, some general collaboration, and other related works.

ms11: for the source code I originally modified.

Whoever: for making the original sound formats for me to implement.

and You: for using the script.

Original Content:

So you want to create original content? Here's a guide:

Be sure to click the image links that appear on the right if you get lost

Creating the sounds-image: Hardlink
Posting your image: Hardlink
Congratulations: You have posted original content!

If you have issues posting, check out bigger.

Tips: Hardlink

For anybody who cares enough to view this section, here are some tips for using these applications:

  1. If you want your file to encode faster and don't need the best possible audio quality in your image:

    1. Download ogglify-fast.bat
    2. Put it in your folder with ogglify.exe (keep ogglify.exe!)
    3. Use ogglify-fast.bat in place of ogglify.exe in step 4
  2. The filename of your audio files will be used as the [tag] for playback; rename your files accordingly if desired

  3. If you want to test your image before you upload, you can drag the output file from step 6 onto an open Media Player in your browser

  4. If you want a different filename, be sure to rename your file from step 6 to something different

Including video: Hardlink

An early format for including short video clips is now available: Videncode

The application includes a GUI, and the site includes a step by step guide for making content.

Best usage tips:

  • Video can be looped for a specific time, similar to a .gif (but better quality)
  • Short video clips can be encoded; it's best not to try and encode too long of a video, or quality will suffer
  • Currently, it's preferred to keep the ".ve.ext" in the file's name, as it is an indicator of the content type
Questions & Answers: