VideoHelp Forum




+ Reply to Thread
Results 1 to 5 of 5
  1. Member
    Join Date
    Oct 2013
    Location
    brasil
    Search Comp PM
    Hi guys, in Windows10, how can i create a hls file (exporting the corresponding m3u8) from a mkv containing multiple audio tracks and multiple subtitles using FFmpeg ?

    Iīm trying to convert an mkv file to be streamed in hls (packets), but didnīt understood how to do it.

    I have a mkv containing

    a) Video in mp4 format (encoded with h264) to be used/transcoded in several different resolutions 640x480, 960x720 etc (in .ts format)
    b) 2 or more audio tracks (encoded as mp3 format) (The output can be in aac or mp3 work as well on streamings ?)
    c) 2 or more subtitles (built with srt or WebVTT format) The desired output format is webvtt

    I would like to create a playlist in m3u8 containing several small pieces (something around 256 kb each or 6 seconds per chunck) of .ts file that can allow me to stream the video and all itīs multiple audio and multiple subtitles each one on their own subdirectories.

    I tried to follow the commands here : https://kipalog.com/posts/FFMPEG-HLS-STREAM-MULTIPLE-AUDIO-SUBTITLES and here: https://www.martin-riedl.de/2018/08/

    But i didnīt succeed to make it work.

    I tried this command:

    ffmpeg -i teste.mkv -profile:v baseline -level 3.0 -s 640x360 -start_number 0 -hls_time 10 -hls_list_size 0 -f hls index.m3u8

    It did created the ts and vtt files, but, it did not putted the generated files on their own subdirectories, and neither exported the different audio channels (in case, the test.mkv file contains 2 audio tracks and 2 subtitles) as it shows in the zip file as an example on the 1st link.

    How can this be done ?

    Best Regards,

    guga
    Last edited by b2kguga; 29th Apr 2020 at 15:31.
    Quote Quote  
  2. Never tried this, but just looking at what the first guide here's how I see what it does:
    (0) It starts with a file which has:
    1. one HEVC 10bit video stream
    2. one aac LC audio stream
    3. two mov_text subtitle streams
    4. one text subtitle file

    not mentioned anywhere:
    creates a subtitle-, video- and audio-folder

    (1) converts a subtitle file
    1. it uses ffmpeg to convert the first subtitle stream to into VTT subtitle file (sub.vtt)
    2. it uses ffmpeg to create a subtitle/sub.m3u8 an and split the segment the subtitle file into multiple files subtitle/sub-%d.vtt

    (2) converts the audio stream
    1. it uses ffmpeg to create an audio/audio.m3u8 file and segment the audio file into multiple files (audio/audio_%d.aac)

    (3) converts the video
    1. it converts the video to H.264 inside a ts container (check.ts) and passes through the subtitles from the original input
    2. it creates a [B]video[b]/index.m3u8 file (this should have better been named video.m3u8 to avoid confusion and to stick with the previously established naming pattern)

    (4) it shows how a index.m3u8 file (this is not the file created in (3), but a file that has to be manually created should look like.

    Now to your call:
    Code:
    ffmpeg -i teste.mkv -profile:v baseline -level 3.0 -s 640x360 -start_number 0 -hls_time 10 -hls_list_size 0 -f hls index.m3u8
    that call does not correlate to the first guide,...

    Okay, looking at the 'Using FFmpeg as a HLS streaming server (Part 1) – HLS Basics'-guide this is what you did and your output is what the that part of that guide promised.
    The second guide does not create folders etc.
    -> You should re-read the guides and understand them better, especially what is done in each stream an how the two guide relate to one another.


    Cu Selur
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  3. Member
    Join Date
    Oct 2013
    Location
    brasil
    Search Comp PM
    Tks for the answer.

    Iīm new to ffmpeg. I didnīt understood the guide fully to create the folders and insert other audio channels etc. Did you suceeded to create it ? If yes, what are the commands that can be used ?
    Quote Quote  
  4. Sorry, but I have no interest to create such files and thus didn't try it.
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  5. Member
    Join Date
    Oct 2013
    Location
    brasil
    Search Comp PM
    Thanks for answering

    I hope others can help on this because iīm really stuck trying to make it work.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!