Skip to main content

Service to stream mp4 files in fragments

Project description

Fragmented mp4stream Package

Usage

import fragmentedmp4stream.service
import sys

def main(argv):
    fragmentedmp4stream.service.start(argv)

if __name__ == "__main__":
    main(sys.argv[1:])

videocodec support

  • h264
  • h265

parameters

  • -p(--port) port to bind(def. 4555)
  • -r(--root) files directory(required) - path to seek required mp4 file
  • -s(--segment) segment duration sec.(def. 6) - floor limit of segment duration
  • -c(--cache) cache segmentation - save segmentation as .*.cache files
  • -v(--verb) be verbose (show structure of required mp4 file)
  • -h(--help) this help

installation

pip install fragmented-mp4stream-pkg==0.0.3

subtitles

  • Innner subtitles: track handler=text, type=tx3g. Verified with MPlayer.
  • Outer subtitles:
    • master playlist: m3u8-file - ex.
    #EXTM3U
    #EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English",DEFAULT=NO,FORCED=NO,URI="http://mkh-Aspire-A315-54K:4555/toystory20sub.m3u8"
    #EXT-X-STREAM-INF:PROGRAM-ID=1,SUBTITLES="subs"
    http://mkh-Aspire-A315-54K:4555/toystory20.m3u8
    
    • subtitles playlist: m3u8-file - ex. toystory20sub.m3u8
      #EXTM3U
      #EXT-X-PLAYLIST-TYPE:VOD
      #EXT-X-MEDIA-SEQUENCE:0
      #EXT-X-TARGETDURATION:8
      #EXTINF:4.0107,
      http://mkh-Aspire-A315-54K:4555/toystory20.vtt
    
    • webVTT subtitles: vtt-files - ex. toystory20.vtt
      WEBVTT
      
      00:00:02.829 --> 00:00:4.829 line:74% align:left
      <i>subtitles example.</i>
      

streams

  • json list of available files

    http://ip:port/

  • fragmented mp4

    http://ip:port/filename_without_extension

  • hls container with fragmented mp4

    http://ip:port/filename_with_m3u_extension

example1

  • service
    • python3 mp4stream.py -r ~/video/
  • client

example2

example3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fragmented-mp4stream-pkg-0.0.3.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fragmented_mp4stream_pkg-0.0.3-py3-none-any.whl (30.6 kB view details)

Uploaded Python 3

File details

Details for the file fragmented-mp4stream-pkg-0.0.3.tar.gz.

File metadata

  • Download URL: fragmented-mp4stream-pkg-0.0.3.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

File hashes

Hashes for fragmented-mp4stream-pkg-0.0.3.tar.gz
Algorithm Hash digest
SHA256 f250c1355c03ffc6cc9e353a21c6c7a5e73c968b37546bc9ddd1f3bc4058aca5
MD5 9df978533df2fbba3220fad4c094f343
BLAKE2b-256 1922a2e9354538a0db4c71511972bc37e67174c38e992b43e571641b500f51ce

See more details on using hashes here.

File details

Details for the file fragmented_mp4stream_pkg-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: fragmented_mp4stream_pkg-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 30.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

File hashes

Hashes for fragmented_mp4stream_pkg-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 88c8dad3a7897da14b5e1341dd506b72df695119d82465800a1bf1014608acfa
MD5 ae1b95c9c014aac1c5bf41ec3a78cfb8
BLAKE2b-256 e4a8b35b22aa3865739dfecf040dbb26725de2cb10a6d46fcfdb487d960458db

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page