Recherche avancée

Médias (2)

Mot : - Tags -/plugins

Autres articles (45)

Sur d’autres sites (7551)

  • Is it real connect subtitles when streaming video (HLS, M3U8)

    12 avril 2019, par Mikhail Petrov

    I am trying to create a stream in which the tracks from the convertible file (in my case .mkv to .m3u8) will be played through m3u8. At the moment, it turns out to switch between multiple resolutions, and even select the audio track, but does not see the subtitles at all.

    Video works, audio tracks are switched, but no subtitles are visible at all

    ffprobe source file :
    https://paste2.org/czUePDPj

    Next, perform coding and splitting into tracks :

    ffmpeg -i '/home/mishkapetran/Загрузки/Rick.mkv' \
    -map 0:v:0 -c:v libx264 -profile:v baseline -preset:v superfast -strict -2 -s 426x240   -f hls -hls_time 10 -hls_list_size 0 -segment_list rick240p -hls_segment_filename '/home/mishkapetran/Загрузки/test/Rick240p_%d.ts'      '/home/mishkapetran/Загрузки/test/Rick240p.m3u8' \
    -map 0:a:0 -c:a aac                             -f hls -hls_time 10 -hls_list_size 0 -segment_list rick_ru -hls_segment_filename '/home/mishkapetran/Загрузки/test/RickTrack_ru_%d.aac'        '/home/mishkapetran/Загрузки/test/RickTrack_ru.m3u8' \
    -map 0:a:1 -c:a aac                             -f hls -hls_time 10 -hls_list_size 0 -segment_list rick_en -hls_segment_filename '/home/mishkapetran/Загрузки/test/RickTrack_en_%d.aac'        '/home/mishkapetran/Загрузки/test/RickTrack_en.m3u8' \
    -map 0:s:0 suben.vtt                          -f hls -hls_time 10 -hls_list_size 0 -segment_list en -hls_segment_filename '/home/mishkapetran/Загрузки/test/sub_en_%d.vtt'  '/home/mishkapetran/Загрузки/test/sub_en.m3u8' \
    -map 0:s:1 subru.vtt                          -f hls -hls_time 10 -hls_list_size 0 -segment_list ru -hls_segment_filename '/home/mishkapetran/Загрузки/test/sub_ru_%d.vtt'  '/home/mishkapetran/Загрузки/test/sub_ru.m3u8'

    Then in the same folder I create the m3u8 master :

    #EXTM3U
    #EXT-X-VERSION:5
    #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",NAME="Russian",LANGUAGE="ru",AUTOSELECT=YES,URI="RickTrack_ru.m3u8"
    #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",NAME="English",LANGUAGE="en",AUTOSELECT=NO,URI="RickTrack_en.m3u8"

    #EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Russian",DEFAULT=YES,FORCED=NO,AUTOSELECT=YES,LANGUAGE="ru",URI="sub_ru.m3u8"
    #EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English",DEFAULT=NO,FORCED=NO,AUTOSELECT=YES,LANGUAGE="en",URI="sub_en.m3u8"

    #EXT-X-STREAM-INF:BANDWIDTH=928000,CODECS="avc1.42c00d,mp4a.40.2",RESOLUTION=480x270,AUDIO="audio",SUBTITLES="subs"
    Rick240p.m3u8
  • Stream real-time video flux in HTML video tag

    26 septembre 2018, par c.censier

    I want to stream a real-time video flux that come from udp into a HTML video tag.
    I made some research but I got a lot of informations and I struggle to have a clear overview of what I can do and what I can’t.

    The video flux use H.264 and AAC codecs, MP4 container and has a 3840x2160 (4K) resolution. I’d like to play it on Chrome (latest version).

    As I understand from now, HTML video tag can natively read H.264/AAC videos. I made it work with the video direclty on my server (I’m using Meteor JS + React).

    I learnt to use FFmpeg to stream an udp flux read by VLC player, and then I used FFserver (I know it’s deprecated) to create an HTTP flux also read by VLC but not by the HTML video tag.

    So... my question is : is HTML video can natively read video stream from HTTP ?

    I’ve seen a lot of discussions about HLS and DASH, but I didn’t understand if (and why) they’re mandatory.

    I read a post about someone creating a HLS m3u8 using only FFmpeg, is it a viable solution ?

    FFserver configuration

    HTTPPort                        8090
    HTTPBindAddress                 0.0.0.0
    MaxHTTPConnections              20
    MaxClients                      10
    MaxBandwidth                    100000

    <feed>
     File                          /tmp/feed.ffm
     FileMaxSize                   1g
     ACL allow                     127.0.0.1
    </feed>

    <stream>
     Feed                          feed.ffm
     Format                        mpeg
     AudioCodec                    aac
     AudioBitRate                  256
     AudioChannels                 1
     VideoCodec                    libx264
     VideoBitRate                  10000      // Total random here
     VideoBitRateRange             5000-15000 // And here...
     VideoFrameRate                30
     VideoQMin                     1
     VideoQMax                     50
     VideoSize                     3840x2160
     VideoBufferSize               20000      // Not sure either
     AVOptionVideo                 flags +global_header
    </stream>

    I had to specify QMin and QMax to avoid error message but I don’t really understand what is it.

    FFmpeg command line

    ffmpeg -re -i bbb_sunflower_2160p_30fps_normal.mp4 -strict -2 -r 30 -vcodec libx264 http://localhost:8090/feed.ffm

    This work with VLC. I’m working with a file on my computer before moving to an udp stream.

  • Technology used in modern video editors to show the video preview in real time instantly

    4 août 2024, par shashwat bajpai

    Can anyone tell me about the technology used in modern video editors like : veed.io , canva etc which display the changes applied on the video in realtime , eg : Like applying transitions on a video , adding audio on the video .

    &#xA;

    Like right now in my video editor I am using FFMPEG AND WASM and it takes a decent amount of time to apply these effects and display the preview.

    &#xA;