You are the man, -sws_flags fast_bilinear works like a charm! I finally got 28-30 FPS. Strangely, the number of threads does not make any difference. Probably because of this:
[h264 @ 0x759d00]Cannot parallelize deblocking type 1, decoding such frames in sequential order
This is why I had the three separate process idea. perf report dumped out this (just the head of it): # Samples: 1781874 # # Overhead Command Shared Object Symbol # ........ .............. .................................. ...... # 67.34% ffmpeg /usr/lib/libavcodec.so.52.72.2 [.] 0x00000000295472 13.97% ffmpeg /usr/lib/libswscale.so.0.11.0 [.] 0x000000000409b5 5.51% ffmpeg /usr/lib/libavcodec.so.52.72.2 [.] ff_h264_decode_mb_cabac 2.08% ffmpeg /usr/lib/libmp3lame.so.0.0.0 [.] 0x0000000002a9a1 1.65% ffmpeg /usr/lib/libavcodec.so.52.72.2 [.] ff_emulated_edge_mc 1.19% ffmpeg /usr/lib/libmp3lame.so.0.0.0 [.] L3psycho_anal_ns 0.78% ffmpeg /usr/lib/libavcodec.so.52.72.2 [.] ff_h264_pred_direct_motion 0.76% ffmpeg /lib/libc-2.11.1.so [.] memcpy 0.71% ffmpeg /usr/lib/libavcodec.so.52.72.2 [.] ff_epzs_motion_search 0.70% ffmpeg /usr/lib/libavcodec.so.52.72.2 [.] ff_estimate_p_frame_motion Thank you very much for the many useful hints you shared with me. Best regards, Marton ________________________________ From: Reimar Döffinger <Reimar.Doeffinger@gmx.de> To: Marton Sigmond <marton_sigmond@yahoo.com>; MEncoder usage discussions <mencoder-users@mplayerhq.hu> Sent: Tuesday, February 14, 2012 10:16 PM Subject: Re: [MEncoder-users] How to transcode MTS files recorded by Panasonic HDC-SD100 camera? On Tue, Feb 14, 2012 at 12:12:30PM -0800, Marton Sigmond wrote:
That is above 80 FPS.
Following command is executed at 39 FPS: ffmpeg -threads 1 -i %out -f null -s vga -aspect 16:9 -
This one is 42 FPS: ffmpeg -threads 1 -i %out -f null -r 25 -
However when I combine the two it is only 19 FPS: ffmpeg -threads 1 -i %out -f null -r 25 -s vga -aspect 16:9 -
You said your input is 50 fps. So the scaling halves the speed, and -r 25 halves it once more (because with -r 25 you need to decode 2 frames to encode one, and the fps value is in encoded frames). However it would have been more interesting to see the -threads 8 (or similar) results. perf record ffmpeg ... perf report might give an idea where most time is spent, too. Most likely you should start by choosing a simpler scaler. For mencoder/mplayer that is set with the -sws option, and the default is fast bilinear. Use -sws_flags fast_bilinear to choose the same for FFmpeg. For 720p input and on a dual-core Phenom changing -threads 1 and no sws_flags to -threads 8 -sws_flags fast_bilinear resulted in 80 fps -> 125 fps. Going to -sws_flags neighbor gave 130 fps.
One could decode the input stream and convert to 25 fps (1), a second one could resize the stream (2), and a third one could encode the final mpeg stream.
A large enough -threads value should cause decode to run on different cores than the rest. _______________________________________________ MEncoder-users mailing list MEncoder-users@mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users