Skip to content

menezes02/flayp-streaming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flayp Streaming

Flayp Streaming is a lightweight digital signage project built around FFmpeg and Docker to process and deliver media in a simple, reliable, and deployment-friendly Linux environment.

It reflects real deployment work and a practical infrastructure approach focused on stability, portability, and operational simplicity rather than tutorial-only code.

Demo included in the repository:

At A Glance

# image -> mp4 -> transport stream -> dockerized multicast
./scripts/generate-ts.sh image assets/source.jpg
./scripts/run-stream.sh
docker stats flayp-streaming

Outputs:

  • output/from-image.mp4
  • output/loop.ts
  • UDP multicast stream on 239.10.10.11:1234

Real Command Example

Convert a single image into MP4:

./scripts/image-to-video.sh assets/source.jpg output/from-image.mp4 3

Example result:

frame=   75 fps= 53 q=-1.0 Lsize=      72kB time=00:00:02.88 bitrate= 203.9kbits/s speed=2.02x
Created /home/felipe/Desktop/flayp-streaming/output/from-image.mp4

Generated file:

$ ls -lh output
total 72K
-rw-rw-r-- 1 felipe felipe 72K Mar 26 17:07 from-image.mp4

Project Summary

Flayp Streaming packages media preparation and delivery into a small, repeatable Linux workflow. It uses FFmpeg to convert image or video assets into a loop-friendly transport stream and runs the stream inside Docker for simple deployment, predictable behavior, and low operational overhead.

Supported Media

Flayp Streaming supports both:

  • Still images such as JPG and PNG.
  • Video files such as MP4.

An image can be converted into a short MP4 and then processed into the final transport-stream output. A video can go directly through the transport-stream generation workflow.

Architecture

flowchart LR
    A[Source Media<br/>Image or MP4] --> B[FFmpeg Processing<br/>Create loopable media]
    B --> C[output/loop.ts<br/>MPEG-TS file]
    C --> D[Docker Container<br/>FFmpeg runtime]
    D --> E[UDP Multicast<br/>239.10.10.11:1234]
    E --> F[Signage Player<br/>Screen or Endpoint]
Loading

Recruiter Highlights

  • Built a lightweight media delivery workflow using Docker, FFmpeg, and Linux shell automation.
  • Structured the project around repeatable deployment, predictable runtime behavior, and operational simplicity.
  • Demonstrates practical infrastructure thinking across media processing, containerization, and service execution.

Client Value

Flayp Streaming is designed around a straightforward business need: deliver media reliably with minimal setup complexity. It reduces deployment friction by packaging the runtime inside Docker and keeps maintenance simple by separating media preparation from streaming.

Use Cases

  • Digital signage deployments that need simple media playback pipelines.
  • Internal display systems for offices, retail spaces, hospitality, or reception screens.
  • Lightweight streaming environments where easy rollout and low maintenance matter.
  • Controlled Linux-based media delivery setups for testing, demos, or operational displays.

Project Structure

flayp-streaming/
├── assets/
│   └── source.jpg
├── scripts/
│   ├── generate-ts.sh
│   ├── image-to-video.sh
│   └── run-stream.sh
├── docker-compose.yml
├── streampromo.webm
└── README.md

Key files:

  • scripts/generate-ts.sh: builds output/loop.ts from image or video input
  • scripts/image-to-video.sh: creates an MP4 from a single image
  • scripts/run-stream.sh: runs the Docker container and starts the multicast stream
  • docker-compose.yml: Compose-based runtime alternative

Show It Working

Prepare and start the stream:

./scripts/generate-ts.sh image assets/source.jpg
./scripts/run-stream.sh

Verify the container:

docker ps --filter name=flayp-streaming
docker stats flayp-streaming
docker logs -f --tail 30 flayp-streaming

Typical verification flow:

$ docker ps --filter name=flayp-streaming
$ docker stats flayp-streaming
$ docker logs -f --tail 30 flayp-streaming

Typical generated files:

output/
├── from-image.mp4
└── loop.ts

Typical runtime target:

udp://239.10.10.11:1234?pkt_size=1316

Change The Image

If you want to stream a different image:

  1. Replace assets/source.jpg with your own image.
  2. Run:
./scripts/generate-ts.sh image assets/source.jpg
./scripts/run-stream.sh

In image mode, the script now performs two steps automatically:

  1. Convert the image into output/from-image.mp4.
  2. Convert that MP4 into output/loop.ts.

The container does not read the image directly. It reads the generated transport-stream file. The workflow is:

  1. Change the source image.
  2. Regenerate the MP4 and TS outputs.
  3. Restart the streaming container.

Change To A Video Instead

If you want to use an MP4 instead of a still image:

./scripts/generate-ts.sh video assets/source.mp4
./scripts/run-stream.sh

Create A Video From A Single Image

Yes. A single image can be turned into a standard MP4 file, then streamed like any other video source.

Use the helper script:

./scripts/image-to-video.sh assets/source.jpg output/from-image.mp4 10

This creates a 10-second MP4 from one image.

Example:

ffmpeg -y \
  -loop 1 \
  -i assets/source.jpg \
  -t 10 \
  -vf "scale=1280:720,fps=25,format=yuv420p" \
  -c:v libx264 \
  -preset veryfast \
  output/from-image.mp4

What this does:

  • -loop 1 repeats the image as video frames.
  • -t 10 makes the output video 10 seconds long.
  • scale=1280:720,fps=25,format=yuv420p makes the file more compatible for playback and streaming.
  • libx264 creates a standard H.264 MP4 file.

After that, you can stream the MP4 through this project:

./scripts/generate-ts.sh video output/from-image.mp4
./scripts/run-stream.sh

Default Stream Settings

  • Multicast IP: 239.10.10.11
  • UDP port: 1234
  • Packet size: 1316
  • Resolution: 1280x720
  • Frame rate: 25 fps
  • Video codec: libx264

These defaults match the final remote setup more closely than the older experiments in shell history.

Requirements

  • Docker
  • FFmpeg on the host

Quick Start

mkdir -p output
./scripts/generate-ts.sh image assets/source.jpg
./scripts/run-stream.sh

If you want to build the intermediate MP4 yourself first:

./scripts/image-to-video.sh assets/source.jpg output/from-image.mp4 10
./scripts/generate-ts.sh video output/from-image.mp4
./scripts/run-stream.sh

To stop the stream:

docker rm -f flayp-streaming

About

Lightweight digital signage with FFmpeg and Docker, built for reliable media processing and simple deployment in real-world Linux environments.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages