[FFmpeg-user] Error: av_interleaved_write_frame(): Broken pipe

2017-02-27 Thread Aakash Gupta

> Hello,
> 
> I have made a rails app that can stream live videos to
> facebook rtmp server and deployed it on Digital Ocean. I
> have used nginx as web server and using a linux OS. The
> major problem that I am encountering after viewing log files
> of FFMpeg processes is that after streaming for some
> time(that keeps on varying) FFmpeg process gives the error
> 
> av_interleaved_write_frame(): Broken pipe
> 
> This is the command that I am using:
> 
> $HOME/bin/ffmpeg -loop 1 -re -y -f image2 -i
> 'public/uploads/post/25/frame1.png' -acodec copy -bsf:a
> aac_adtstoasc -pix_fmt yuv420p -profile:v high -s 1280x720
> -vb 400k -maxrate 400k -minrate 400k -bufsize 600k
> -deinterlace -vcodec libx264 -preset veryfast -g 30 -r 30 -t
> 14400 -strict -2 -f flv "rtmp_link" 2> "logfile"
> 
> Logs of this process:
> 
> ffmpeg version N-83442-gdac51d2 Copyright (c) 2000-2017 the
> FFmpeg developers
>   built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
>   configuration: --prefix=/root/ffmpeg_build
> --pkg-config-flags=--static
> --extra-cflags=-I/root/ffmpeg_build/include
> --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin
> --enable-gpl --enable-libass --enable-libfdk-aac
> --enable-libfreetype --enable-libmp3lame --enable-libopus
> --enable-libtheora --enable-libvorbis --enable-libvpx
> --enable-libx264 --enable-nonfree
>   libavutil      55. 46.100 / 55. 46.100
>   libavcodec     57. 75.100 / 57. 75.100
>   libavformat    57. 66.101 / 57. 66.101
>   libavdevice    57.  2.100 / 57.  2.100
>   libavfilter     6. 73.100 /  6. 73.100
>   libswscale      4.  3.101 /  4.  3.101
>   libswresample   2.  4.100 /  2.  4.100
>   libpostproc    54.  2.100 / 54.  2.100
> Input #0, image2, from 'public/uploads/post/25/frame1.png':
>   Duration: 00:00:00.04, start: 0.00, bitrate: N/A
>     Stream #0:0: Video: png, rgba(pc), 720x405, 25 fps, 25
> tbr, 25 tbn, 25 tbc
> [aac @ 0x2916fa0] Estimating duration from bitrate, this may
> be inaccurate
> Input #1, aac, from 'public/silent.aac':
>   Duration: 05:16:16.43, bitrate: 3 kb/s
>     Stream #1:0: Audio: aac (LC), 44100 Hz, mono, fltp, 3
> kb/s
> [libx264 @ 0x291e8e0] using cpu capabilities: MMX2 SSE2Fast
> SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
> [libx264 @ 0x291e8e0] profile High, level 3.1
> [libx264 @ 0x291e8e0] 264 - core 142 r2389 956c8d8 -
> H.264/MPEG-4 AVC codec - Copyleft 2003-2014 -"some link to
> be removed because of forum policy" - options: cabac=1 ref=1
> deblock=1:0:0 analyse=0x3:0x113 me=hex subme=2 psy=1
> psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1
> trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1
> chroma_qp_offset=0 threads=1 lookahead_threads=1
> sliced_threads=0 nr=0 decimate=1 interlaced=0
> bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2
> b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1
> keyint=30 keyint_min=3 scenecut=40 intra_refresh=0
> rc_lookahead=10 rc=cbr mbtree=1 bitrate=400 ratetol=1.0
> qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=400
> vbv_bufsize=600 nal_hrd=none filler=0 ip_ratio=1.40
> aq=1:1.00
> Output #0, flv, to 'rtmp_link':
>   Metadata:
>     encoder         : Lavf57.66.101
>     Stream #0:0: Video: h264 (libx264) ([7][0][0][0] /
> 0x0007), yuv420p, 1280x720, q=-1--1, 400 kb/s, 30 fps, 1k
> tbn, 30 tbc
>     Metadata:
>       encoder         : Lavc57.75.100 libx264
>     Side data:
>       cpb: bitrate max/min/avg: 40/0/40 buffer
> size: 60 vbv_delay: -1
>     Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A),
> 44100 Hz, mono, fltp, 3 kb/s
> Stream mapping:
>   Stream #0:0 -> #0:0 (png (native) -> h264
> (libx264))
>   Stream #1:0 -> #0:1 (copy)
> Press [q] to stop, [?] for help
> [image2 @ 0x2914ae0] Thread message queue blocking; consider
> raising the thread_queue_size option (current value: 8)
> frame=   12 fps=0.0 q=44.0 size=       0kB
> time=00:00:00.00 bitrate=N/A speed=   0x    
> frame=   17 fps= 16 q=43.0 size=      22kB
> time=00:00:00.13 bitrate=1359.9kbits/s speed=0.13x    
> frame=   28 fps= 18 q=42.0 size=      25kB
> time=00:00:00.56 bitrate= 367.1kbits/s speed=0.363x    
> frame=   38 fps= 18 q=38.0 size=      41kB
> time=00:00:00.97 bitrate= 346.4kbits/s speed=0.465x    
> frame=   48 fps= 18 q=38.0 size=      82kB
> time=00:00:01.37 bitrate= 490.0kbits/s speed=0.525x    
> frame=   62 fps= 20 q=35.0 size=      96kB
> time=00:00:01.93 bitrate= 405.0kbits/s speed=0.617x    
> frame=   71 fps= 19 q=30.0 size=     101kB
> time=00:00:02.27 bitrate= 363.9kbits/s speed=0.617x    
> frame=   82 fps= 20 q=38.0 size=     150kB
> time=00:00:02.73 bitrate= 449.8kbits/s speed=0.651x    
> frame=   97 fps= 21 q=28.0 size=     154kB
> time=00:00:03.33 bitrate= 379.5kbits/s speed=0.708x    
> frame=  106 fps= 20 q=36.0 size=     209kB
> time=00:00:03.66 bitrate= 465.5kbits/s speed=0.702x    
> frame=  121 fps= 21 q=36.0 size=     214kB
> time=00:00:04.27 bitrate= 409.6kbits/s speed=0.741x    
> frame=  135 fps= 21 q=36.0 size=     269kB
> time=00:00:04.83 

[FFmpeg-user] Error: av_interleaved_write_frame(): Broken pipe

2017-02-26 Thread Aakash Gupta



 Hello,

I have made a rails app that can stream live videos to facebook rtmp server and 
deployed it on Digital Ocean. I have used nginx as web server and using a linux 
OS. The major problem that I am encountering after viewing log files of FFMpeg 
processes is that after streaming for some time(that keeps on varying) FFmpeg 
process gives the error

av_interleaved_write_frame(): Broken pipe

This is the command that I am using:

$HOME/bin/ffmpeg -loop 1 -re -y -f image2 -i 
'public/uploads/post/25/frame1.png' -acodec copy -bsf:a aac_adtstoasc -pix_fmt 
yuv420p -profile:v high -s 1280x720 -vb 400k -maxrate 400k -minrate 400k 
-bufsize 600k -deinterlace -vcodec libx264 -preset veryfast -g 30 -r 30 -t 
14400 -strict -2 -f flv "rtmp_link" 2> "logfile"

Logs of this process:

ffmpeg version N-83442-gdac51d2 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
  configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static 
--extra-cflags=-I/root/ffmpeg_build/include 
--extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --enable-gpl 
--enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame 
--enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx 
--enable-libx264 --enable-nonfree
  libavutil      55. 46.100 / 55. 46.100
  libavcodec     57. 75.100 / 57. 75.100
  libavformat    57. 66.101 / 57. 66.101
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 73.100 /  6. 73.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
Input #0, image2, from 'public/uploads/post/25/frame1.png':
  Duration: 00:00:00.04, start: 0.00, bitrate: N/A
    Stream #0:0: Video: png, rgba(pc), 720x405, 25 fps, 25 tbr, 25 tbn, 25 tbc
[aac @ 0x2916fa0] Estimating duration from bitrate, this may be inaccurate
Input #1, aac, from 'public/silent.aac':
  Duration: 05:16:16.43, bitrate: 3 kb/s
    Stream #1:0: Audio: aac (LC), 44100 Hz, mono, fltp, 3 kb/s
[libx264 @ 0x291e8e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX 
AVX2 FMA3 LZCNT BMI2
[libx264 @ 0x291e8e0] profile High, level 3.1
[libx264 @ 0x291e8e0] 264 - core 142 r2389 956c8d8 - H.264/MPEG-4 AVC codec - 
Copyleft 2003-2014 -"some link to be removed because of forum policy" - 
options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=2 psy=1 
psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 
deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=1 lookahead_threads=1 
sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 
constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 
open_gop=0 weightp=1 keyint=30 keyint_min=3 scenecut=40 intra_refresh=0 
rc_lookahead=10 rc=cbr mbtree=1 bitrate=400 ratetol=1.0 qcomp=0.60 qpmin=0 
qpmax=69 qpstep=4 vbv_maxrate=400 vbv_bufsize=600 nal_hrd=none filler=0 
ip_ratio=1.40 aq=1:1.00
Output #0, flv, to 'rtmp_link':
  Metadata:
    encoder         : Lavf57.66.101
    Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 
1280x720, q=-1--1, 400 kb/s, 30 fps, 1k tbn, 30 tbc
    Metadata:
      encoder         : Lavc57.75.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 40/0/40 buffer size: 60 vbv_delay: 
-1
    Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 44100 Hz, mono, 
fltp, 3 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
  Stream #1:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[image2 @ 0x2914ae0] Thread message queue blocking; consider raising the 
thread_queue_size option (current value: 8)
frame=   12 fps=0.0 q=44.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=  
 0x    
frame=   17 fps= 16 q=43.0 size=      22kB time=00:00:00.13 
bitrate=1359.9kbits/s speed=0.13x    
frame=   28 fps= 18 q=42.0 size=      25kB time=00:00:00.56 bitrate= 
367.1kbits/s speed=0.363x    
frame=   38 fps= 18 q=38.0 size=      41kB time=00:00:00.97 bitrate= 
346.4kbits/s speed=0.465x    
frame=   48 fps= 18 q=38.0 size=      82kB time=00:00:01.37 bitrate= 
490.0kbits/s speed=0.525x    
frame=   62 fps= 20 q=35.0 size=      96kB time=00:00:01.93 bitrate= 
405.0kbits/s speed=0.617x    
frame=   71 fps= 19 q=30.0 size=     101kB time=00:00:02.27 bitrate= 
363.9kbits/s speed=0.617x    
frame=   82 fps= 20 q=38.0 size=     150kB time=00:00:02.73 bitrate= 
449.8kbits/s speed=0.651x    
frame=   97 fps= 21 q=28.0 size=     154kB time=00:00:03.33 bitrate= 
379.5kbits/s speed=0.708x    
frame=  106 fps= 20 q=36.0 size=     209kB time=00:00:03.66 bitrate= 
465.5kbits/s speed=0.702x    
frame=  121 fps= 21 q=36.0 size=     214kB time=00:00:04.27 bitrate= 
409.6kbits/s speed=0.741x    
frame=  135 fps= 21 q=36.0 size=     269kB time=00:00:04.83 bitrate= 
456.3kbits/s speed=0.768x    
frame=  144 fps= 21 q=36.0 size=     270kB time=00:00:05.20 bitrate= 
425.4kbits/s speed=0.765x    
frame=  159 fps= 22 q=35.0 size=     273kB 

[FFmpeg-user] [Error]: av_interleaved_write_frame(): Broken pipe. Failed to update header with correct duration.

2015-12-10 Thread Hao Lee
Hi,

I am sorry to bother you to ask a question.
First, I run "ffserver -f ffserver.conf", everything is ok.
But when I run "ffmpeg -i 001.flv http://127.0.0.1:8090/test1.flv;, I
get some error messages.

START
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> flv1 (flv))
  Stream #0:1 -> #0:1 (aac (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
av_interleaved_write_frame(): Broken pipe
Last message repeated 1 times
[flv @ 0x90d0f00] Failed to update header with correct duration.
[flv @ 0x90d0f00] Failed to update header with correct filesize.
frame=1 fps=0.0 q=5.6 Lsize=   2kB time=00:00:00.34 bitrate=
42.2kbits/s
video:31kB audio:6kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
Conversion failed!
#END#

This is my ffserver.conf.

START
HTTPPort 8090
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 1000
CustomLog -

File /home/mirage/feed/feed1.ffm
FileMaxSize 3M
ACL allow 127.0.0.1


Feed feed1.ffm
Format flv
AudioBitRate 32
AudioChannels 1
AudioSampleRate 44100
VideoBitRate 218
VideoBufferSize 40
VideoFrameRate 15
VideoSize 512x282
VideoGopSize 12

#END#

This is my configuration. I hope someone can help me. Thank you !

START
configuration: --enable-gpl --enable-version3 --enable-nonfree
--enable-shared --enable-zlib --enable-bzlib --enable-libfaac
--enable-libmp3lame --enable-libvo-aacenc --enable-libx264
--enable-libxvid --enable-pic --enable-pthreads
#END#

Regards,
Hao Lee
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user