Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extract audio / video streams from TeamViewer recording (TVS file)?

TeamViewer allows to record sessions in a proprietary format with the file extension .tvs. It can be converted to AVI with any codec installed on the local computer (using TeamViewer), but not MP4 or other container formats.

The encoding to AVI is really slow (not multi-threaded apparently, using x264 vfw; XviD would had taken even longer), the resulting file did not play well in VLC and wasn't editable at all in Avidemux on Windows.

Therefore, I'd like to know if it's possible to extract the audio and video stream inside the TVS file for further processing with ffmpeg (otherwise, I need to encode twice, which means 4 hours per 60min footage). I hope it's similar to other formats, just with a custom codec - which I hope is not built-in in TeamViewer, but available to other applications as well.

like image 521
CodeManX Avatar asked Jun 01 '15 14:06

CodeManX


People also ask

How do I open a recorded file in TeamViewer?

Click on the three-line menu (≡) in the upper left corner of TeamViewer. Navigate to Extras and select Play or convert recorded session... 2. Choose the desired .

Can TeamViewer record screen and audio?

TeamViewer's screen recording feature is fully integrated into the complete functionality of the software. You can choose to set the record feature as a manual function or to automatically record every remote session that is launched.


1 Answers

TVS is a proprietary format. There doesn't seem to be a lot of information about it online. A small amount of analysis can be found at http://www.jerrysguide.com/tips/demystify-tvs-file-format.html.

I looked at one with a hex editor. It contains a text-based header, a Base64 text footer, and a lot of binary data. For example:

TVS
Version 5
TVVersion   13.0.6447 
Date    2018-03-03 15.24
TVServer    
ClientID    314159265
ServerID    MY_HOME_PC (123 456 789)
LocalParticipantID  1234567890123456789
GUID    {01234567-89AB-CDEF-0123-456789012345}
StreamTypes 2
ScreenFeatures  127
MetadataPosition    0000000000169e98
BEGIN
[Lots and lots of binary data]
END
[320 bytes of Base64]

(The MetadataPosition marks the position after the END where the Base64 starts.)

The binary data seems to contain several DEFLATE-compressed chunks. They seem to contain meaningful data in them, including a list of screen resolutions, a mouse cursor, and some 32-bit RGB image data, but the structure is not easy to discern.

There may be hope for decoding the format, but I couldn't see any efforts towards it.

It might be just a recording of a TeamViewer session. If that uses something like the RFB protocol, then it might be similar to the VMware Video format.

EDIT: In case it helps anyone, I've written a quick program in C to extract/dump the contents of the KEY chunks from the file: (gist)

EDIT: I've found that TeamViewer will happily play at least simple files consisting of just TVS\r\nBEGIN\r\nKEY...\r\nEND, stripping any other data. Although I suppose it may well break if things like the Version or StreamTypes can affect the decoding.

like image 155
mwfearnley Avatar answered Sep 21 '22 16:09

mwfearnley