[FFmpeg-user] ffmpeg exits before streaming
Chris Grimmett
chris at grimtech.net
Sat Nov 22 11:08:55 CET 2014
I'm trying to combine a music file, /persist/01.m4a with video,
/persist/bars2.mp4 and stream it to ffserver.
the following command works:
ffmpeg -loglevel debug -i /persist/01.m4a -i /persist/bars2.mp4 -pix_fmt
yuv420p -c:v libx264 -c:a libfdk_aac -s 320x240 -f flv /persist/test.flv
the following command exits seemingly before anything is streamed:
ffmpeg -loglevel debug -i /persist/01.m4a -i /persist/bars2.mp4 -pix_fmt
yuv420p -c:v libx264 -c:a libfdk_aac -s 320x240 -f flv
http://192.168.1.117:8090/feed1.ffm2
ffmpeg version git-2014-06-16-389d453 Copyright (c) 2000-2014 the FFmpeg
developers
built on Jun 16 2014 19:03:15 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --extra-libs=-ldl --enable-gpl --enable-libass
--enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
libavutil 52. 89.100 / 52. 89.100
libavcodec 55. 67.100 / 55. 67.100
libavformat 55. 43.100 / 55. 43.100
libavdevice 55. 13.101 / 55. 13.101
libavfilter 4. 8.100 / 4. 8.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging
level) with argument 'debug'.
Reading option '-i' ... matched as input file with argument
'/persist/01.m4a'.
Reading option '-i' ... matched as input file with argument
'/persist/bars2.mp4'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuv420p'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument
'libx264'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument
'libfdk_aac'.
Reading option '-s' ... matched as option 's' (set frame size (WxH or
abbreviation)) with argument '320x240'.
Reading option '-f' ... matched as option 'f' (force format) with argument
'flv'.
Reading option 'htp://192.168.1.117:8090/feed1.ffm2' ... matched as output
file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file /persist/01.m4a.
Successfully parsed a group of options.
Opening an input file: /persist/01.m4a.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1e0fd20] Format mov,mp4,m4a,3gp,3g2,mj2 probed
with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1e0fd20] ISO: File Type Major Brand: M4A
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1e0fd20] stream 0, timescale not set
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1e0fd20] Before avformat_find_stream_info()
pos: 592860 bytes read:163840 seeks:1
[mjpeg @ 0x1e11a00] marker=d8 avail_size_in_buf=35296
[mjpeg @ 0x1e11a00] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x1e11a00] marker=e0 avail_size_in_buf=35294
[mjpeg @ 0x1e11a00] marker parser used 16 bytes (128 bits)
[mjpeg @ 0x1e11a00] marker=db avail_size_in_buf=35276
[mjpeg @ 0x1e11a00] index=0
[mjpeg @ 0x1e11a00] qscale[0]: 1
[mjpeg @ 0x1e11a00] marker parser used 67 bytes (536 bits)
[mjpeg @ 0x1e11a00] marker=db avail_size_in_buf=35207
[mjpeg @ 0x1e11a00] index=1
[mjpeg @ 0x1e11a00] qscale[1]: 2
[mjpeg @ 0x1e11a00] marker parser used 67 bytes (536 bits)
[mjpeg @ 0x1e11a00] marker=c0 avail_size_in_buf=35138
[mjpeg @ 0x1e11a00] sof0: picture: 600x600
[mjpeg @ 0x1e11a00] component 0 1:1 id: 0 quant:0
[mjpeg @ 0x1e11a00] component 1 1:1 id: 1 quant:1
[mjpeg @ 0x1e11a00] component 2 1:1 id: 2 quant:1
[mjpeg @ 0x1e11a00] pix fmt id 11111100
[mjpeg @ 0x1e11a00] marker parser used 17 bytes (136 bits)
[mjpeg @ 0x1e11a00] marker=c4 avail_size_in_buf=35119
[mjpeg @ 0x1e11a00] class=0 index=0 nb_codes=11
[mjpeg @ 0x1e11a00] marker parser used 30 bytes (240 bits)
[mjpeg @ 0x1e11a00] marker=c4 avail_size_in_buf=35087
[mjpeg @ 0x1e11a00] class=1 index=0 nb_codes=243
[mjpeg @ 0x1e11a00] marker parser used 110 bytes (880 bits)
[mjpeg @ 0x1e11a00] marker=c4 avail_size_in_buf=34975
[mjpeg @ 0x1e11a00] class=0 index=1 nb_codes=8
[mjpeg @ 0x1e11a00] marker parser used 27 bytes (216 bits)
[mjpeg @ 0x1e11a00] marker=c4 avail_size_in_buf=34946
[mjpeg @ 0x1e11a00] class=1 index=1 nb_codes=178
[mjpeg @ 0x1e11a00] marker parser used 49 bytes (392 bits)
[mjpeg @ 0x1e11a00] escaping removed 106 bytes
[mjpeg @ 0x1e11a00] marker=da avail_size_in_buf=34895
[mjpeg @ 0x1e11a00] component: 0
[mjpeg @ 0x1e11a00] component: 1
[mjpeg @ 0x1e11a00] component: 2
[mjpeg @ 0x1e11a00] marker parser used 34788 bytes (278302 bits)
[mjpeg @ 0x1e11a00] marker=d9 avail_size_in_buf=0
[mjpeg @ 0x1e11a00] decode frame unused 0 bytes
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1e0fd20] demuxer injecting skip 2112
[aac @ 0x1e10720] skip 2112 samples due to side data
[aac @ 0x1e10720] skip whole frame, skip left: 1088
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1e0fd20] max_analyze_duration 5000000 reached
at 5015510 microseconds
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1e0fd20] After avformat_find_stream_info()
pos: 775167 bytes read:327680 seeks:1 frames:219
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/persist/01.m4a':
Metadata:
major_brand : M4A
minor_version : 0
compatible_brands: M4A mp42isom
creation_time : 2033-04-24 17:18:04
iTunNORM : 0000138E 00001755 00007734 00008265 0000D0FB
0000C55F 00007C24 00007C24 000184EF 00001A1F
title : It Goes On
artist : Louis Cole and Genevieve Artadi & Pomplamoose
album_artist : Louis Cole and Genevieve Artadi & Pomplamoose
album : It Goes On - Single
genre : Pop
track : 1/1
disc : 1/1
compilation : 0
date : 2011-02-09T08:00:00Z
media_type : 1
Duration: 00:03:13.05, start: 0.000000, bitrate: 314 kb/s
Stream #0:0(eng), 218, 1/44100: Audio: aac (mp4a / 0x6134706D), 44100
Hz, stereo, fltp, 289 kb/s (default)
Metadata:
creation_time : 2033-04-24 17:18:04
Stream #0:1, 1, 1/90000: Video: mjpeg, yuvj444p(pc), 600x600 [SAR 72:72
DAR 1:1], 1/90000, 90k tbr, 90k tbn, 90k tbc
Successfully opened the file.
Parsing a group of options: input file /persist/bars2.mp4.
Successfully parsed a group of options.
Opening an input file: /persist/bars2.mp4.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1e2fa60] Format mov,mp4,m4a,3gp,3g2,mj2 probed
with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1e2fa60] ISO: File Type Major Brand: isom
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1e2fa60] Before avformat_find_stream_info()
pos: 8018567 bytes read:426995 seeks:1
[h264 @ 0x1e2e820] no picture
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1e2fa60] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1e2fa60] After avformat_find_stream_info()
pos: 4890 bytes read:459763 seeks:2 frames:4
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/persist/bars2.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.43.100
Duration: 00:16:40.00, start: 0.000000, bitrate: 64 kb/s
Stream #1:0(und), 3, 1/12800: Video: h264 (High 4:4:4 Predictive) (avc1
/ 0x31637661), yuv444p, 320x240 [SAR 1:1 DAR 4:3], 1/50, 36 kb/s, 25 fps,
25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #1:1(eng), 1, 1/44100: Audio: aac (mp4a / 0x6134706D), 44100 Hz,
stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
Successfully opened the file.
Parsing a group of options: output file http://192.168.1.117:8090/feed1.ffm2
.
Applying option pix_fmt (set pixel format) with argument yuv420p.
Applying option c:v (codec name) with argument libx264.
Applying option c:a (codec name) with argument libfdk_aac.
Applying option s (set frame size (WxH or abbreviation)) with argument
320x240.
Applying option f (force format) with argument flv.
Successfully parsed a group of options.
Opening an output file: http://192.168.1.117:8090/feed1.ffm2.
[http @ 0x1e2e700] request: POST /feed1.ffm2 HTTP/1.1
Transfer-Encoding: chunked
User-Agent: Lavf/55.43.100
Accept: */*
Connection: close
Host: 192.168.1.117:8090
Successfully opened the file.
detected 4 logical cores
[graph 0 input from stream 1:0 @ 0x1df6880] Setting 'video_size' to value
'320x240'
[graph 0 input from stream 1:0 @ 0x1df6880] Setting 'pix_fmt' to value '5'
[graph 0 input from stream 1:0 @ 0x1df6880] Setting 'time_base' to value
'1/12800'
[graph 0 input from stream 1:0 @ 0x1df6880] Setting 'pixel_aspect' to value
'1/1'
[graph 0 input from stream 1:0 @ 0x1df6880] Setting 'sws_param' to value
'flags=2'
[graph 0 input from stream 1:0 @ 0x1df6880] Setting 'frame_rate' to value
'25/1'
[graph 0 input from stream 1:0 @ 0x1df6880] w:320 h:240 pixfmt:yuv444p
tb:1/12800 fr:25/1 sar:1/1 sws_param:flags=2
[scaler for output stream 0:0 @ 0x1df6ec0] Setting 'w' to value '320'
[scaler for output stream 0:0 @ 0x1df6ec0] Setting 'h' to value '240'
[scaler for output stream 0:0 @ 0x1df6ec0] Setting 'flags' to value '0x4'
[scaler for output stream 0:0 @ 0x1df6ec0] w:320 h:240 flags:'0x4' interl:0
[format @ 0x1e135c0] compat: called with args=[yuv420p]
[format @ 0x1e135c0] Setting 'pix_fmts' to value 'yuv420p'
[AVFilterGraph @ 0x1df6e20] query_formats: 5 queried, 4 merged, 0 already
done, 0 delayed
[scaler for output stream 0:0 @ 0x1df6ec0] w:320 h:240 fmt:yuv444p sar:1/1
-> w:320 h:240 fmt:yuv420p sar:1/1 flags:0x4
[graph 1 input from stream 0:0 @ 0x1e0c680] Setting 'time_base' to value
'1/44100'
[graph 1 input from stream 0:0 @ 0x1e0c680] Setting 'sample_rate' to value
'44100'
[graph 1 input from stream 0:0 @ 0x1e0c680] Setting 'sample_fmt' to value
'fltp'
[graph 1 input from stream 0:0 @ 0x1e0c680] Setting 'channel_layout' to
value '0x3'
[graph 1 input from stream 0:0 @ 0x1e0c680] tb:1/44100 samplefmt:fltp
samplerate:44100 chlayout:0x3
[audio format for output stream 0:1 @ 0x1e0cfe0] Setting 'sample_fmts' to
value 's16'
[audio format for output stream 0:1 @ 0x1e0cfe0] Setting 'sample_rates' to
value
'96000|88200|64000|48000|44100|32000|24000|22050|16000|12000|11025|8000'
[audio format for output stream 0:1 @ 0x1e0cfe0] Setting 'channel_layouts'
to value '0x4|0x3|0x7|0x107|0x37|0x3f|0xff|0x63f'
[audio format for output stream 0:1 @ 0x1e0cfe0] auto-inserting filter
'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the
filter 'audio format for output stream 0:1'
[AVFilterGraph @ 0x1e07460] query_formats: 4 queried, 6 merged, 3 already
done, 0 delayed
[auto-inserted resampler 0 @ 0x1dffb80] ch:2 chl:stereo fmt:fltp r:44100Hz
-> ch:2 chl:stereo fmt:s16 r:44100Hz
[libx264 @ 0x1e2b6a0] using mv_range_thread = 24
[libx264 @ 0x1e2b6a0] using SAR=1/1
[libx264 @ 0x1e2b6a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x1e2b6a0] profile High, level 1.3
[libx264 @ 0x1e2b6a0] 264 - core 142 r2 a5831aa - H.264/MPEG-4 AVC codec -
Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1
ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00
mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11
fast_pskip=1 chroma_qp_offset=-2 threads=6 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=2 keyint=250 keyint_min=25 scenecut=40
intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0
qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, flv, to 'http://192.168.1.117:8090/feed1.ffm2':
Metadata:
major_brand : M4A
minor_version : 0
compatible_brands: M4A mp42isom
media_type : 1
iTunNORM : 0000138E 00001755 00007734 00008265 0000D0FB
0000C55F 00007C24 00007C24 000184EF 00001A1F
title : It Goes On
artist : Louis Cole and Genevieve Artadi & Pomplamoose
album_artist : Louis Cole and Genevieve Artadi & Pomplamoose
album : It Goes On - Single
genre : Pop
track : 1/1
disc : 1/1
compilation : 0
date : 2011-02-09T08:00:00Z
encoder : Lavf55.43.100
Stream #0:0(und), 0, 1/1000: Video: h264 (libx264) ([7][0][0][0] /
0x0007), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 1/25, q=-1--1, 25 fps, 1k tbn,
25 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc55.67.100 libx264
Stream #0:1(eng), 0, 1/1000: Audio: aac (libfdk_aac) ([10][0][0][0] /
0x000A), 44100 Hz, stereo, s16, 128 kb/s (default)
Metadata:
creation_time : 2033-04-24 17:18:04
encoder : Lavc55.67.100 libfdk_aac
Stream mapping:
Stream #1:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:0 -> #0:1 (aac (native) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
[h264 @ 0x2a69860] no picture
[h264 @ 0x2aaea00] no picture
[libx264 @ 0x1e2b6a0] frame= 0 QP=20.56 NAL=3 Slice:I Poc:0 I:300 P:0
SKIP:0 size=3511 bytes
[libx264 @ 0x1e2b6a0] frame= 1 QP=21.65 NAL=2 Slice:P Poc:8 I:9 P:62
SKIP:229 size=605 bytes
[libx264 @ 0x1e2b6a0] frame= 2 QP=14.78 NAL=2 Slice:B Poc:4 I:1 P:27
SKIP:272 size=88 bytes
[libx264 @ 0x1e2b6a0] frame= 3 QP=15.60 NAL=0 Slice:B Poc:2 I:1 P:20
SKIP:279 size=52 bytes
[aac @ 0x1e2f120] skip 2112 samples due to side data
[aac @ 0x1e2f120] skip whole frame, skip left: 1088
[aac @ 0x1e2f120] skip whole frame, skip left: 64
[aac @ 0x1e2f120] skip 64/1024 samples
root at 1ba4795b8c0c:/tmp#
Using the command that saves to disk, the process takes several minutes.
When I attempt to stream, ffmpeg seems like it doesn't do anything, it just
skips doing what I asked it to do and exits. Lots of "skip"s everywhere.
I'm assuming the "side data" is the problem. Also there's that h264 saying,
"no picture" which might be the problem.
My questions...
What does "skip 2112 samples due to side data" mean? What is side data? Is
there a way I can fix the skipping?
More information about the ffmpeg-user
mailing list