[FFmpeg-trac] #7975(avformat:new): HLS HTTP PUT fails with http_persistent and connection closed

FFmpeg trac at avcodec.org
Fri Jun 28 12:05:12 EEST 2019


#7975: HLS HTTP PUT fails with http_persistent and connection closed
------------------------------------+------------------------------------
             Reporter:  ianklassen  |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  normal      |                Component:  avformat
              Version:  git-master  |               Resolution:
             Keywords:  hls http    |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+------------------------------------

Comment (by stevenliu):

 Works for me.

 command line and output message:
 {{{
 muhanmodemaimaitiliuqideMacBook:dash StevenLiu$ .//ffmpeg -report -re -i
 ~/Movies/objectC/facebook.mp4 -acodec copy -vcodec copy -g 60 -hls_flags
 +append_list -hls_list_size 0 -hls_playlist_type event -hls_time 6
 -keyint_min 60 -method PUT -http_persistent 1 -sc_threshold 0
 http://127.0.0.1/stream.m3u8
 ffmpeg started on 2019-06-28 at 17:01:56
 Report written to "ffmpeg-20190628-170156.log"
 ffmpeg version N-94129-g098ab93257 Copyright (c) 2000-2019 the FFmpeg
 developers
   built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
   configuration: --enable-libass --enable-opengl --enable-libx264
 --enable-libmp3lame --enable-gpl --enable-nonfree --prefix=/usr/local
 --enable-libtesseract --enable-libspeex --enable-libfreetype --enable-
 libfontconfig --enable-libfdk-aac --enable-videotoolbox --enable-libxml2
 --enable-librsvg --enable-libvmaf --enable-version3 --disable-stripping
 --disable-optimizations
   libavutil      56. 29.100 / 56. 29.100
   libavcodec     58. 53.100 / 58. 53.100
   libavformat    58. 28.101 / 58. 28.101
   libavdevice    58.  7.100 / 58.  7.100
   libavfilter     7. 55.100 /  7. 55.100
   libswscale      5.  4.101 /  5.  4.101
   libswresample   3.  4.100 /  3.  4.100
   libpostproc    55.  4.100 / 55.  4.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
 '/Users/StevenLiu/Movies/objectC/facebook.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     encoder         : Lavf55.22.102
     description     : This File is Created by Easy RealMedia Tools@!
   Duration: 02:00:27.85, start: 0.000000, bitrate: 893 kb/s
     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
 640x480, 797 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
     Metadata:
       handler_name    : VideoHandler
     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz,
 stereo, fltp, 87 kb/s (default)
     Metadata:
       handler_name    : SoundHandler
 [http @ 0x7f979ce5dd00] HTTP error 404 Not Found
 [hls @ 0x7f979e00fa00] Opening 'http://127.0.0.1/stream0.ts' for writing
 Output #0, hls, to 'http://127.0.0.1/stream.m3u8':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     description     : This File is Created by Easy RealMedia Tools@!
     encoder         : Lavf58.28.101
     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
 640x480, q=2-31, 797 kb/s, 25 fps, 25 tbr, 90k tbn, 25 tbc (default)
     Metadata:
       handler_name    : VideoHandler
     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz,
 stereo, fltp, 87 kb/s (default)
     Metadata:
       handler_name    : SoundHandler
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:1 -> #0:1 (copy)
 Press [q] to stop, [?] for help
 [http @ 0x7f979e011200] Opening 'http://127.0.0.1/stream1.ts' for writing
 1x
 [http @ 0x7f979e011200] Opening 'http://127.0.0.1/stream2.ts' for writing
 1x
 [http @ 0x7f979e804e00] Opening 'http://127.0.0.1/stream.m3u8' for writing
 [http @ 0x7f979e011200] Opening 'http://127.0.0.1/stream3.ts' for writing
 1x
 [http @ 0x7f979e804e00] Opening 'http://127.0.0.1/stream.m3u8' for writing
 [http @ 0x7f979e011200] Opening 'http://127.0.0.1/stream4.ts' for writing
 1x
 [http @ 0x7f979e804e00] Opening 'http://127.0.0.1/stream.m3u8' for writing
 [http @ 0x7f979e011200] Opening 'http://127.0.0.1/stream5.ts' for writing
 1x
 [http @ 0x7f979e804e00] Opening 'http://127.0.0.1/stream.m3u8' for writing
 [http @ 0x7f979e804e00] Opening 'http://127.0.0.1/stream.m3u8' for
 writing1x
 frame= 1028 fps= 25 q=-1.0 Lsize=N/A time=00:00:41.04 bitrate=N/A speed=
 1x
 video:3960kB audio:441kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 }}}

 result:

 {{{
 muhanmodemaimaitiliuqideMacBook:dash StevenLiu$ ls
 /usr/local/nginx/html/stream*
 /usr/local/nginx/html/stream.m3u8 /usr/local/nginx/html/stream1.ts
 /usr/local/nginx/html/stream3.ts  /usr/local/nginx/html/stream5.ts
 /usr/local/nginx/html/stream0.ts  /usr/local/nginx/html/stream2.ts
 /usr/local/nginx/html/stream4.ts
 muhanmodemaimaitiliuqideMacBook:dash StevenLiu$
 }}}


 nginx config file:
 {{{
 muhanmodemaimaitiliuqideMacBook:dash StevenLiu$ cat
 /usr/local/nginx/conf/nginx.conf

 #user  nobody;
 worker_processes  1;

 error_log  logs/error.log;
 #error_log  logs/error.log  notice;
 #error_log  logs/error.log  info;

 #pid        logs/nginx.pid;


 events {
     worker_connections  1024;
 }


 http {
     include       mime.types;
     default_type  application/octet-stream;
     sendfile        on;
     keepalive_timeout  65;
     client_max_body_size 20M;

     server {
         listen       80;
         server_name  localhost;
         location / {
             root   html;
             dav_methods PUT DELETE MKCOL;

             create_full_put_path  on;
             dav_access            all:rw;

             index  index.html index.htm;
         }
     }
 }
 muhanmodemaimaitiliuqideMacBook:dash StevenLiu$
 }}}

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


More information about the FFmpeg-trac mailing list