Find Jobs
Hire Freelancers

ffmpeg HLS stream packaging script (bash or python)

€250-750 EUR

Completed
Posted almost 3 years ago

€250-750 EUR

Paid on delivery
Hello, I need a feature extension of my bash script which I use to create HLS (http-live-stream) streams using ffmpeg. At the current state the script is only able to output a single subtitle and single audio track beside the video even if the source has multiple audio/subtitle languages or channels. So far so good ... What I need is a script that simply processes all subtitle and all audio track from my mp4 input, creating a playlist m3u8+snippets for each stream. In the end all generated m3u8 files (one for each stream) must be referenced in a master m3u8 playlist file so that the user can simply select a track to play using [login to view URL] or shaka-player. From my understanding the workflow is straight forward and all can be done using ffmepg/ffprobe: 1. Create a HLS stream only for the video inside the mp4. 2. For each audio track within the mp4 container found create a HLS stream accordingly. 3. For each subtitle track within the mp4 container found create a HLS stream accordingly. Each of the steps (1-3) will output many snippets in .m4s format and each step will generate a single m3u8 file that references these generated m4s and webvtt snippets. If all that is done, the generated m3u8 playlists (one for each stream as explained above) need to be referenced in a master m3u8 file. Please see my current work attached. _______________________________________________ Detailed Requirements: The script can be written either as a single python function or a bash script (Python is prefered as it will be used inside celery as a task) ---- Video Stream (Single - No Adaptive Streaming needed): 1. HLS video output must be in .m4s format (fragmented mp4 format) 2. HLS video output must have the same resolution and bitrate as mp4 input (Passtrough). 3. HLS video output format must be in the same codec as the input (h264 or libx265) as we also process 10-bit footage. Simply keep the codec of the file input as long as it is h264/h265 otherwise convert it. Audio Streams (Multiple): 1. All Audio languages need to be processed (ffprobe can be used for parsing) 2. If Audio Language source is available in 5.1 Dolby Surround process only Dolby 5.1 Surround (AC3/E-AC3). Otherwise use AAC/HE-AAC Stereo. 3. A max Bitrate of 384 kbps is allowed for 5.1 Dolby Surround (Check Source Bitrate). 4. A max Bitrate of 256 kbps is allowed for Stereo (Check Source Bitrate). Subtitle Streams (Multiple): 1. All Subtitle languages need to be processed (Source always comes as tx3g embedded with proper Meta inside the mp4). 2. Output format must be WebVTT (ffmpeg default) Playlist (.m3u8) Processing: - Each tracks found inside the mp4 file (Video, Audio, Subtitle) must be processed as a single stream with a dedicated m3u8 playlist file and m4s/webvtt snippeds. - After all tracks have been processed, create a master .m3u8 playlist file and reference all other m3u8 files within that master playlist file.
Project ID: 30942331

About the project

3 proposals
Remote project
Active 3 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hello, I'm used to working with FFmpeg to package HLS streams. I can extend your script or create a new one in Python to package the video+audio+subtitles. I am able to create a multi-audio & multi-subtitle master playlist, that will be made of one sub playlist per stream. The script would also perform the mentioned checks (bitrate, codec ...) I would be pleased to discuss your projects in more detail, Looking forward to hearing from you, Antoine CAMUSAT
€300 EUR in 7 days
5.0 (2 reviews)
3.7
3.7
3 freelancers are bidding on average €350 EUR for this job
User Avatar
Hi, i understood your project details very well and i can finish the same in your timeline. come over chat to further discuss
€250 EUR in 7 days
4.7 (2 reviews)
1.9
1.9

About the client

Flag of GERMANY
Aachen, Germany
0.0
0
Member since Aug 10, 2019

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759) & Freelancer Online India Private Limited (CIN U93000HR2011FTC043854)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.