[x264-devel] Encoding issue using x264 (interleaved_write_frame)
Tejas Shah
tpshah1 at asu.edu
Mon Mar 3 02:40:41 CET 2014
Hello,
I am trying to encode video in h264 using ffmpeg on laptop using laptop
camera.
I have installed yasm on laptop and my problem begins with x264.
While I am doing x264 configuration, I get this warning:
tejas at tejas-ubuntu:~/
Documents/ffmpeg-sources/x264-snapshot-20140226-2245$ ./configure
--enable-static --enable-debug --enable-gprof
Warning: AV_PIX_FMT_FLAG_RGB is missing from libavutil, update for swscale
support
Warning: libavformat is not supported without swscale support
platform: X86_64
system: LINUX
cli: yes
libx264: internal
shared: no
static: yes
asm: yes
interlaced: yes
avs: avxsynth
lavf: no
ffms: no
mp4: gpac
gpl: yes
thread: posix
opencl: yes
filters: crop select_every
debug: yes
gprof: yes
strip: no
PIC: no
bit depth: 8
chroma format: all
You can run 'make' or 'make fprofiled' now.
With this warning, x264 compiles without any error and now I enable x264
in ffmpeg configuration. Ffmpeg recognizes x264, but I get issues using
x264 for encoding in ffmpeg.
The command I am using captures a h264 encoded video for 1minute. I ran
this command twice and in the first instance it started capturing the video
properly, but at 25sec it terminated encoding. Here is the output of that.
tejas at tejas-ubuntu:~/ffmpeg-sources/ffmpeg$ ffmpeg -y -f video4linux2 -i
/dev/video0 -t 60 -c:v libx264 -pix_fmt yuv420p -profile:v baseline -level
31 -b:v 600K -r 24 -g 72 -f hls -hls_time 2 -hls_list_size 300 -s 640x360
640x360.m3u8
The program 'ffmpeg' is currently not installed. You can install it by
typing:
sudo apt-get install ffmpeg
tejas at tejas-ubuntu:~/ffmpeg-sources/ffmpeg$ ./ffmpeg -y -f video4linux2 -i
/dev/video0 -t 60 -c:v libx264 -pix_fmt yuv420p -profile:v baseline -level
31 -b:v 600K -r 24 -g 72 -f hls -hls_time 2 -hls_list_size 300 -s 640x360
640x360.m3u8
ffmpeg version N-61046-g8b8ae29 Copyright (c) 2000-2014 the FFmpeg
developers
built on Mar 2 2014 11:06:45 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9)
configuration: --enable-gpl --enable-gray --enable-runtime-cpudetect
--enable-bzlib --enable-gnutls --enable-libass --enable-libfaac
--enable-libfreetype --enable-libgsm --enable-libmodplug
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libcdio --enable-libdc1394 --enable-libopenjpeg --enable-libpulse
--enable-librtmp --enable-libschroedinger --enable-libspeex
--enable-libtheora --enable-libv4l2 --enable-libvo-aacenc
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-x11grab
--enable-libx264 --enable-libxvid --enable-openal --enable-openssl
--enable-zlib --enable-nonfree --enable-version3 --extra-libs=-ldl
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 55158.824431, bitrate: 147456 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480,
147456 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
[libx264 @ 0x3082360] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x3082360] profile Constrained Baseline, level 3.1
Output #0, hls, to '640x360.m3u8':
Metadata:
encoder : Lavf55.33.100
Stream #0:0: Video: h264 (libx264), yuv420p, 640x360, q=-1--1, 600
kb/s, 90k tbn, 24 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> libx264)
Press [q] to stop, [?] for help
frame= 21 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A dup=12
drop=8 frame= 33 fps= 33 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A
dup=17 drop=16 frame= 44 fps= 29 q=0.0 size=N/A time=00:00:00.00
bitrate=N/A dup=22 drop=25 frame= 56 fps= 28 q=25.0 size=N/A
time=00:00:00.50 bitrate=N/A dup=23 drop=29 frame= 68 fps= 27 q=28.0
size=N/A time=00:00:01.00 bitrate=N/A dup=26 drop=36 frame= 81 fps= 27
q=26.0 size=N/A time=00:00:01.54 bitrate=N/A dup=31 drop=43 frame= 93
fps= 26 q=25.0 size=N/A time=00:00:02.04 bitrate=N/A dup=32 drop=47 frame=
106 fps= 26 q=25.0 size=N/A time=00:00:02.58 bitrate=N/A dup=38 drop=56
frame= 119 fps= 26 q=26.0 size=N/A time=00:00:03.12 bitrate=N/A dup=41
drop=62 frame= 130 fps= 25 q=26.0 size=N/A time=00:00:03.58 bitrate=N/A
dup=45 drop=70 frame= 143 fps= 25 q=25.0 size=N/A time=00:00:04.12
bitrate=N/A dup=45 drop=73 frame= 156 fps= 25 q=25.0 size=N/A
time=00:00:04.66 bitrate=N/A dup=45 drop=75 frame= 167 fps= 25 q=25.0
size=N/A time=00:00:05.12 bitrate=N/A dup=47 drop=81 frame= 180 fps= 25
q=25.0 size=N/A time=00:00:05.66 bitrate=N/A dup=52 drop=87 frame= 191
fps= 25 q=26.0 size=N/A time=00:00:06.12 bitrate=N/A dup=52 drop=93 frame=
204 fps= 25 q=26.0 size=N/A time=00:00:06.66 bitrate=N/A dup=57 drop=97
frame= 217 fps= 25 q=26.0 size=N/A time=00:00:07.20 bitrate=N/A dup=60
drop=101frame= 229 fps= 25 q=25.0 size=N/A time=00:00:07.70 bitrate=N/A
dup=62 drop=106frame= 240 fps= 25 q=25.0 size=N/A time=00:00:08.16
bitrate=N/A dup=63 drop=110frame= 255 fps= 25 q=25.0 size=N/A
time=00:00:08.79 bitrate=N/A dup=66 drop=114frame= 267 fps= 25 q=26.0
size=N/A time=00:00:09.29 bitrate=N/A dup=68 drop=119frame= 275 fps= 24
q=26.0 size=N/A time=00:00:09.62 bitrate=N/A dup=73 drop=131frame= 290
fps= 25 q=26.0 size=N/A time=00:00:10.25 bitrate=N/A dup=80 drop=136frame=
317 fps= 26 q=25.0 size=N/A time=00:00:11.37 bitrate=N/A dup=105
drop=13frame= 608 fps= 41 q=16.0 size=N/A time=00:00:23.50 bitrate=N/A
dup=395 drop=13frame= 608 fps= 40 q=-1.0 Lsize=N/A time=00:00:25.33
bitrate=N/A dup=395 drop=154
video:1336kB audio:0kB subtitle:0 data:0 global headers:0kB muxing overhead
-100.001610%
[libx264 @ 0x3082360] frame I:9 Avg QP:11.73 size: 41943
[libx264 @ 0x3082360] frame P:599 Avg QP:14.77 size: 1653
[libx264 @ 0x3082360] mb I I16..4: 41.8% 0.0% 58.2%
[libx264 @ 0x3082360] mb P I16..4: 0.5% 0.0% 0.1% P16..4: 23.6% 3.7%
1.9% 0.0% 0.0% skip:70.2%
[libx264 @ 0x3082360] final ratefactor: 15.75
[libx264 @ 0x3082360] coded y,uvDC,uvAC intra: 53.2% 77.5% 63.0% inter:
5.7% 20.6% 1.9%
[libx264 @ 0x3082360] i16 v,h,dc,p: 44% 14% 13% 29%
[libx264 @ 0x3082360] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 37% 19% 17% 3% 5%
7% 6% 2% 4%
[libx264 @ 0x3082360] i8c dc,h,v,p: 61% 16% 19% 3%
[libx264 @ 0x3082360] ref P L0: 59.8% 20.7% 19.5%
[libx264 @ 0x3082360] kb/s:431.89
tejas at tejas-ubuntu:~/ffmpeg-sources/ffmpeg$
During the second instance, it again started capturing properly, but at
10sec it stopped capturing and freezed at that point. So, I presses ctrl+c
to terminate and I got "av_interleaved_write_frame(): Immediate exit
requested" message. Here is the log.
tejas at tejas-ubuntu:~/ffmpeg-sources/ffmpeg$ ./ffmpeg -y -f video4linux2 -i
/dev/video0 -t 60 -c:v libx264 -pix_fmt yuv420p -profile:v baseline -level
31 -b:v 600K -r 24 -g 72 -f hls -hls_time 2 -hls_list_size 300 -s 640x360
640x360_.m3u8
ffmpeg version N-61046-g8b8ae29 Copyright (c) 2000-2014 the FFmpeg
developers
built on Mar 2 2014 11:46:19 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9)
configuration: --enable-gpl --enable-gray --enable-runtime-cpudetect
--enable-bzlib --enable-gnutls --enable-libass --enable-libfaac
--enable-libfreetype --enable-libgsm --enable-libmodplug
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libcdio --enable-libdc1394 --enable-libopenjpeg --enable-libpulse
--enable-librtmp --enable-libschroedinger --enable-libspeex
--enable-libtheora --enable-libv4l2 --enable-libvo-aacenc
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-x11grab
--enable-libx264 --enable-libxvid --enable-openal --enable-openssl
--enable-zlib --enable-nonfree --enable-version3 --extra-libs=-ldl
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 60383.724088, bitrate: 147456 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480,
147456 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
[libx264 @ 0x2aac360] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x2aac360] profile Constrained Baseline, level 3.1
Output #0, hls, to '640x360_.m3u8':
Metadata:
encoder : Lavf55.33.100
Stream #0:0: Video: h264 (libx264), yuv420p, 640x360, q=-1--1, 600
kb/s, 90k tbn, 24 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> libx264)
Press [q] to stop, [?] for help
frame= 32 fps=0.5 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A dup=12
drop=14 frame= 45 fps=0.7 q=32.0 size=N/A time=00:00:00.04 bitrate=N/A
dup=20 drop=24 frame= 59 fps=0.9 q=27.0 size=N/A time=00:00:00.62
bitrate=N/A dup=25 drop=30 frame= 73 fps=1.2 q=27.0 size=N/A
time=00:00:01.20 bitrate=N/A dup=28 drop=35 frame= 82 fps=1.3 q=28.0
size=N/A time=00:00:01.58 bitrate=N/A dup=30 drop=43 frame= 95 fps=1.5
q=27.0 size=N/A time=00:00:02.12 bitrate=N/A dup=31 drop=47 frame= 107
fps=1.7 q=27.0 size=N/A time=00:00:02.62 bitrate=N/A dup=33 drop=52 frame=
120 fps=1.9 q=28.0 size=N/A time=00:00:03.16 bitrate=N/A dup=35 drop=56
frame= 132 fps=2.0 q=27.0 size=N/A time=00:00:03.66 bitrate=N/A dup=37
drop=62 frame= 145 fps=2.2 q=27.0 size=N/A time=00:00:04.20 bitrate=N/A
dup=40 drop=68 frame= 158 fps=2.4 q=27.0 size=N/A time=00:00:04.75
bitrate=N/A dup=41 drop=71 frame= 169 fps=2.5 q=26.0 size=N/A
time=00:00:05.20 bitrate=N/A dup=41 drop=74 frame= 200 fps=3.0 q=27.0
size=N/A time=00:00:06.50 bitrate=N/A dup=66 drop=80 frame= 205 fps=3.0
q=27.0 size=N/A time=00:00:06.70 bitrate=N/A dup=67 drop=108frame= 217
fps=3.2 q=27.0 size=N/A time=00:00:07.20 bitrate=N/A dup=70 drop=115frame=
230 fps=3.3 q=27.0 size=N/A time=00:00:07.75 bitrate=N/A dup=73
drop=120frame= 241 fps=3.5 q=26.0 size=N/A time=00:00:08.20 bitrate=N/A
dup=77 drop=128frame= 253 fps=3.6 q=26.0 size=N/A time=00:00:08.70
bitrate=N/A dup=83 drop=136frame= 279 fps=3.9 q=26.0 size=N/A
time=00:00:09.79 bitrate=N/A dup=102 drop=13^Cav_interleaved_write_frame():
Immediate exit requested
^C Last message repeated 20 times
av_interleaved_write_frame(): Immediate exit requested
^C Last message repeated 175 times
Received signal 2: terminating.]]
Can anyone please help me solve this problem? It is very very urgent.
--
Tejas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20140302/4980d2a5/attachment.html>
More information about the x264-devel
mailing list