Best options for recording x264 1pass?
I always record the "Dog Whisperer" TV show using a regular capture board which delivers 640x480 to mencoder using the following options: /usr/local/bin/mencoder -tv device=/dev/video1:input=3:norm=pal-m:amode=1:contrast=5:saturation=-10 -ovc x264 -x264encopts pass=1:crf=26 -oac mp3lame -o /home/fraga/src/tvrecord-${TODAY}-${NOW}.avi tv:// I have a Core i7 930, 6 GB RAM, 1.5TB Seagate HD. But I notice mencoder suffers to maintain the 29.97 fps... it takes some minutes to reach 29.97 fps and my last recording, the audio was slightly out of sync... Before I used the turbo option and it reaches 29.97 fps in the first seconds of recording, but it seems the turbo option was removed. Is there some options I can use to speed this recording? Thanks. MEncoder SVN-r32789-4.5.1 (C) 2000-2011 MPlayer Team 161 audio & 351 video codecs success: format: 9 data: 0x0 - 0x0 TV file format detected. Selected driver: v4l2 name: Video 4 Linux 2 input author: Martin Olschewski <olschewski@zpr.uni-koeln.de> comment: first try, more to come ;-) Selected device: PowerColor RA330 Tuner cap: STEREO LANG1 LANG2 Tuner rxs: MONO Capabilities: video capture VBI capture device tuner read/write streaming supported norms: 0 = NTSC-M; 1 = NTSC-M-JP; 2 = NTSC-443; 3 = PAL-BG; 4 = PAL-I; 5 = PAL-DK; 6 = PAL-M; 7 = PAL-N; 8 = PAL-Nc; 9 = PAL-60; 10 = SECAM-B; 11 = SECAM-G; 12 = SECAM-H; 13 = SECAM-DK; 14 = SECAM-L; inputs: 0 = for debug only; 1 = Television; 2 = Composite1; 3 = S-Video; Current input: 3 Current format: BGR24 v4l2: current audio mode is : STEREO v4l2: ioctl set format failed: Invalid argument v4l2: ioctl set format failed: Invalid argument Audio block size too low, setting to 16384! [V] filefmt:9 fourcc:0x59565955 size:640x480 fps:29.970 ftime:=0.0334 ========================================================================== Opening audio decoder: [pcm] Uncompressed PCM audio decoder AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400) Selected audio codec: [pcm] afm: pcm (Uncompressed PCM) ========================================================================== Opening video filter: [expand osd=1] Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1 ========================================================================== Opening video decoder: [raw] RAW Uncompressed Video Could not find matching colorspace - retrying with -vf scale... Opening video filter: [scale] Movie-Aspect is undefined - no prescaling applied. [swscaler @ 0x1c01ee0] using unscaled uyvy422 -> yuv420p special converter x264 [info]: using SAR=1/1 x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 x264 [info]: profile Main, level 3.0 Selected video codec: [rawuyvy] vfm: raw (RAW UYVY) ========================================================================== MP3 audio selected. Forcing audio preload to 0, max pts correction to 0. Pos: 0.1s 2f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] -- Linux 2.6.37: Flesh-Eating Bats with Fangs
On Fri, Jan 28, 2011 at 07:28:17PM -0200, Dâniel Fraga wrote:
Before I used the turbo option and it reaches 29.97 fps in the first seconds of recording, but it seems the turbo option was removed.
It wasn't removed in general, but for x264 you should use presets. I never use it myself, but something like -x264encopts preset=ultrafast should be fast, though you might go for some more reasonable speed/quality compromise.
On Sat, 29 Jan 2011 12:14:52 +0100 Reimar Döffinger <Reimar.Doeffinger@gmx.de> wrote:
It wasn't removed in general, but for x264 you should use presets. I never use it myself, but something like -x264encopts preset=ultrafast should be fast, though you might go for some more reasonable speed/quality compromise.
Thanks, I'll try it. -- Linux 2.6.37: Flesh-Eating Bats with Fangs
On Sun, 30 Jan 2011 02:45:55 -0200 Dâniel Fraga <fragabr@gmail.com> wrote:
On Sat, 29 Jan 2011 12:14:52 +0100 Reimar Döffinger <Reimar.Doeffinger@gmx.de> wrote:
It wasn't removed in general, but for x264 you should use presets. I never use it myself, but something like -x264encopts preset=ultrafast should be fast, though you might go for some more reasonable speed/quality compromise.
Thanks, I'll try it.
Hi Reimar, I tried ultrafast, but it doesn't make any difference. Should I try to ask directly the x264 developers for hints on how to optimize the real time encoding? I ask because I do this recording for years, and it always was fine, even with weaker processors (like athlon x2 5600+). Now that I have a Core i7 930, it's amazing to imagine it can't encode it in real time. Unless, of course, the x264 changed to a point where it is much more cpu intensive. Ps: and the "turbo" option changed what options exactly in the past? -- Linux 2.6.37: Flesh-Eating Bats with Fangs
This is not what you asked for, but maybe you consider to use -ovc copy for the recording and transcode afterwards so that real-time transcoding is not critical. Am 28.01.2011 22:28, schrieb Dâniel Fraga:
I always record the "Dog Whisperer" TV show using a regular capture board which delivers 640x480 to mencoder using the following options:
/usr/local/bin/mencoder -tv device=/dev/video1:input=3:norm=pal-m:amode=1:contrast=5:saturation=-10 -ovc x264 -x264encopts pass=1:crf=26 -oac mp3lame -o /home/fraga/src/tvrecord-${TODAY}-${NOW}.avi tv://
I have a Core i7 930, 6 GB RAM, 1.5TB Seagate HD.
But I notice mencoder suffers to maintain the 29.97 fps... it takes some minutes to reach 29.97 fps and my last recording, the audio was slightly out of sync...
Before I used the turbo option and it reaches 29.97 fps in the first seconds of recording, but it seems the turbo option was removed.
Is there some options I can use to speed this recording?
Thanks.
MEncoder SVN-r32789-4.5.1 (C) 2000-2011 MPlayer Team 161 audio & 351 video codecs success: format: 9 data: 0x0 - 0x0 TV file format detected. Selected driver: v4l2 name: Video 4 Linux 2 input author: Martin Olschewski <olschewski@zpr.uni-koeln.de> comment: first try, more to come ;-) Selected device: PowerColor RA330 Tuner cap: STEREO LANG1 LANG2 Tuner rxs: MONO Capabilities: video capture VBI capture device tuner read/write streaming supported norms: 0 = NTSC-M; 1 = NTSC-M-JP; 2 = NTSC-443; 3 = PAL-BG; 4 = PAL-I; 5 = PAL-DK; 6 = PAL-M; 7 = PAL-N; 8 = PAL-Nc; 9 = PAL-60; 10 = SECAM-B; 11 = SECAM-G; 12 = SECAM-H; 13 = SECAM-DK; 14 = SECAM-L; inputs: 0 = for debug only; 1 = Television; 2 = Composite1; 3 = S-Video; Current input: 3 Current format: BGR24 v4l2: current audio mode is : STEREO v4l2: ioctl set format failed: Invalid argument v4l2: ioctl set format failed: Invalid argument Audio block size too low, setting to 16384! [V] filefmt:9 fourcc:0x59565955 size:640x480 fps:29.970 ftime:=0.0334 ========================================================================== Opening audio decoder: [pcm] Uncompressed PCM audio decoder AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400) Selected audio codec: [pcm] afm: pcm (Uncompressed PCM) ========================================================================== Opening video filter: [expand osd=1] Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1 ========================================================================== Opening video decoder: [raw] RAW Uncompressed Video Could not find matching colorspace - retrying with -vf scale... Opening video filter: [scale] Movie-Aspect is undefined - no prescaling applied. [swscaler @ 0x1c01ee0] using unscaled uyvy422 -> yuv420p special converter x264 [info]: using SAR=1/1 x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 x264 [info]: profile Main, level 3.0 Selected video codec: [rawuyvy] vfm: raw (RAW UYVY) ========================================================================== MP3 audio selected. Forcing audio preload to 0, max pts correction to 0. Pos: 0.1s 2f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0]
On Sat, 29 Jan 2011 13:04:21 +0100 socke <socke-99@gmx.de> wrote:
This is not what you asked for, but maybe you consider to use -ovc copy for the recording and transcode afterwards so that real-time transcoding is not critical.
Yes, you're right, but the problem is the huge size :) If I record for hours, the free space will be reduced drastically ;) -- Linux 2.6.37: Flesh-Eating Bats with Fangs
participants (3)
-
Dâniel Fraga -
Reimar Döffinger -
socke