How to use dash format (not webm_dash_manifest!) In ffmpeg?

FFmpeg has a dash format:

> ffmpeg -formats
...
  E dash            DASH Muxer
...

This seems to match the code in libavformat / dashenc.c.

I can find several articles on the Internet on how to use the WebM DASH Manifest format, but nothing in common with this other DASH format.

Can someone point me to documentation or examples that use "DASH Muxer" either from the command line or from the API?

+4
source share
3 answers

ffmpeg . , . .mpd, ( Range: DASH ). :

  • window_size: ,
  • extra_window_size: , ,
  • min_seg_duration: ( )
  • remove_at_exit:
  • use_template: SegmentTemplate SegmentList
  • use_timeline: SegmentTimeline SegmentTemplate
  • single_file: , .
  • single_file_name: DASH, baseURL. , .
  • init_seg_name: DASH, , - init-stream $RepresentationID $.m4s
  • media_seg_name: DASH, , - chunk-stream $RepresentationID $- $Number% 05d $.m4s

- , 4 , , , :

ffmpeg -i /dev/dvb/adapter0/dvr0 -vf yadif=0 -r 25 -vcodec libx264 -keyint_min 0 -g 100 -b:v 1000k -ac 2 -strict 2 -acodec aac -ab 64k -map 0:v -map 0:a -f dash -min_seg_duration 4000 -use_template 1 -use_timeline 0 -init_seg_name init-\$RepresentationID\$.mp4 -media_seg_name test-\$RepresentationID\$-\$Number\$.mp4 test.mpd

:

<?xml version="1.0" encoding="utf-8"?>
<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="urn:mpeg:dash:schema:mpd:2011"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd"
    profiles="urn:mpeg:dash:profile:isoff-live:2011"
    type="dynamic"
    minimumUpdatePeriod="PT500S"
    suggestedPresentationDelay="PT4S"
    availabilityStartTime="2016-12-09T10:11:16"
    publishTime="2016-12-09T10:13:53"
    minBufferTime="PT4.0S">
  <ProgramInformation>
  </ProgramInformation>
  <Period start="PT0.0S">
        <AdaptationSet contentType="video" segmentAlignment="true" bitstreamSwitching="true" frameRate="25/1">
        <Representation id="0" mimeType="video/mp4" codecs="avc1.64001e" bandwidth="1000000" width="720" height="576" frameRate="25/1">
            <SegmentTemplate timescale="1000000" duration="4000000" initialization="init-$RepresentationID$.mp4" media="test-$RepresentationID$-$Number%05d$.mp4" startNumber="1">
            </SegmentTemplate>
        </Representation>
    </AdaptationSet>
    <AdaptationSet contentType="audio" segmentAlignment="true" bitstreamSwitching="true">
        <Representation id="1" mimeType="audio/mp4" codecs="mp4a.40.2" bandwidth="64000" audioSamplingRate="48000">
            <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2" />
            <SegmentTemplate timescale="1000000" duration="4000000" initialization="init-$RepresentationID$.mp4" media="test-$RepresentationID$-$Number$.mp4" startNumber="1">
            </SegmentTemplate>
        </Representation>
    </AdaptationSet>
  </Period>
</MPD>

ExoPlayer Android. , -, DASH . VOD (. DASH). ExoPlayer Android, .

+4

@Jeroen answer.

Windows, , ffmpeg , :

ffmpeg -i [INPUT] -f dash [OPTIONS] C:\your\output\directory/test.mpd

ffmpeg /

0

:

  • utc_timing_url: URL- , UTC ISO
  • : HTTP
  • http_user_agent: User-Agent HTTP
  • http_persistent: HTTP-
  • hls_playlist: HLS (master.m3u8, media_% d.m3u8)
  • streaming: enable / disable streaming output mode. Each frame will be a foof fragment
  • timeout: set timeout for socket I / O
0
source

Source: https://habr.com/ru/post/1657783/


All Articles