Re: [FFmpeg-user] Increasing the decoding speed of yuv444p h.264 files

2015-05-18 Thread Claudiu Rad


On 5/18/2015 7:22 PM, Yan Li wrote:

I've done some more tests. Input file src.flv is in yuv444p with 48
fps. I use the following commands to generate two lossless test files:
1: ffmpeg -i src.flv -c:v libx264 -qp 0 -preset ultrafast -an yuv444p.mkv
2: ffmpeg -i src.flv -c:v libx264 -qp 0 -preset ultrafast -pix_fmt
yuv420p -an yuv420p.mkv

Then I test the decoding speed using:
time ffmpeg -i yuv444p.mkv -f rawvideo -an - /dev/null

  - yuv444p.mkv (496 Mb/s): decoded at 55 fps
  - yuv420p.mkv (336 Mb/s): decoded at 92 fps

(I/O is not the bottleneck here. Four threads are used.)




sorry to question, but:
are you really sure about this? those are really high bitrates and it 
appears to be a direct link between bitrate and decoding speed: 496 x 55 
~= 336 x 92 (by a 10% margin).
I don't know what's the drive access pattern in this case but if seeks 
just a bit, you have a problem.

as a test, I would encode at much smaller bitrates and then compare the fps.
of course, you can measure the disk I/O load with appropriate tools 
during decoding.


--
Claudiu

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


Re: [FFmpeg-user] Increasing the decoding speed of yuv444p h.264 files

2015-05-18 Thread Yan Li
On Mon, May 18, 2015 at 2:00 AM, Carl Eugen Hoyos ceho...@ag.or.at wrote:
 Yan Li elliot.li.tech at gmail.com writes:

 2. I want to archive the files in yuv444p. Is there
 any option that can make ffplay play these files
 faster? I don't mind losing replay quality for now,
 but I do need to keep yuv444p files.

 Please test and report, I would expect that different
 encoding options imply different decoding speeds.

I've done some more tests. Input file src.flv is in yuv444p with 48
fps. I use the following commands to generate two lossless test files:
1: ffmpeg -i src.flv -c:v libx264 -qp 0 -preset ultrafast -an yuv444p.mkv
2: ffmpeg -i src.flv -c:v libx264 -qp 0 -preset ultrafast -pix_fmt
yuv420p -an yuv420p.mkv

Then I test the decoding speed using:
time ffmpeg -i yuv444p.mkv -f rawvideo -an - /dev/null

 - yuv444p.mkv (496 Mb/s): decoded at 55 fps
 - yuv420p.mkv (336 Mb/s): decoded at 92 fps

(I/O is not the bottleneck here. Four threads are used.)

A player that outputs video are slower than pure ffmpeg decoding, thus
the 48 fps yuv444p.mkv looks choppy on my machine.

 Iirc, there is a x264 option that makes the output
 file decode faster.

I'm aware of that option. I can't find this documented anywhere, but
it seems to me that fastdecode has no effect on lossless encoding.

I do have lossy files too. But they are for archive purpose, and I
don't want to sacrifice quality/compression ratio for decoding speed;
I bet future hardware would have no problem playing them.

 3. Are there any chance that the software (ffmpeg or
 x264/x265) can get better optimized in the near
 future (1 or 2 years?)

 I don't have a crystal ball but I can say that this
 was the case in the past (but this is also something
 you could test).

I guess the color space conversion itself can't explain the huge gap
in decoding speed. So it is actually ffmpeg's yuv444p decoding is
compute-intensive. I think what I want to know is whether the code is
already fully optimized/SIMDized, because h264 has been standardized
for a decade, and I'm not sure if someone is still actively optimizing
ffmpeg's h264 decoder. If that's the case I won't expect magic to
happen in the near future, and will just wait for my budget to buy new
hardware. But heck, what do I know about ffmpeg, I won't be surprised
if I were totally wrong.

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


Re: [FFmpeg-user] Increasing the decoding speed of yuv444p h.264 files

2015-05-18 Thread Moritz Barsnick
On Mon, May 18, 2015 at 09:00:36 +, Carl Eugen Hoyos wrote:
 Iirc, there is a x264 option that makes the output 
 file decode faster.

Indeed:

--tune fastdecode, which maps to ffmpeg's libx264's
-tune fastdecode

(Note that using -preset will change some of those settings
additionally. I don't know which of the two options wins or how they
mix.)

See also http://superuser.com/questions/564402/explanation-of-x264-tune

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


Re: [FFmpeg-user] Increasing the decoding speed of yuv444p h.264 files

2015-05-18 Thread Carl Eugen Hoyos
Yan Li elliot.li.tech at gmail.com writes:

 2. I want to archive the files in yuv444p. Is there 
 any option that can make ffplay play these files 
 faster? I don't mind losing replay quality for now, 
 but I do need to keep yuv444p files.

Please test and report, I would expect that different 
encoding options imply different decoding speeds. 
Iirc, there is a x264 option that makes the output 
file decode faster.

 3. Are there any chance that the software (ffmpeg or 
 x264/x265) can get better optimized in the near 
 future (1 or 2 years?)

I don't have a crystal ball but I can say that this 
was the case in the past (but this is also something 
you could test).

Carl Eugen

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