[FFmpeg-trac] #9126(avformat:new): 404 when playing back DASH

FFmpeg trac at avcodec.org
Thu Feb 25 12:24:33 EET 2021


#9126: 404 when playing back DASH
------------------------------------+------------------------------------
             Reporter:  hjmallon    |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  normal      |                Component:  avformat
              Version:  git-master  |               Resolution:
             Keywords:  dash        |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+------------------------------------

Comment (by hjmallon):

 Is the issue reproducible with current FFmpeg git head, the only version
 supported on this bug tracker?

 I can reproduce it on HEAD (d3d99a0a / "lavc/lscrdec: use
 ff_reget_buffer()").

     Can you provide how to create that mpd or leave the usable mpd url
 here?

 Hmm, the manifest is made by a live video encoder (one of these https
 ://videon-central.com/) so I don't have a web link. With the manifest like
 above the layout of files is:

 - http://192.168.1.18:8080/live/
   - manifest.mpd
   - video/
     - v_34_10000/
       - 1614186048_init.mp4
       - 1614186048_123456.m4s
   - audio/
     - a_35_SAMPLE_RATE_48000/
       - 1614186048_init.mp4
       - 1614186048_123456.m4s

 The 404 is generated when ffprobe looks for
 "http://192.168.1.18:8080/live/v_34_10000/1614186048_init.mp4" (without
 the video/ part).

 I have been able to fix the issue with a patch as follows (I wouldn't say
 I know enough about DASH to say that the patch is correct):

 {{{
 diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
 index b82805c9ce..5abc914c68 100644
 --- a/libavformat/dashdec.c
 +++ b/libavformat/dashdec.c
 @@ -777,14 +777,14 @@ static int resolve_content_path(AVFormatContext *s,
 const char *url, int *max_ur
          size += 2;
      }

 +    memset(tmp_str, 0, strlen(tmp_str));
      for (i = 0; i < n_baseurl_nodes; ++i) {
          if (i == rootId) {
              continue;
          }
          text = xmlNodeGetContent(baseurl_nodes[i]);
          if (text && !av_strstart(text, "/", NULL)) {
 -            memset(tmp_str, 0, strlen(tmp_str));
 -            if (!ishttp(text) && isRootHttp) {
 +            if (!ishttp(tmp_str) && !ishttp(text) && isRootHttp) {
                  av_strlcpy(tmp_str, root_url, size + 1);
              }
              start = (text[0] == token);
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/9126#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list