日本語

TS viewer for Amazon Cloud Drive

Last Update: 2017/12/03
logo

new version TS viewer for Cloud Drive is available.

This application is the streaming multimedia player for Amazon Drive. You can play movies and sound files without 20 min limitation, and need not to wait whole file downloaded. The available formats are FFmpeg acceptable ones, all general video and audio formats.

TS format(MPEG2 Transport Stream) files are available to send with UDP. This function allow to watch the Amazon Drive's video with another software receiving the UDP MPEG2-TS stream. For example, TVtest or VLC media player.

You can encrypt the upload files by AES-256(CTR mode) and AES-256(CBC mode: CarotDAV compatible) to Amazon Drive. Transparently, the encrypted files are able to download and streaming play.

This application has basic management of Amazon Drive, can upload files or download files or make folders, and also with CUI, upload and download. You can upload files in command prompt, so can make a batch job. And this application has the function to check and match local(PC) and remote(Amazon Drive) folders. This function prevent you forget uploading some files in folder.

Screenshots

screen shot screen shot2

download

binary(portable edition)
TSviewACD_20170222.zip

binary(installer edition)
TSviewACD_20170222_installer.zip

sources
TSviewACD_20170222_src.zip
GitHub https://github.com/lithium0003/TSviewACD

old version files

This software uses code of FFmpeg licensed under the LGPLv2.1 and its source can be downloaded here

The module FFmpeg and SDL2 in this software can compiled with this reference.

This program is compiled with c# .NET 4.5.2.
Need Microsoft .NET Framework 4.5.2 runtime.

This program is compiled with Visual Studio 2015 C++.
Need Visual C++ Redistributable for Visual Studio 2015.

Changelog

2016/04/30 : 1.2.0.0430
Initial version
2016/05/03 : 1.3.1.0503
add CUI mode
fix wait time for UDP send
2016/05/04 : 1.3.2.0504
fix D&D
2016/05/05 : 1.4.0.0505
add CUI list mode
2016/05/05 : 1.4.1.0508
fix UDP send bug after tranfer delay
fix upload bug
2016/05/16 : 2.0.0.0516
change the way to get lists on drive(use cache)
add CUI option for hash check
2016/08/31 : 3.0.2.0831
add streaming play of any media file with FFmpeg(ffplay)
2016/08/31 : 3.0.4.0831
fix ffplay bug
2016/09/21 : 4.0.0.0921
change streaming play module
use directory FFmpeg+SDL2 and can seek any media file
2016/09/24 : 4.0.1.0924
add resize internal media player
2016/09/25 : 4.0.2.0925
add 32bit binary
2016/09/28 : 4.0.3.0928
fix bug of internal media player(audio channel issue)
add auto audio nomalize and volume filter
2016/09/29 : 4.0.4.0929
fix bug of D&D upload from explorer
2016/09/29 : 4.0.5.0929
fix bug of internal media player(audio channel issue)
2016/10/02 : 4.0.6.1002
fix memory eating bug
improve diff
2016/10/06 : 4.1.1.1006
change FFmpeg version to 3.1.4
change API for chagne detection of drive
add encryption mode(AES-256 CTR mode)
not loading FFmpeg DLL until play
2016/10/07 : 4.1.2.1007
fix audio bug on internal FFmpeg player
fix cache bug
2016/10/09 : 4.1.3.1009
fix bug on internal FFmpeg player
2016/10/13 : 4.1.4.1013
add language file(Japanese)
2016/10/16 : 4.1.5.1016
add installer
fix bug on switching accounts
2016/10/17 : 4.1.6.1017
add download tester to make sure
2016/10/18 : 4.1.7.1018
fix bug in the internal player
2016/10/28 : 4.1.7.1028
change FFmpeg version to 3.2
change SDL2 version to 2.0.5
fix bug unable to download near 10GB size file
chage the buffer size of uploading
fix unnecessary folder creation of upload in match result window
fix CUI mode function
2017/01/28 : 5.0.0.10128
fix download URL of Visual C++ runtime on installer package
add option for search by file size
add option of making the temporary download URL
change listview draw mode
change the drive cache
in GUI mode, override the same name confrict files in upload
(note: Amazon Dirve holds files with case-insensitive way.
this app only keep one file if copy same name files from case-sensitive filesystem)
download with drag&drop to the Explorer
move files with drag&drop between this app
2017/01/28 : 5.0.1.10128
exclude asset files when searched by file
(neither file nor folder checked, previous behavior)
display search result again after drive operation in search result
send the URL to clipboard when make one temporary download link
2017/01/29 : 5.0.2.10129
fix stop error when the changes of the drive are too big
2017/02/02 : 5.1.0.10202
change crypt mode behavior
add Cut & paste for moving item
upload and download via clipboard to/from the Explorer
hide API key(take measure to be detected false positive of malware)
2017/02/02 : 5.1.1.10202
fix crash bug when no item is sent to clipboard
2017/02/06 : 5.1.4.10206
fix slow filename decode for encrypted items
always check MD5 hash on uploading and downloading
fix UNICODE issue on debug log
fix stop bug on first time
fix bug on constructing drive tree on first time
2017/02/15 : 5.2.1.10215
change job control for parallel execution
change display running jobs
add function on CUI mode
fix bug not shown the image file when play sound files with internal player
2017/02/17 : 5.2.2.10217
improve progress display
add ignore list mode on CUI donwload
2017/02/17 : 5.2.3.10217
add master password
save window position
2017/02/18 : 5.3.0.10218
save drive cache exit time only
get token on server side when the client secret is not in source
(binary version is not changed the authentication way)
2017/02/22 : 5.3.1.10222
fix not saved drive cache on CUI mode
change JobList windows display position #2
fix getting token on server side
add seek bar on FFmpeg internal player window #4

Usage

In portable edition packeage, Copy application folder to anywhere you want. Before extract the packeage, remove security block of files from the Internet. If application DLLs has the property of security block, DLL loading fails on play.

In installer edition packeage,

Select 64bit or 32bit, and execute the installer "setup.exe". You can install with msi file but runtime files are not automatically chain installed.

In application folder,

TSviewACD.exe is main file, the other DLL is need to execute. Copy all bin folder contents to anywhere you want. If you not use internal player(FFmpeg), you can start application without optional DLL(but still need essential DLL, ffmodule_conf.dll). If you need not to translate Japanese, the language folder ja/ can remove.

In First time, display the Amazon Drive login window. After login, the main window comes up.

Index

Screen

This application has 3 pane window, the treeview in the left and the listview in the right. The control section on the top has tab page selectable.

window info

In the listview on the right, display the current folder(target to operate on Amazon Drive). The search result, described later, is also displayed in the listview and can be an operation target.

Operation on drive

You can explore on Amazon Drive by operating in the tree view on the left or the listview on the right. If you want to do some operation, display the item in the listview as current folder, and then do operation. The drive can be operated from the control section on the top, and from the context menu with right click on the listview on the right.

Cache data for drive

In version 2.0.0.0516, changed the way to display the data on the drive. New way is read all of the information at once, and cache to a file "drivecache.bin". If the reload occurs, acquire only the difference information. If any inconsistency has occurred in the cache, because of bug, please do the forced reload to discard all of the cache by clicking the "Reload" button while holding down the Ctrl or Shift.

Upload

To upload, use "upload" button on "Navigation" tab in control section, or do Drag & Drop from windows explorer. You can also upload with copy files from the Explorer and paste to this app. If check the box "Skip already uploaded files" on "Navigation" tab, it checks whether the file uploading is already uploaded or not. If check the box of "check MD5" additionally, calculate MD5 hash value of local files and use it for the check whether uploaded or not. If check the box "Override onflict files", the previous item is moved to trash and upload new item. In this time, upload size limit is 50GB(approximately 52,000,000,000 Byte) by the server-side limit. If you copy from Casesensitive filesystems, only one of same name files can be uploaded.

Download

Select the item(s) in the listview(on the right) and click "Download Item" on context menu(mouse right click menu). Another way, Drag and Drop to the Explorer from listview(on the right) or Cut(Ctrl+x) and Paste to the Explorer.

Known issue in download

The file more than 10GB(approximately 9,500,000,000 Byte) whose name is non-ASCII code, cannot be downloaded by API. This is the server-side limitation. To avoid this bug, use a trick for big file download. On downloading such kind files, internally automatically change the item name to temporary ASCII name in server and then download it, rename to original name after download. For this reason, the modified time of the meta data will be forced to update. Please note that there is a possibility that the original file name will be lost when unforeseen circumstances happened in this trick.

Move items

The selected items in the listview(on the right) can be moved by Drag & Drop. Send to clipboard with Cut(Ctrl+x) and change the listview to destination folder, move items with Paste(Ctrl+v). In normal view, include the item of the parent folder(..), all folder are target of move. And also, move operation can be accepted when the listview is showing the search result. The treeview(on the left) is too the Drop target from the listview. If the file insted to folder in the treeview, the Drop target is considered as the parent folder. When the file in the treeview has been selected as a Drop target instead the folder, the Drop target is considered to be the parent folder. In the treeview, if you want to Drop onto unexpanded item, hold on it in some seconds and it will be expanded.

Play with internal player

The internal player is using the library of FFmpeg and SDL2, it can play the movie and sound files while downloading. Supported formats are all types that the FFmpeg can decode. To play files, select the item(s) in the listview(on the right) and click play button of "FFmpeg" tab on control section. If the "FFmpeg" tab is open, you can play with a double-click of the item. After enough data is downloaded, the play window comes up and streaming is started. To control player, enter the keyboard command or operate mouse in play window.

ffmodule info

If playing sound files, automatically search the same name picture file in current folder and show it. It is useful for showing cover image for album. To play in middle of files, use "Start" box and "Duration" box. For example, if you want to play file for 15 min skipping 30 min from the beginning, set "0:30:00" to "Start" box and "0:15:00" to "Duration" box. The Volume control has two way, Insert/Delete and F1/F2. The difference is that Insert/Delete control cannot be louder only up to the source volume but F1/F2 control can be louder from a whisper. You can use the dynamic audio normalizer by F4 key and automatically normalize the audio volume. This filter needs preceding 15 second audio data, so slow downloading makes stop the video.

Send with UDP

TS format(MPEG2 Transport Stream) files are available to send with UDP. This function allow to watch the Amazon Drive's video with another software receiving the UDP MPEG2-TS stream. For example, TVtest or VLC media player.

To send files, select the item(s) in the listview(on the right) and click play button of "Send UDP" tab on control section. If the "Send UPD" tab is open, you can send with a double-click of the item. MPEG2 TS files have TOT frames, that have the information of time, but those frames come on 5 seconds interval. As a result, the seekbar is inaccurate. To send in middle of files, use "Start" box and "Duration" box like the FFmpeg. For example, if you want to play file for 15 min skipping 30 min from the beginning, set "0:30:00" to "Start" box and "0:15:00" to "Duration" box. In TS stream, the absolute time is recorded, so that you can skip with this absolute timecode by selecting "Abs time" instead of "Diff" radiobutton.

You can search the files and folders on Amazon Drive Items. Partial match retrieval and Search using regular expressions are available. One example, select "Find" tab in control section and "Find text" box leave empty and click "Search" button, you can get whole item on the Amazon Drive. If not check "Regex" box, use Partial match retrieval and using regular expression if checked. You can search only files, only folders or filtered by item time.

Matching on local and remote

This application has the function to compare the list of local(PC) files and the list of remote(Amazon Drive) items. When you upload many files, you can check whether all files are exactly uploaded or not.

In this version, cannot match crypted files.

Click "Check File" button on "Folder" tab, the compare window will open. The left box is listed local(PC) files and right is listed remote(Amazon Drive) items.

match window

The left, you can add files with clicking "Add Local File" button or add files recursively with "Add Local Folder", Drag & Drop from windows explorer. On the right, you can add remote selected items in the listview with clicking "Add Remote Item" button. The folder items are selected, add items recursively. You can also Drag & Drop items from the listview on the main window to the right listbox on the compare window.

If select "Keep Tree", compare with directory structure. If select "Filename Only", compare with filename only. If select "Use MD5", compare items by considering the MD5 hash as filename. If checked "Calculate MD5" box, calculate MD5 hash value of local files and use it in comparing. (Amazon Drive items MD5 hash value were already calculated when uploaded)

Configuration file

Authentication information and other configurations are stored in the file "TSviewACD.xml", same place of executable file in the portable edition. In the installer edition, stored under %AppData%\lithium03\TSviewACD. The recorded authentication information is NOT password. This application does not handle your password information in direct. All password information are processed in server-side(Amazon), application handles only the token. Next time, the application can log in automatically by sending to Amazon this token and the secret code on application. Of course, the secret code on application was removed in published source code for safety.

Command line option

From the command line, it will start in CUI mode when you start with the argument. In CUI mode, list, download and upload are available.

usage
        help                                      : show help
        list (REMOTE_PATH)                        : list item
                --recursive: recursive mode
                --md5: show MD5 hash
                --nodecrypt: disable auto decrypt

        download (REMOTE_PATH) (LOCAL_DIR_PATH)
        download (REMOTE_PATH) (LOCAL_DIR_PATH) (IGNORE_LIST)
         : download item(s)
        download_index (INDEX_PATH) (REMOTE_PATH) (LOCAL_DIR_PATH)
        download_index (INDEX_PATH) (REMOTE_PATH) (LOCAL_DIR_PATH) (IGNORE_LIST)
         : make link index after download item(s)
                --nodecrypt: disable auto decrypt

        upload   (LOCAL_FILE_PATH) (REMOTE_PATH)  : upload item
        upload_watch (INDEX_PATH) (LOCAL_PATH_BASE) (REMOTE_PATH)
         : watch INDEX_PATH for index file(file location file).
         : upload directed files and remove local file
                --md5 : hash check for conflict
                --createpath: make upload target folder mode
                --crypt1: crypt upload mode(CTR mode)
                --crypt1name: crypt filename(CTR mode)
                --crypt2: crypt upload mode(CBC mode CarrotDAV)
                --nocrypt: nomal upload mode
                --nodecrypt: disable auto decrypt

                --debug : debug log output

list

TSviewACD list /*
TSviewACD list /Documents/*
TSviewACD list --recursive --md5 /*
The 2nd argument is the remote path to list. Don't forget last * for list into the folder. The option --recursive is list recursive into folder. The option --md5 shows MD5 hash. With --nodecrypt, auto file decryption is disable.

To create filelist as UTF-8, change the command prompt code page.

C:\> chcp 65001
C:\> TSviewACD list --recursive --md5 /* > drive.txt

upload

TSviewACD upload c:\test\test.txt /Documents/
TSviewACD upload --createpath c:\test\test.txt /test/test1/test2/

The 2nd argument is local file path, and the 3rd is remote path to upload.

Test the file conflict when upload. If same name and same size file is already exist, application exit and return 99. If different size, the previous file is trashed and upload. If add option --md5, the conflict check is extended to hash value. If the same hash value file is already exist, application exit and return 999. If different hash, the previous file is trashed and upload. The option --createpath creates all folder in the spetified remote path.

The option --crypt1 means encrypt by CTR mode without filename encryption, --crypt1name means with filename encryption. The option --crypt2 means encrypt by CBC mode(CarotDAV compatible), --nocrypt means disable encryption. Commandline options override the GUI mode settings. You cannot pass the password by CUI mode, set password with the GUI mode.

download

TSviewACD download /Documents/test.txt d:\download\tmp.txt
TSviewACD download /Documents/*.txt
TSviewACD download /* d:\download ignore.txt

The 2nd argument is remote path to download, and the 3rd is local path to save. THe 4th argument is optional ignore list for download, for example, already downloaded list. The 3rd argument is optional and show a dialog if not specified. The 2nd argument can be contained * or ? for multiple target.

The download ignore list expects the output of list mode. File encode must be UTF-8.

Disable auto decryption with --nodecrypt. All data downloaded "AS IS". If you encrypt with CTR mode with filename encryption, the nonce displayed on downloading is necessary to decode encrypted files. Keep the nonce data when download as crypted and copy another location.

create index after download

TSviewACD download_index d:\index /Documents/* d:\download

The 2nd argument is local index file path, 3rd is remote path to download, and 4th is local path to save. The options are same as download.

This mode is intended to transfer files between accounts combining next command. The index file, contains downloaded file path, is generated after download.

watch a folder and upload

TSviewACD upload_watch d:\index d:\download /Documents/

The 2nd argument is local index file path, 3rd is upload file path base, and 4th is remote path to upload. The options are same as upload.

This mode watchs a folder and read a created file, contains the path to upload file, and upload. The upload location is relative path from the upload file path base. The remote file paths are automaticaly created. In this example, the file on d:\download\test\text1.txt is uploaded to /Documents/test/text1.txt. This mode is forever loop, break with Ctrl+C.

Encryption

This application can encrypt files with AES-256 CTR mode or CBC mode (CarotDAV compatible). In CTR mode, the encrypted files renamed by adding ".xxxxxxxx.enc"(xxxxxxxx is random alphabet and number strings of 8 characters). In addition, you can encrypt filename. In CBC mode(CarotDav compatible), the filenames are always encrypted.

The detail of protocol of CTR mode is here. The CBC mode(CarotDav compatible) protocol is "encryption protocol of CarotDAV"

CTR mode

The item encrypted with this mode is displayed with blue color.

If using CTR mode encryption, the files that have an extension of ".enc" are assumed to be encrypted. If a file with this extension is already, please keep in mind that it does not work well. The encryption of the file name, Braille area of Unicode is used. Please note that does not work well if you are already using the file name of the Braille.

In CTR mode encryption, the filename is the part of key for decode if you encrypt files. If you change the filename, you LOST file. If you need to change the name, download and upload again.

If you use CTR encryption without filename encryption, the applicaton for emergency decode is available here(DecodeCTR). This helper application can decode the files downloaded with the other application. DO NOT CHANGE FILENAME of downloaded files, the filename is a part of key.

CBC mode(CarotDAV compatible)

The item encrypted with this mode is displayed with green color.

The CBC encryption mode is compatible with CarotDAV. This mode always encrypt the item names. The encrypted name begins with one of header, user selected from 7 options, "^_",":D",";)","T-T","orz","ノシ","(´・ω・)".

In the CBC mode, files are checked with SHA-256 hash when download. If downloaded item is broken, report error. When play the files, skiped the error detection.

If you use CBC(CarotDAV) encryption mode, the applicaton for emergency decode is available here(DecodeCarotDAV). This helper application can decode the files downloaded with the other application.

Attention

If you change the password for encryption, you cannot decode the files encrypted by previous password. The encrypted files don't keep which password is used to encrypt. If you loat the password, decryption is failed. Display items with read on decrypted error(password unmatch), they are not download with auto decryption.

In CTR mode with filename encryption, encrypt key depends on item ID in Amazon Drive. Cannot decrypt items only download with the other application. In CTR mode without filename encryption, filename is the part of encryption key. In CBC mode, the name and content is encrypted separately, you can recover the file from the encrypted content only.

The password is keeped in setting file obfuscatory or encrypted by master password. You lost password, and you lost encrypted data. Be careful. Thoroughly try encryption unnecesary data and then use encryption main data.

license

TSviewACD.exe, ffmodule.dll
NYSL free to use.

FFmpeg
LGPLv2.1

SDL2, SDL_ttf
zlib license


This application tested in Windows10 pro. Compiled with Visual Studio 2015.

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

If you have any question or bug report, please contact to contact@lithium03.info. I keep mind it and deal it with at free time.