Skip to content

A 3-part Java application of video streaming and management using the FFMPEG tool and wrapper.

License

Notifications You must be signed in to change notification settings

Coursal/FFMPEG-Streaming-Video

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FFMPEG-Streaming-Video

A 3-part Java application of video streaming and management using the FFMPEG tool and wrapper.

In more detail, the application is divided into 3 apps:

  • Streaming Director, which given every video file in the raw_videos directory, generates different video editions with different formats (avi, mp4, mkv) and different bitrates (200Kbps, 500Kbps, 1Mbps, 3Mbps) each and stores them in the videos directory.
  • Streaming Server, which is responsible for the management and streaming of videos that are available based on the client's specifications.
  • Streaming Client, which is responsible for the communication with the server and playing the video streamed video that was selected by the end user.

Project Description

Streaming Director

Execution Steps

  • Scanning the /raw_videos directory for videos
  • Generating 12 different files (with differences in the file format and/or the bitrate) for each video (using the ffmpeg-cli-wrapper)
  • Saving the generated videos to the /videos directory
  • Deleting all videos from the /raw_videos directory

App GUI Example

Streaming Server

Execution Steps

  • Waiting and receiving a client request (that contains the selected bitrate and file format by the end user)
  • Creating a list from the videos in the /videos directory that match the info given by the request (every video with this particular format and smaller or equal bitrate to the one chosen)
  • Sending this list of video names to the client
  • Receiving the response of the client (that contains the selected video from the list, along with a given network protocol of TCP, UDP, RTP/UDP)
  • Streaming the selected video through the given protocol to the client (by creating a ffmpeg.exe process in the local system)

App GUI Example

Streaming Client

Execution Steps

  • Sending the initial request to the server (that contains the selected bitrate and file format by the end user)
  • Receiving the server's response with the list of filenames for the videos that meet the criteria of the user
  • Sending the final request to the server with the stream specifications (that contains the selected video from the list, along with a given network protocol of TCP, UDP, RTP/UDP)
  • Receiving the selected video that is being streamed and presenting it to the end-user (by creating a ffplay.exe process in the local system)

App GUI Example

Stream Example Snapshot

Project Info/Limitations (as of now)

  • Every app/part of the project is written in a way that its implementation and operation is strictly contained to one class/file.
  • The project assumes that you have FFMPEG installed under /usr/bin/ in Linux.
  • There is no check whether the files inside /raw_videos are actual videos or not.
  • For the RTP/UDP network protocol, the video.sdp file with the essential stream characteristics is located locally inside the project.
  • The video stream might seem like "freezing" after a few tests. This is not the project's fault. FFMPEG is really not that optimised for this kind of tasks.