How to split my uploaded media into directories?

From your question what i understood is u need to store media files to another custom location. if that is your doubt then this may help you..

In order to change the default media upload location, you need to edit the wp-config.php file. If you want upload directory to be wp-content/example then you will need to place the following code in wp-config.php

define( 'UPLOADS', 'wp-content/'.'example' );

If you want the upload directory to be outside wp-content, like http://www.example.com/example/ then give it like this

define( 'UPLOADS', ''.'files' );

or you can try media file manager plugin to manage the media folders from the admin dashboard itself.

Edit:

Function to create a sub-directory inside the upload directory for every upload is :

function kv_custom_image_dir( $pathdata ) {
$subdir="/uploads_img".$pathdata['subdir'];
$pathdata['path'] = str_replace($pathdata['subdir'], $subdir,    $pathdata['path']);
$pathdata['url'] = str_replace($pathdata['subdir'], $subdir, $pathdata['url']);
$pathdata['subdir'] = str_replace($pathdata['subdir'], $subdir, $pathdata['subdir']);
return $pathdata;
 }add_filter( 'upload_dir', 'kv_custom_image_dir' );

if you want to read more check this blog