Re: [FFmpeg-user] Guidance on converting images to video

2015-10-11 Thread Carl Eugen Hoyos
Joseph L. Casale  activenetwerx.com> writes:

> I tried Windows Media Player and it was ok

The colours are expected to be wrong because 
WMP does not support yuvj420p (only yuv420p).

vlc doesn't like low-fps video files.

Carl Eugen

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Guidance on converting images to video

2015-10-10 Thread James Darnley
On 2015-10-11 00:58, Moritz Barsnick wrote:
> On Sun, Oct 11, 2015 at 00:29:25 +0200, James Darnley wrote:
>>
>> And you wonder why it's slow.  You're on x86-64.  You at least have SSE2
>> instructions.  Why are you not using them?  You have to explicitly
>> disable assembly when building x264 to get "none".
> 
> Actually, in my experience, while ffmpeg configure fails when not
> finding an appropriate assembler, x264 would just "silently" compile
> without assembly. This was the case for me when my yasm was too old for
> x264 to be used. But checking current x264's configure script, it
> should actually error out. That said, not only is Joseph's ffmpeg quite
> old, so is the x264 version that ffmpeg uses: core 138. So I'm guessing
> that's what happened, but bad work of a repo to let that slip through!

If that is or was possible at any point then I apologise for jumping to
that conclusion.  Perhaps I have confused which project has which error
message.




signature.asc
Description: OpenPGP digital signature
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Guidance on converting images to video

2015-10-10 Thread Lou
On Sat, Oct 10, 2015, at 01:51 PM, Joseph L. Casale wrote:
[...]
> With some of my attempts to encode with compression, the output
> becomes composed of segments which simply stall as if it were skipping
> frames, whereas the following seems like a start:

I don't quite understand what you are saying.
 
>   ffmpeg -framerate 5 -i %05d-capture.jpg -c:v libx264 -preset veryfast
>   output.mp4

Complete console output missing.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Guidance on converting images to video

2015-10-10 Thread Joseph L. Casale
Hi Lou,

>> With some of my attempts to encode with compression, the output
>> becomes composed of segments which simply stall as if it were skipping
>> frames, whereas the following seems like a start:
>
>I don't quite understand what you are saying.

On several of my attempts where images were captured from
people walking, after encoding with compression I would see
several seconds of the same frame, then a sudden jump. It
was very choppy when using VLC to play back. Based on the
reply from Moritz, I tried Windows Media Player and it was
ok (sorry about missing the boat on that one). So, final cli used
below with the output is actually good.

>>   ffmpeg -framerate 5 -i %05d-capture.jpg -c:v libx264 -preset veryfast
>>   output.mp4
>
> Complete console output missing.

Ugh, I realize I pasted the wrong syntax that I had used. This
produced quality that was too low.

The output from the following attempt produced decent results but
this takes too long and obviously I am doing something wrong if VLC
can't play it and only Windows Media Player seems to play it smoothly?
Is there a codec more suitable for converting JPEG source most efficiently
to a video. I do not have an existing codec requirement, I can use
anything that will help. My goal would be to get processing down to
2 minutes with decent quality. In short order we will be upping the
resolution which will only make things worse.

Thanks a lot for the help,
jlc


# time ffmpeg -y -framerate 5 -i %05d-capture.jpg -codec libx264 /tmp/out4.mp4
ffmpeg version 2.1.5 Copyright (c) 2000-2014 the FFmpeg developers
  built on Feb 14 2015 15:55:55 with gcc 4.8.2 (GCC) 20140120 (Red Hat 4.8.2-16)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg 
--incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man 
--arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 
-fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 
-grecord-gcc-switches -m64 -mtune=generic' --enable-bzlib --disable-crystalhd 
--enable-gnutls --enable-libass --enable-libcdio --enable-libdc1394 
--disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame 
--enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse 
--enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora 
--enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libxvid 
--enable-x11grab --enable-avfilter --enable-avresample --enable-postproc 
--enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug 
--disable-stripping --disable-htmlpages --shlibdir=/usr/lib64 
--enable-runtime-cpudetect
  libavutil  52. 48.101 / 52. 48.101
  libavcodec 55. 39.101 / 55. 39.101
  libavformat55. 19.104 / 55. 19.104
  libavdevice55.  5.100 / 55.  5.100
  libavfilter 3. 90.100 /  3. 90.100
  libavresample   1.  1.  0 /  1.  1.  0
  libswscale  2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc52.  3.100 / 52.  3.100
Input #0, image2, from '%05d-capture.jpg':
  Duration: 00:09:59.40, start: 0.00, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj420p(pc), 352x240 [SAR 1:1 DAR 22:15], 5 
fps, 5 tbr, 5 tbn, 5 tbc
No pixel format specified, yuvj420p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x1bc3e80] using SAR=1/1
[libx264 @ 0x1bc3e80] using cpu capabilities: none!
[libx264 @ 0x1bc3e80] profile High, level 1.2
[libx264 @ 0x1bc3e80] 264 - core 138 r2363 c628e3b - H.264/MPEG-4 AVC codec - 
Copyleft 2003-2013 - 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=12 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=5 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, mp4, to '/tmp/out4.mp4':
  Metadata:
encoder : Lavf55.19.104
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuvj420p, 
352x240 [SAR 1:1 DAR 22:15], q=-1--1, 10240 tbn, 5 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg -> libx264)
Press [q] to stop, [?] for help
frame= 2997 fps= 68 q=-1.0 Lsize=   19630kB time=00:09:59.00 bitrate= 
268.5kbits/s
video:19594kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.184510%
[libx264 @ 0x1bc3e80] frame I:12Avg QP:16.18  size: 32926
[libx264 @ 0x1bc3e80] frame P:1479  Avg QP:18.99  size: 10129
[libx264 @ 0x1bc3e80] frame B:1506  Avg QP:26.17  size:  3113
[libx264 @ 0x1bc3e80] consecutive B-frames:  0.7% 95.8%  3.5%  0.0%
[libx264 @ 0x1bc3e80] mb I  I16..4:  0.0% 99.4%  0.6%
[libx264 @ 0x1bc3e80] mb P  I16..4:  

Re: [FFmpeg-user] Guidance on converting images to video

2015-10-10 Thread Joseph L. Casale
>> [libx264 @ 0x1bc3e80] using cpu capabilities: none!
>
>And you wonder why it's slow.  You're on x86-64.  You at least have SSE2
>instructions.  Why are you not using them?  You have to explicitly
>disable assembly when building x264 to get "none".

So the quickest test was the static packages linked on the ffmpeg
site, that produced greatly improved results. In your opinion, is
the choice of libx264 most optimal for this type of work or do you
recommend something else?

Thanks a lot for taking the time,
jlc

# time ../ffmpeg-git-20151010-64bit-static/ffmpeg -y -framerate 5 -i 
%05d-capture.jpg -codec libx264 /tmp/out.mp4
ffmpeg version N-50355-gdab5f65-static http://johnvansickle.com/ffmpeg/  
Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.9.3 (Debian 4.9.3-4)
  configuration: --enable-gpl --enable-version3 --disable-shared 
--disable-debug --enable-runtime-cpudetect --enable-libmp3lame --enable-libx264 
--enable-libx265 --enable-libwebp --enable-libspeex --enable-libvorbis 
--enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid 
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora 
--enable-libvo-aacenc --enable-libvo-amrwbenc --enable-gray 
--enable-libopenjpeg --enable-libopus --enable-libass --enable-gnutls 
--enable-libvidstab --enable-libsoxr --enable-frei0r --enable-libfribidi 
--cc=gcc-4.9
  libavutil  55.  3.100 / 55.  3.100
  libavcodec 57.  4.101 / 57.  4.101
  libavformat57.  3.100 / 57.  3.100
  libavdevice57.  0.100 / 57.  0.100
  libavfilter 6. 10.100 /  6. 10.100
  libswscale  4.  0.100 /  4.  0.100
  libswresample   2.  0.100 /  2.  0.100
  libpostproc54.  0.100 / 54.  0.100
Input #0, image2, from '%05d-capture.jpg':
  Duration: 00:09:59.40, start: 0.00, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 352x240 
[SAR 1:1 DAR 22:15], 5 fps, 5 tbr, 5 tbn, 5 tbc
No pixel format specified, yuvj420p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x4a6f6e0] using SAR=1/1
[libx264 @ 0x4a6f6e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64
[libx264 @ 0x4a6f6e0] profile High, level 1.2
[libx264 @ 0x4a6f6e0] 264 - core 148 r168 e86f3a1 - H.264/MPEG-4 AVC codec - 
Copyleft 2003-2015 - 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=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=2 
keyint=250 keyint_min=5 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, mp4, to '/tmp/out.mp4':
  Metadata:
encoder : Lavf57.3.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuvj420p(pc), 
352x240 [SAR 1:1 DAR 22:15], q=-1--1, 5 fps, 10240 tbn, 5 tbc
Metadata:
  encoder : Lavc57.4.101 libx264
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame= 2997 fps= 61 q=23.0 Lsize=   19637kB time=00:09:59.00 bitrate= 
268.6kbits/s
video:19601kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB 
muxing overhead: 0.184754%
[libx264 @ 0x4a6f6e0] frame I:12Avg QP:16.22  size: 32827
[libx264 @ 0x4a6f6e0] frame P:1479  Avg QP:18.99  size: 10132
[libx264 @ 0x4a6f6e0] frame B:1506  Avg QP:26.17  size:  3115
[libx264 @ 0x4a6f6e0] consecutive B-frames:  0.7% 95.8%  3.5%  0.0%
[libx264 @ 0x4a6f6e0] mb I  I16..4:  0.0% 99.4%  0.6%
[libx264 @ 0x4a6f6e0] mb P  I16..4:  0.0%  0.3%  0.0%  P16..4: 23.3% 30.7% 
45.7%  0.0%  0.0%skip: 0.0%
[libx264 @ 0x4a6f6e0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 14.0% 13.8% 
16.9%  direct:23.3%  skip:32.0%  L0:52.1% L1:20.9% BI:27.0%
[libx264 @ 0x4a6f6e0] 8x8 transform intra:95.5% inter:98.5%
[libx264 @ 0x4a6f6e0] coded y,uvDC,uvAC intra: 99.9% 97.5% 75.4% inter: 71.4% 
78.5% 52.0%
[libx264 @ 0x4a6f6e0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 17% 25%  4%  9%  5% 
12%  4% 10%
[libx264 @ 0x4a6f6e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 14% 14%  4% 10%  9% 
11%  9% 11%
[libx264 @ 0x4a6f6e0] i8c dc,h,v,p: 59% 19% 14%  7%
[libx264 @ 0x4a6f6e0] Weighted P-Frames: Y:0.4% UV:0.0%
[libx264 @ 0x4a6f6e0] ref P L0: 33.4%  7.5% 32.4% 26.6%  0.1%
[libx264 @ 0x4a6f6e0] ref B L0: 56.3% 43.2%  0.5%
[libx264 @ 0x4a6f6e0] ref B L1: 98.4%  1.6%
[libx264 @ 0x4a6f6e0] kb/s:267.87

real0m49.433s
user0m48.280s
sys 0m0.251s

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Guidance on converting images to video

2015-10-10 Thread Moritz Barsnick
Hi Joseph,

On Sat, Oct 10, 2015 at 21:51:51 +, Joseph L. Casale wrote:
> With some of my attempts to encode with compression, the output
> becomes composed of segments which simply stall as if it were skipping
> frames, whereas the following seems like a start:

If you need help in analyzing issues, you will have to provide the
full, uncut console output in addition to the command line.

> With some of my attempts to encode with compression, the output
> becomes composed of segments which simply stall as if it were skipping
> frames,

And that's definitely not an issue on the player's side?

> however it takes too long. I have over a dozen groups of images appearing
> every 10 minutes and I already use a message passing cluster to offload
> encoding onto multiple hosts.
> 
> Is there a more applicable scheme for use with JPEG images of this size
> or a better route to take in general?

There may be encoders which are faster than libx264, but it certainly
depends on which size, speed, quality hit you are willing to take, what
formats and codecs the player supports (i.e. what's your target), and
so on. (Sorry, that's not helpful. Others may have tips, or you may
want to experiment.)

Moritz
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Guidance on converting images to video

2015-10-10 Thread Joseph L. Casale
>> [libx264 @ 0x1bc3e80] using cpu capabilities: none!
>
>And you wonder why it's slow.  You're on x86-64.  You at least have SSE2
>instructions.  Why are you not using them?  You have to explicitly
>disable assembly when building x264 to get "none".

Right, so these packages are from a 3rd part repo. I will look into another
repo and if I have to I will build my own packages.

Thanks for the info,
jlc

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Guidance on converting images to video

2015-10-10 Thread Moritz Barsnick
On Sun, Oct 11, 2015 at 00:29:25 +0200, James Darnley wrote:
> 
> And you wonder why it's slow.  You're on x86-64.  You at least have SSE2
> instructions.  Why are you not using them?  You have to explicitly
> disable assembly when building x264 to get "none".

Actually, in my experience, while ffmpeg configure fails when not
finding an appropriate assembler, x264 would just "silently" compile
without assembly. This was the case for me when my yasm was too old for
x264 to be used. But checking current x264's configure script, it
should actually error out. That said, not only is Joseph's ffmpeg quite
old, so is the x264 version that ffmpeg uses: core 138. So I'm guessing
that's what happened, but bad work of a repo to let that slip through!

The performance of my x264 build increased by about a factor of 5 (!)
as soon as I had built it with assembly. There you go, better than
buying a new server farm. :-)

Moritz
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user