Generate individual HLS-compatible .ts segments on-demand by downloading as little bytes as possible from a remote input file

Closed

I’m trying to generate individual HLS-compatible .ts segments on-demand by downloading/reading as little bytes as possible from a remote input file (hosted on a server supporting byte-ranges requests).

One of the application for this would be to be able to transcode and play on Apple TV (via Airplay) a remote file that is not Airplay compatible, without having to download the entire file first.

I am generating the playlist myself, and I have access to the ffprobe results for the remote file (that gives video duration, etc.).

I have something working that plays via Airplay but with small video and audio glitches between each segments when I use the following command to generate each segment:

ffmpeg -ss 30 -t 6 -i [url removed, login to view] -f mpegts -map 0:v:0 -map 0:a:0 -c:v libx264 -bsf:v h264_mp4toannexb -force_key_frames "expr:gte(t,n_forced*6)" -forced-idr 1 -pix_fmt yuv420p -colorspace bt709 -c:a aac -async 1 -preset ultrafast pipe:1

Note: above command is for segment [url removed, login to view], and in the m3u8 playlist I advertise each segment duration as 6 seconds.

Here is a Youtube video showing the audio/video glitches between segments:

[url removed, login to view]

The segment or hls modules of ffmpeg can’t be used because they both generate all the segments at once.

I’ve been struggling on this for some days now and I would really appreciate some help!

PS: As I'm not sure about what's the best solution to accomplish this, I would be happy to discuss the task ahead and the amount of work this would require.

Skills: Video Services

See more: perl script retrieve remote file, file input box multiple select php, read id3 tag remote file php, sql file input read, file input output programs visual basic, warning simplexml load file input proper utf, perl check remote file system, simplexml load file input proper utf, excel file input, php parsing remote file, file input internet transfer control http, remote file inclusion launcher, read id3 tags remote file, file input struct, php id3 remote file

Project ID: #12243303

2 freelancers are bidding on average $46/hour for this job

prashushinde9

Hello, We have accomplished 90% of the project which is similar of your requirement. All we need 10% customization as per your requirement set and specifications. I want to discuss in personal chat in order to explore More

$51 USD / hour
(0 Reviews)
0.0
$41 USD / hour
(0 Reviews)
0.0
WebGolden

Hello, EXPERTISE FOR HLS COMPATIBLE TS SEGMENTS ON DEMAND BY DOWLOADING AS BYTES FROM REMOTE INPUTE FILE.. I have seen your requirement and telling you that we have resources for this kind of requirement. For ou More

$26 USD / hour
(0 Reviews)
0.0