Newest 'ffmpeg' Questions - Stack Overflow

http://stackoverflow.com/questions/tagged/ffmpeg

Les articles publiés sur le site

  • Setting dynamic watermark in to the video using ffmpeg Android

    7 juin 2016, par Arslan Ahmad

    I am using this command to overlay the image into the video.

    ffmpeg",i", inputVideoPath,"-i", imageToOverlay,"
    -filter_complex",overlay=10:10","-strict", "-2","-b:a" ,"32k",
    "-r","15","-preset", "ultrafast",outputVideoPath
    

    Can we set the dynamic values into the "overlay=x:y" also "imageToOverlay" which is image path?

  • FFMPEG : Adding font to Video gives error

    7 juin 2016, par janki gadhiya

    I am trying to execute ffmpeg on android. I have successfully executed 2-3 commands also. But i am stuck at one point where i am adding text to the video.

    Here is the command i am executing.

    NOT WORKING : because the text argument has a space between two words.

    "-i "+path+"out.mp4 -vf drawtext=fontfile="+path+"f1.ttf:text='Stack OverFlow' -y -c:v libx264 -c:a copy -movflags +faststart "+path+"output.mp4"
    

    WORKING : just removed space.

    "-i "+path+"out.mp4 -vf drawtext=fontfile="+path+"f1.ttf:text='StackOverFlow' -y -c:v libx264 -c:a copy -movflags +faststart "+path+"output.mp4"
    

    Here path contains my external Sd card's path. out.mp4 and f1.ttf exists in my folder.

    My Question is why it is not working with space.

    Here is the stack trace i am getting.

    FAILED with output : WARNING: linker: /data/data/com.github.hiteshsondhi88.sampleffmpeg/files/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
    ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
    built with gcc 4.8 (GCC)
    configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/i686-linux-android- --arch=x86 --cpu=i686 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/x86 --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all -march=i686' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
    libavutil      55. 17.103 / 55. 17.103
    libavcodec     57. 24.102 / 57. 24.102
    libavformat    57. 25.100 / 57. 25.100
    libavdevice    57.  0.101 / 57.  0.101
    libavfilter     6. 31.100 /  6. 31.100
    libswscale      4.  0.100 /  4.  0.100
    libswresample   2.  0.101 /  2.  0.101
    libpostproc    54.  0.100 / 54.  0.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Testing/out.mp4':
    Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.25.100
    Duration: 00:00:05.00, start: 0.000000, bitrate: 117 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 300x300 [SAR 40:33 DAR 40:33], 113 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
    handler_name    : VideoHandler
    [NULL @ 0xb585f000] Unable to find a suitable output format for 'text='Stack'
    text='Stack: Invalid argument
    

    Why it is saying invalid argument. It will be great if any ffmpeg expert can guide me in what i am doing wrong here.

    I have refered this Question of SO : Text on video ffmpeg

  • Converting mkv to mp4 using avconv with given set of configuration

    7 juin 2016, par Ankit Dhanna

    I have an mkv video and I want to convert it into mp4 but when I do so using avconv command, it loses its quality.

    avconv -i source.mkv -vcodec libx264 -acodec libvo_aacenc -b:a 92k destination.mp4
    

    I want that my mp4 file should have the following characteristics:

    Stream #0.0: Video: libvpx, yuv420p, 640x480 [PAR 1:1 DAR 4:3], q=2-31, 90k tbn, 1k tbc
    Stream #0.1: Audio: pcm_mulaw, 8000 Hz, 1 channels, 64 kb/s
    

    How can I achieve that ?

    I tried avconv -i input.mkv -codec copy output.mp4 But it says " Could not write header for output file #0 (incorrect codec parameters ?"

    Please help guys .. thanks

  • Encoder (codec png) not found for output stream #0:0 [duplicate]

    7 juin 2016, par Anubhav Dhawan

    This question already has an answer here:

    I'm trying to create a NodeJS app that converts a video into a GIF image.

    I'm using node-gify plugin for this purpose, which uses FFmpeg and GraphicsMagick.

    Here's my sample code:

    var gify = require('./');
    var http = require('http');
    var fs = require('fs');
    
    var opts = {
      height: 300,
      rate: 10
    };
    
    console.time('convert');
    gify('out.mp4', 'out.gif', opts, function(err) {
      if (err) throw err;
      console.timeEnd('convert');
      var s = fs.statSync('out.gif');
      console.log('size: %smb', s.size / 1024 / 1024 | 0);
    });
    

    And here's my console error:

    > gify@0.2.0 start /home/daffodil/repos/node-gify-master
    > node example.js
    
    /home/daffodil/repos/node-gify-master/example.js:24
      if (err) throw err;
               ^
    
    Error: Command failed: /bin/sh -c ffmpeg -i out.mp4 -filter:v scale=-1:300 -r 10 /tmp/IP5OXJZELd/%04d.png
    ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers
      built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
      configuration: --disable-yasm
      libavutil      55. 17.103 / 55. 17.103
      libavcodec     57. 24.102 / 57. 24.102
      libavformat    57. 25.100 / 57. 25.100
      libavdevice    57.  0.101 / 57.  0.101
      libavfilter     6. 31.100 /  6. 31.100
      libswscale      4.  0.100 /  4.  0.100
      libswresample   2.  0.101 /  2.  0.101
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
      Metadata:
        major_brand     : mp42
        minor_version   : 1
        compatible_brands: mp42mp41
        creation_time   : 2005-02-25 02:35:57
      Duration: 00:01:10.00, start: 0.000000, bitrate: 106 kb/s
        Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 8000 Hz, stereo, fltp, 19 kb/s (default)
        Metadata:
          creation_time   : 2005-02-25 02:35:57
          handler_name    : Apple Sound Media Handler
        Stream #0:1(eng): Video: mpeg4 (Advanced Simple Profile) (mp4v / 0x7634706D), yuv420p, 192x242 [SAR 1:1 DAR 96:121], 76 kb/s, 15 fps, 15 tbr, 600 tbn, 1k tbc (default)
        Metadata:
          creation_time   : 2005-02-25 02:35:57
          handler_name    : Apple Video Media Handler
        Stream #0:2(eng): Data: none (rtp  / 0x20707472), 4 kb/s (default)
        Metadata:
          creation_time   : 2005-02-25 02:35:57
          handler_name    : hint media handler
        Stream #0:3(eng): Data: none (rtp  / 0x20707472), 3 kb/s (default)
        Metadata:
          creation_time   : 2005-02-25 02:35:57
          handler_name    : hint media handler
    Output #0, image2, to '/tmp/IP5OXJZELd/%04d.png':
      Metadata:
        major_brand     : mp42
        minor_version   : 1
        compatible_brands: mp42mp41
        Stream #0:0(eng): Video: png, none, q=2-31, 128 kb/s (default)
        Metadata:
          creation_time   : 2005-02-25 02:35:57
          handler_name    : Apple Video Media Handler
    Stream mapping:
      Stream #0:1 -> #0:0 (mpeg4 (native) -> ? (?))
    Encoder (codec png) not found for output stream #0:0
    
        at ChildProcess.exithandler (child_process.js:213:12)
        at emitTwo (events.js:100:13)
        at ChildProcess.emit (events.js:185:7)
        at maybeClose (internal/child_process.js:827:16)
        at Socket. (internal/child_process.js:319:11)
        at emitOne (events.js:90:13)
        at Socket.emit (events.js:182:7)
        at Pipe._onclose (net.js:471:12)
    

    PS: I had a couple of problems installing FFmpeg on my Ubuntu 14.04.

    • First, FFmpeg is removed from Ubuntu 14.04 (legal issues AFAIK). But I managed to apt-get it through this.
    • Second, when I tried to ./configure (as mentioned in its README.md), I got this error - yasm/nasm not found or too old. Use --disable-yasm for a crippled build.. So I used ./configure --disable-yasm instead, and it (somehow) worked.

    Update #1

    After read this log a couple of times, I managed to produce a sample GIF from my mp4 file, by changing the command, which example.js tries to run:

    From

    ffmpeg -i out.mp4 -filter:v scale=-1:300 -r 10 /tmp/Lz43nx6wv1/%04d.png

    To

    ffmpeg -i out.mp4 -filter:v scale=-1:300 -r 10 out.gif

    But it's still using command line, I need to do this by code.

    So I dived into the code and found that this wrong url is coming from the plugin's index.js:

    ...
    
    // tmpfile(s)
      var id = uid(10);
      var dir = path.resolve('/tmp/' + id);
      var tmp  = path.join(dir, '/%04d.png');
    
    ...
    

    Is this an issue with the plugin, or am I doing something wrong here? In any case, please put the correct stub here, because I don't want to touch this part unless I know what I'm doing?

    Update #2

    Now I installed zlib1g-dev, and then reinstalled both FFmpeg and graphicsMagick, and now I see this error:

    gm convert: No decode delegate for this image format (/tmp/ZQbEAynAcf/0702.png).
    

    Thanks in advance :)

  • ffmpeg stops randomly with "No more output streams to write to, finishing" when reading rtsp stream [on hold]

    7 juin 2016, par ImagineDragon

    Basically I am running the following ffmpeg command to read an h264 rtsp stream using hls muxer, under Ubuntu 14.04 64bit with i7 CPU and 8GB memory:

    ffmpeg -v debug -i rtsp://172.16.11.247:554/live/ch00_0?token=hQttXvrjSPOcClQB -codec copy -flags -global_header -f hls -hls_time 5 -use_localtime 1 -hls_segment_filename '/home/eason/ffmpeg-test/%s.ts' '/home/eason/ffmpeg-test/live.m3u8'
    ffmpeg version N-79139-gde1a0d4 Copyright (c) 2000-2016 the FFmpeg developers
      built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.1)
      configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab
      libavutil      55. 19.100 / 55. 19.100
      libavcodec     57. 30.100 / 57. 30.100
      libavformat    57. 29.101 / 57. 29.101
      libavdevice    57.  0.101 / 57.  0.101
      libavfilter     6. 40.102 /  6. 40.102
      libavresample   3.  0.  0 /  3.  0.  0
      libswscale      4.  0.100 /  4.  0.100
      libswresample   2.  0.101 /  2.  0.101
      libpostproc    54.  0.100 / 54.  0.100
    Splitting the commandline.
    Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
    Reading option '-re' ... matched as option 're' (read input at native frame rate) with argument '1'.
    Reading option '-i' ... matched as input file with argument 'rtsp://172.16.11.247:554/live/ch00_0?token=hQttXvrjSPOcClQB'.
    Reading option '-codec' ... matched as option 'codec' (codec name) with argument 'copy'.
    Reading option '-flags' ... matched as AVOption 'flags' with argument '-global_header'.
    Reading option '-f' ... matched as option 'f' (force format) with argument 'hls'.
    Reading option '-hls_time' ... matched as AVOption 'hls_time' with argument '5'.
    Reading option '-use_localtime' ... matched as AVOption 'use_localtime' with argument '1'.
    Reading option '-hls_segment_filename' ... matched as AVOption 'hls_segment_filename' with argument '/home/eason/ffmpeg-test/%s.ts'.
    Reading option '/home/eason/ffmpeg-test/live.m3u8' ... matched as output file.
    Finished splitting the commandline.
    Parsing a group of options: global .
    Applying option v (set logging level) with argument debug.
    Successfully parsed a group of options.
    Parsing a group of options: input file rtsp://172.16.11.247:554/live/ch00_0?token=hQttXvrjSPOcClQB.
    Applying option re (read input at native frame rate) with argument 1.
    Successfully parsed a group of options.
    Opening an input file: rtsp://172.16.11.247:554/live/ch00_0?token=hQttXvrjSPOcClQB.
    [tcp @ 0x29c4d60] No default whitelist set
    [rtsp @ 0x29c2e20] SDP:
    m=video 0 RTP/AVP 96
    a=rtpmap:96 H264/90000
    a=fmtp:96 packetization-mode=1;profile-level-id=640028;sprop-parameter-sets=Z2QAKKzoBQBbkA==,aO48sA==
    a=control:trackID=0
    m=audio 0 RTP/AVP 98
    a=rtpmap:98 MPEG4-GENERIC/16000/1
    a=fmtp:98 profile-level-id=1;mode=AAC-lbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1408;cpresent=0;
    a=control:trackID=1
    
    
    [rtsp @ 0x29c2e20] video codec set to: h264
    [rtsp @ 0x29c2e20] RTP Packetization Mode: 1
    [rtsp @ 0x29c2e20] RTP Profile IDC: 64 Profile IOP: 0 Level: 28
    [rtsp @ 0x29c2e20] Extradata set to 0x29c4ff0 (size: 22)
    [rtsp @ 0x29c2e20] audio codec set to: aac
    [rtsp @ 0x29c2e20] audio samplerate set to: 16000
    [rtsp @ 0x29c2e20] audio channels set to: 1
    [rtp @ 0x29c50a0] No default whitelist set
    [udp @ 0x29c5200] No default whitelist set
    [udp @ 0x29c5200] end receive buffer size reported is 131072
    [udp @ 0x29d9480] No default whitelist set
    [udp @ 0x29d9480] end receive buffer size reported is 131072
    [rtsp @ 0x29c2e20] method SETUP failed: 461 Unsupported transport
    [rtsp @ 0x29c2e20] CSeq: 3
    
    [rtsp @ 0x29c2e20] setting jitter buffer size to 0
        Last message repeated 1 times
    [rtsp @ 0x29c2e20] hello state=0
    [rtsp @ 0x29c2e20] All info found
    [rtsp @ 0x29c2e20] rfps: 24.250000 0.018062
    [rtsp @ 0x29c2e20] rfps: 24.333333 0.012911
    [rtsp @ 0x29c2e20] rfps: 24.416667 0.008627
    [rtsp @ 0x29c2e20] rfps: 24.500000 0.005207
        Last message repeated 1 times
    [rtsp @ 0x29c2e20] rfps: 24.583333 0.002653
        Last message repeated 1 times
    [rtsp @ 0x29c2e20] rfps: 24.666667 0.000965
        Last message repeated 1 times
    [rtsp @ 0x29c2e20] rfps: 24.750000 0.000142
        Last message repeated 1 times
    [rtsp @ 0x29c2e20] rfps: 24.833333 0.000185
        Last message repeated 1 times
    [rtsp @ 0x29c2e20] rfps: 24.916667 0.001093
        Last message repeated 1 times
    [rtsp @ 0x29c2e20] rfps: 25.000000 0.002867
        Last message repeated 1 times
    [rtsp @ 0x29c2e20] rfps: 25.083333 0.005507
        Last message repeated 1 times
    [rtsp @ 0x29c2e20] rfps: 25.166667 0.009011
    [rtsp @ 0x29c2e20] rfps: 25.250000 0.013382
    [rtsp @ 0x29c2e20] rfps: 25.333333 0.018618
    [rtsp @ 0x29c2e20] rfps: 50.000000 0.011469
    Input #0, rtsp, from 'rtsp://172.16.11.247:554/live/ch00_0?token=hQttXvrjSPOcClQB':
      Duration: N/A, start: 0.000000, bitrate: N/A
        Stream #0:0, 28, 1/90000: Video: h264 (High), 1 reference frame, yuv420p(left), 1280x720, 1/180000, 24.75 tbr, 90k tbn, 180k tbc
        Stream #0:1, 23, 1/16000: Audio: aac (LC), 16000 Hz, mono, fltp
    Successfully opened the file.
    Parsing a group of options: output file /home/eason/ffmpeg-test/live.m3u8.
    Applying option codec (codec name) with argument copy.
    Applying option f (force format) with argument hls.
    Successfully parsed a group of options.
    Opening an output file: /home/eason/ffmpeg-test/live.m3u8.
    Successfully opened the file.
    [file @ 0x2cae180] Setting default whitelist 'file,crypto'
    [mpegts @ 0x29f7ce0] muxrate VBR, pcr every 9000 pkts, sdt every 2147483647, pat/pmt every 2147483647 pkts
    Output #0, hls, to '/home/eason/ffmpeg-test/live.m3u8':
      Metadata:
        encoder         : Lavf57.29.101
        Stream #0:0, 0, 1/90000: Video: h264, 1 reference frame, yuv420p(left), 1280x720 (0x0), 1/90000, q=2-31, 24.75 tbr, 90k tbn, 90k tbc
        Stream #0:1, 0, 1/90000: Audio: aac (LC), 16000 Hz, mono
    Stream mapping:
      Stream #0:0 -> #0:0 (copy)
      Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    cur_dts is invalid (this is harmless if it occurs once at the start per stream)
        Last message repeated 103 times
    [hls @ 0x2a0fc00] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
    [AVIOContext @ 0x2c998c0] Statistics: 0 seeks, 155 writeouts=N/A speed=1.01x    
    [file @ 0x2ba60e0] Setting default whitelist 'file,crypto'
    [file @ 0x2ca9fc0] Setting default whitelist 'file,crypto'
    [hls @ 0x2a0fc00] EXT-X-MEDIA-SEQUENCE:0
    [AVIOContext @ 0x2caa080] Statistics: 0 seeks, 1 writeouts
    [AVIOContext @ 0x2c99480] Statistics: 0 seeks, 103 writeouts=N/A speed=   1x    
    [file @ 0x2ba60e0] Setting default whitelist 'file,crypto'
    [file @ 0x2c97c60] Setting default whitelist 'file,crypto'
    [hls @ 0x2a0fc00] EXT-X-MEDIA-SEQUENCE:0
    [AVIOContext @ 0x2c97d20] Statistics: 0 seeks, 1 writeouts
    [AVIOContext @ 0x2c99480] Statistics: 0 seeks, 104 writeouts=N/A speed=   1x    
    [file @ 0x2ba60e0] Setting default whitelist 'file,crypto'
    [file @ 0x2c99680] Setting default whitelist 'file,crypto'
    [hls @ 0x2a0fc00] EXT-X-MEDIA-SEQUENCE:0
    [AVIOContext @ 0x2c99820] Statistics: 0 seeks, 1 writeouts
    [AVIOContext @ 0x2c99480] Statistics: 0 seeks, 28 writeoutse=N/A speed=   1x    
    [file @ 0x29c50c0] Setting default whitelist 'file,crypto'
    [file @ 0x2ba60e0] Setting default whitelist 'file,crypto'
    [hls @ 0x2a0fc00] EXT-X-MEDIA-SEQUENCE:0
    [AVIOContext @ 0x29c2ce0] Statistics: 0 seeks, 1 writeouts
    [AVIOContext @ 0x2c99480] Statistics: 0 seeks, 111 writeouts=N/A speed=   1x    
    [file @ 0x2c97d40] Setting default whitelist 'file,crypto'
    [file @ 0x2a134e0] Setting default whitelist 'file,crypto'
    [hls @ 0x2a0fc00] EXT-X-MEDIA-SEQUENCE:0
    [AVIOContext @ 0x2a11000] Statistics: 0 seeks, 1 writeouts
    [AVIOContext @ 0x2c99480] Statistics: 0 seeks, 105 writeouts=N/A speed=   1x    
    [file @ 0x29c50c0] Setting default whitelist 'file,crypto'
    [file @ 0x2a10c00] Setting default whitelist 'file,crypto'
    [hls @ 0x2a0fc00] EXT-X-MEDIA-SEQUENCE:1
    [AVIOContext @ 0x2a10cc0] Statistics: 0 seeks, 1 writeouts
    [AVIOContext @ 0x2c99480] Statistics: 0 seeks, 103 writeouts=N/A speed=   1x    
    [file @ 0x29c50c0] Setting default whitelist 'file,crypto'
    [file @ 0x2c99480] Setting default whitelist 'file,crypto'
    
    .......repeat........
    
    [hls @ 0x2a0fc00] EXT-X-MEDIA-SEQUENCE:71
    [AVIOContext @ 0x2c97fa0] Statistics: 0 seeks, 1 writeouts
    [rtsp @ 0x29c2e20] Too short data for FU-A H264 RTP packette=N/A speed=   1x    
    [AVIOContext @ 0x2ba60e0] Statistics: 0 seeks, 103 writeouts=N/A speed=   1x    
    [file @ 0x2c97b20] Setting default whitelist 'file,crypto'
    [file @ 0x2c97c60] Setting default whitelist 'file,crypto'
    [hls @ 0x2a0fc00] EXT-X-MEDIA-SEQUENCE:72
    [AVIOContext @ 0x2c99480] Statistics: 0 seeks, 1 writeouts
    [AVIOContext @ 0x2ba60e0] Statistics: 0 seeks, 156 writeouts=N/A speed=   1x    
    [file @ 0x2c99480] Setting default whitelist 'file,crypto'
    [file @ 0x2cab600] Setting default whitelist 'file,crypto'
    [hls @ 0x2a0fc00] EXT-X-MEDIA-SEQUENCE:73
    [AVIOContext @ 0x2cab6c0] Statistics: 0 seeks, 1 writeouts
    [AVIOContext @ 0x2ba60e0] Statistics: 0 seeks, 104 writeouts=N/A speed=   1x    
    [file @ 0x2cadc00] Setting default whitelist 'file,crypto'
    [file @ 0x2c99480] Setting default whitelist 'file,crypto'
    [hls @ 0x2a0fc00] EXT-X-MEDIA-SEQUENCE:74
    [AVIOContext @ 0x29c2ce0] Statistics: 0 seeks, 1 writeouts
    [AVIOContext @ 0x2ba60e0] Statistics: 0 seeks, 103 writeouts=N/A speed=   1x    
    [file @ 0x2a13540] Setting default whitelist 'file,crypto'
    [file @ 0x2cab680] Setting default whitelist 'file,crypto'
    [hls @ 0x2a0fc00] EXT-X-MEDIA-SEQUENCE:75
    [AVIOContext @ 0x2c99480] Statistics: 0 seeks, 1 writeouts
    No more output streams to write to, finishing.:46.09 bitrate=N/A speed=0.993x    
    [AVIOContext @ 0x2ba60e0] Statistics: 0 seeks, 138 writeouts
    [file @ 0x29c50c0] Setting default whitelist 'file,crypto'
    [hls @ 0x2a0fc00] EXT-X-MEDIA-SEQUENCE:76
    [AVIOContext @ 0x2ba60e0] Statistics: 0 seeks, 1 writeouts
    frame= 8423 fps= 21 q=-1.0 Lsize=N/A time=00:06:46.09 bitrate=N/A speed=0.993x    
    video:37031kB audio:1586kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    Input file #0 (rtsp://172.16.11.247:554/live/ch00_0?token=hQttXvrjSPOcClQB):
      Input stream #0:0 (video): 8423 packets read (37919815 bytes); 
      Input stream #0:1 (audio): 6345 packets read (1624337 bytes); 
      Total: 14768 packets (39544152 bytes) demuxed
    Output file #0 (/home/eason/ffmpeg-test/live.m3u8):
      Output stream #0:0 (video): 8423 packets muxed (37919815 bytes); 
      Output stream #0:1 (audio): 6345 packets muxed (1624337 bytes); 
      Total: 14768 packets (39544152 bytes) muxed
    0 frames successfully decoded, 0 decoding errors
    

    The problem is that ffmpeg exits randomly after 5 to 20 minutes. The RTSP is a live stream so stopping every 5 minute is really not acceptable. In the ffmpeg log I can't see any noticeable error except "No more output streams to write to, finishing." near the end. Can someone shed some light upon this? How can I make ffmpeg run without stopping? Thanks