LibVLC based Subtitle Editor-Software Engineering Project

 

LibVLC based Subtitle editor
Premathunga, D.D.R.C.
Department of Computer Science and Engineering, University of Moratuwa
Sri Lanka
rukshan.10@cse.mrt.ac.lk


Abstract— LibVLC is the core functions and service of VLC player put into together to form the cross platform library. Since VLC is good audio and video playback application using its function to implement subtitle editor software, can achieve such capabilities for playback and subtitle controlling.


Keywords— LibVLC, LibavCodec, PCM data, CustomPot library



  1. INTRODUCTION


  2. VLC player is the most common used media file player and have many features to work with many type of media file formals and media devices. Also have subtitle playback function. But it’s lack of subtitle creation and editor for new media file users are getting to troubles. If they have such software to create and subtitle file for their software it will easy.


  3. LITERATURE REVIEW


  4. Video LAN subtitle editor idea was taken from video LAN idea page. Their main requirement was to implement separate software for subtitle edit. Also this software must be work on any platform and must have capable of play any time of media file and open and create many available subtitle files.


    Other requirement was to implement these application using LibVLC and QT framework. Since
    LibVLC and QT is cross platform framework software can be compile to other platforms as well. First phase of the development cycle was to setting up the development environment. Since VLC is open source projects most commonly used environment is Linux based system. Thus I used Ubuntu as my development platform. First settings the system for develop the VLC player. Thus set the all required development compilers and all the dependencies. Then that successfully develop the test application based on the LibVLC to play audio file.
    Next step was to design and analyze the requirement and constraints. To make it easy to users to create subtitle and achieve their all requirement to edit subtitle first made a research about existing subtitle editor and subtitle files. Then I come up with the user interface for subtitle editor software.


    In this subtitle editor software must have capabilities of import any audio video media file and play that file based on the LibVLC. Since LibVLC framework can play much type of the media files it will easy to integrate it to the software let software to achieve those capabilities. Thus all required function need to control audio and video must be implementing on the software User interface.


    After the successfully implement these first requirement next step was to manage QT frame work to fulfill the requirement. Then define the all required interface design and implement the user interface. In the interface divide it into several parts for video display and subtitle display. Subtitle display is the main display part of the software. That’s the main focus part of the software. User it to read the subtitle files and use it for edit the existing subtitle file phrases. Use table for fulfill the requirement functions. In the table there was columns called id (to represent the subtitle phrase number) starting time


    (the time to start to display the subtitle) ending time (the time to stop to display the subtitle) duration (To display duration of playing subtitle) and text (for display the subtitle text). Using this table could provide all data to create and show new and existing subtitle files.


    The requirements were to identify the correct time slot to display the subtitle phrase. Thus we need to identify the correct sound starting and ending time precisely. We can use to open first one is let users to decide what is the correct time listing to the sound. Second one is let users to identify the sound amplitude changing of the media files. In this application we have provided both two options. Also Software let the users to edit it in manually. And also users can find the precise time from the interface.


    To provide precise time of the voice generated time used graph for representing the voice amplitude with respect to the playing time. The next important phase was to how to draw that graph. For that used two libraries for these purpose. First one was CustomPot library to manage resulting data on the graph. Second one was the LibavCodec library to extract PCM data from the media file. But in this application just have shown the original sound waveform on the graph. It must be implement to filter the voice and only display them.
    After the format the filter data of the voice we can display it on the graph and it will play based on the playing time and user can always rolling corresponding bar to take a look at upcoming waveform. Then user can see the voice rising and falling edges from the graph. Then users can decide the corresponding starting and ending time precisely. To take those time data have implement the moveable and scalable bar. Moving and changing the width of that bar let users to decide the time correctly and can assign these values automatically to the subtitle editing row.


    Next step was to how to manage these subtitle file. In this software need to open and create any available subtitle file formats. Also it must have capable of exporting subtitle file to another file time. But in the current scenario there in no available library for extracting the existing subtitle files. Also there is no library for export and save the subtitle files. Thus those required libraries have to implement in scratch. In the current worlds there is so many subtitle files available. But up to now only three types of subtitles files can be create and export. Those are .SRT, .SSA, .ASS type. Also this application can only open .SRT subtitles files only.
    Then main features of the subtitle editor software have implemented then next phrase was to do integrated test and build the system. Up to now software can build for Linux based systems only. But it needs to configure for work on the other systems like Windows and Mac system. All of the system is build using the C++ and C language. Thus software has good performance for media file handling.


  5. DESIGN AND IMPLEMENTATION


  6. Since LibVLC software is quite large software and lot of collection of libraries li has so many components work together to work this complete software. From that component most important components diagram is shown in this figure.


    Subtitle editor component the main and core component in the software. Function of the component is to manage interaction of the other components, transfer the controller to the components and communicate and massage passing between the components. In this diagram there is the observer and observable component. It is the main component used in the software to manage the communication among component. In this software use the observer design pattern and all of that messages are control by subtitle editor component.
    Next most important concept was in this software is the architectural view of the software components. Software is implemented based on the 3 layered architecture. Because it is the most common used
    design in the now a days and it is easy to modify and evolve after the system is delivered.

    In this diagram it show how the software is divided in to layers and each components of each layers. Layers are view layer, domain layer and file handling layer. Since subtitle editor software most of time use several file type like media files and subtitle files in different ways and different types is it very important to the software to implement file layer and it is effective to the software to make it efficiency and good file management.


  7. RESULTS


  8. Most of the main features and function of the proposed idea could be delivers within the time frame. But other constrain like cross compile, work with other subtitle file couldn’t be achieve due do complexity of the project and complexity of the scope. But in further those features can be implementing.


  9. CONCLUTIONS


  10. Video LAN subtitle editor is the software has same kind of the features have in the VLC player work with media files. Thus VideoLAN subtitle editor is most flexible to use with environment like VLC player work. Putting all required features to create and edit subtitle file easily on any system will help every VLC users to use and manage their subtitle file. Also having good simulation environment on this VideoLAN subtitle editor let users to review their new subtitle and create them more precisely and easily. Complete working project can be found on this link.


  11. Screenshots