Answers.Body: <p>Fixed by updating FFMpeg to newer version</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2012-05-16T13:03:45.723Z
Answers.LastActivityDate: 2012-05-16T13:03:45.723Z
Answers.UserDisplayName: Artog
Body: <p>My company transcodes videos sent in by users (recorder by our own screenrecording software)</p>
  
  <p>I use FFMpeg to do the work using this command:</p>
  
  <pre><code> /ffmpeg/ffmpeg -i in.mov -vcodec libx264 -fpre /ffmpeg/ffpresets/libx264-slower.ffpreset   -y out.flv
  </code></pre>
  
  <p>The purpose is to prepare the video for viewing in browser.</p>
  
  <p><strong>The problem is that the first 10, or so, seconds the quality is really poor.</strong></p>
  
  <h2>What can cause this? and how can i fix it?</h2>
  
  <p>Preset settings:</p>
  
  <pre><code>coder=1
  flags=+loop
  cmp=+chroma
  partitions=+parti8x8+parti4x4+partp8x8+partb8x8
  me_method=umh
  subq=8
  me_range=16
  g=250
  keyint_min=25
  sc_threshold=40
  i_qfactor=0.71
  b_strategy=2
  qcomp=0.6
  qmin=0
  qmax=69
  qdiff=4
  bf=3
  refs=5
  directpred=3
  trellis=1
  flags2=+bpyramid+mixed_refs+wpred+dct8x8+fastpskip
  wpredp=2
  rc_lookahead=50
  </code></pre>
  
  <p>Exampel of an input video</p>
  
  <pre><code>Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '84f42bcb67ac616635ef6f99057bbbc46d418295.mov':
  Metadata:
      major_brand     : qt
      minor_version   : 537199360
      compatible_brands: qt
      creation_time   : 2012-03-07 13:45:16
    Duration: 00:15:56.00, start: 0.000000, bitrate: 4108 kb/s
      Stream #0.0(eng): Video: qtrle, rgb24, 1680x945, 3401 kb/s, 13.61 fps, 1k tbr, 1k tbn, 1k tbc
      Metadata:
        creation_time   : 2012-03-07 13:45:16
      Stream #0.1(eng): Audio: pcm_s16be, 44100 Hz, 1 channels, s16, 705 kb/s
      Metadata:
        creation_time   : 2012-03-07 13:45:16
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2012-03-28T18:09:13.337Z
Comments.Text: Any chance you could post an example, both of input and of the poor-quality output? Would help trying to tweak it (and reproduce the problem).
Comments.UserDisplayName: derobert
Tags: <codec><ffmpeg><video-quality><quality><transcoding>
Title: How do I prevent Quality loss in the beginning of a video?
UserDisplayName: Artog
ThreadText: # How do I prevent Quality loss in the beginning of a video?
  
  (Asked by: username_0 on 2012-03-23)
  
  My company transcodes videos sent in by users (recorder by our own screenrecording software)
  
  I use FFMpeg to do the work using this command:
  
  ```
   /ffmpeg/ffmpeg -i in.mov -vcodec libx264 -fpre /ffmpeg/ffpresets/libx264-slower.ffpreset   -y out.flv
  
  ```
  
  The purpose is to prepare the video for viewing in browser.
  
  **The problem is that the first 10, or so, seconds the quality is really poor.**
  
  ## What can cause this? and how can i fix it?
  
  Preset settings:
  
  ```
  coder=1
  flags=+loop
  cmp=+chroma
  partitions=+parti8x8+parti4x4+partp8x8+partb8x8
  me_method=umh
  subq=8
  me_range=16
  g=250
  keyint_min=25
  sc_threshold=40
  i_qfactor=0.71
  b_strategy=2
  qcomp=0.6
  qmin=0
  qmax=69
  qdiff=4
  bf=3
  refs=5
  directpred=3
  trellis=1
  flags2=+bpyramid+mixed_refs+wpred+dct8x8+fastpskip
  wpredp=2
  rc_lookahead=50
  
  ```
  
  Exampel of an input video
  
  ```
  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '84f42bcb67ac616635ef6f99057bbbc46d418295.mov':
  Metadata:
      major_brand     : qt
      minor_version   : 537199360
      compatible_brands: qt
      creation_time   : 2012-03-07 13:45:16
    Duration: 00:15:56.00, start: 0.000000, bitrate: 4108 kb/s
      Stream #0.0(eng): Video: qtrle, rgb24, 1680x945, 3401 kb/s, 13.61 fps, 1k tbr, 1k tbn, 1k tbc
      Metadata:
        creation_time   : 2012-03-07 13:45:16
      Stream #0.1(eng): Audio: pcm_s16be, 44100 Hz, 1 channels, s16, 705 kb/s
      Metadata:
        creation_time   : 2012-03-07 13:45:16
  
  ```
  
  **Tags:** codec, ffmpeg, video-quality, quality, transcoding
  
  > **Comments:**
  > **username_1**: Any chance you could post an example, both of input and of the poor-quality output? Would help trying to tweak it (and reproduce the problem).  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2012-05-16. Score: 2 | Accepted answer
  
  Fixed by updating FFMpeg to newer version
  
  
  ---
  
  