1

Here are the options I'm sending ffmpeg:

ffmpeg. -i input.flv -crf 18 -profile:v baseline -level 3.0 -pix_fmt yuv420p -preset veryslow  output.mp4

Here's the input file:
http://ct.recorder.s3.amazonaws.com/vid_test001.flv

And here's the same video encoded by ElasticTranscoder http://ct.recorder.s3.amazonaws.com/vid_test001.mp4

And here's the file that I get from using ffmpeg
http://ct.recorder.s3.amazonaws.com/vid_test002.mp4

The resulting video from ffmpeg is choppy and appears to have lost a bunch of frames, while the file from ElasticTranscoder is smooth.

How can I preserve the relative smoothness of the original video and get something comparable to ElasticTranscoder, if at all possible?

Here's the console output:

C:\WINDOWS\system32>C:\Users\Jim\Desktop\ffmpeg-20140916-git-b76d613-win64-static\bin\ffmpeg.exe -i "C:/Program Files (x86)/Wowza Media Systems/Wowza Streaming Engine 4.1.0/content/recorder/vid_test00
1.flv" -copyts -crf 1 -profile:v baseline -level 3.0 -pix_fmt yuv420p -preset veryslow -b:v 50000k "C:/Program Files (x86)/Wowza Media Systems/Wowza Streaming Engine 4.1.0/content/recorder/vid_test002
.mp4"
ffmpeg version N-66289-gb76d613 Copyright (c) 2000-2014 the FFmpeg developers
  built on Sep 15 2014 22:11:04 with gcc 4.8.3 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libblu
ray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrw
b --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --
enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
  libavutil      54.  7.100 / 54.  7.100
  libavcodec     56.  1.100 / 56.  1.100
  libavformat    56.  4.101 / 56.  4.101
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  1.100 /  5.  1.100
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
Input #0, flv, from 'C:/Program Files (x86)/Wowza Media Systems/Wowza Streaming Engine 4.1.0/content/recorder/vid_test001.flv':
  Metadata:
    creationdate    : Fri Sep 19 15:58:17
  Duration: 00:00:12.44, start: 0.000000, bitrate: 806 kb/s
    Stream #0:0: Video: flv1, yuv420p, 320x240, 1k tbr, 1k tbn, 1k tbc
    Stream #0:1: Audio: nellymoser, 22050 Hz, mono, flt
File 'C:/Program Files (x86)/Wowza Media Systems/Wowza Streaming Engine 4.1.0/content/recorder/vid_test002.mp4' already exists. Overwrite ? [y/N] y
[libx264 @ 00000000043b55a0] MB rate (300000) > level limit (40500)
[libx264 @ 00000000043b55a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
[libx264 @ 00000000043b55a0] profile Constrained Baseline, level 3.0
[libx264 @ 00000000043b55a0] 264 - core 142 r2479 dd79a61 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=0 ref=16 deblock=1:0:0 analyse=0x1:0x131 me
=umh subme=10 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=24 chroma_me=1 trellis=2 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=1 sliced_threads=0 nr=0 d
ecimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=60 rc=crf mbtree=1 crf=1.0 qcomp=0.60 qpmin=0 qpmax=69
qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'C:/Program Files (x86)/Wowza Media Systems/Wowza Streaming Engine 4.1.0/content/recorder/vid_test002.mp4':
  Metadata:
    creationdate    : Fri Sep 19 15:58:17
    encoder         : Lavf56.4.101
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 320x240, q=-1--1, 50000 kb/s, 1k fps, 16k tbn, 1k tbc
    Metadata:
      encoder         : Lavc56.1.100 libx264
    Stream #0:1: Audio: aac (libvo_aacenc) ([64][0][0][0] / 0x0040), 22050 Hz, mono, s16, 128 kb/s
    Metadata:
      encoder         : Lavc56.1.100 libvo_aacenc
Stream mapping:
  Stream #0:0 -> #0:0 (flv1 (flv) -> h264 (libx264))
  Stream #0:1 -> #0:1 (nellymoser (native) -> aac (libvo_aacenc))
Press [q] to stop, [?] for help
frame=12432 fps=123 q=-1.0 Lsize=    8238kB time=00:00:12.46 bitrate=5413.5kbits/s dup=12220 drop=0
video:7986kB audio:196kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.685852%
[libx264 @ 00000000043b55a0] frame I:50    Avg QP: 0.61  size: 55365
[libx264 @ 00000000043b55a0] frame P:12382 Avg QP: 1.00  size:   437
[libx264 @ 00000000043b55a0] mb I  I16..4: 19.4%  0.0% 80.6%
[libx264 @ 00000000043b55a0] mb P  I16..4:  0.0%  0.0%  0.1%  P16..4:  1.4%  0.1%  0.1%  0.0%  0.0%    skip:98.2%
[libx264 @ 00000000043b55a0] coded y,uvDC,uvAC intra: 92.9% 96.5% 80.6% inter: 1.0% 1.0% 0.9%
[libx264 @ 00000000043b55a0] i16 v,h,dc,p: 21% 14% 38% 27%
[libx264 @ 00000000043b55a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 20% 17%  5%  8%  8%  6%  6%  6%
[libx264 @ 00000000043b55a0] i8c dc,h,v,p: 50% 20% 19% 11%
[libx264 @ 00000000043b55a0] ref P L0: 99.3%  0.5%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.2%  0.0%
[libx264 @ 00000000043b55a0] kb/s:5261.77

I tried to playback with Windows Media Player Classic + CCCP on my desktop, and also whatever HTML5 player that Chrome has.

EDIT:

When playing the resulting video with QuickTime player, it appears smooth. WMPClassic has troubles playing my ffmpeg files, apparently.

  • 1
    Please include the complete ffmpeg console output that goes with your command. Which players and/or devices did you test? Does this issue occur with all inputs or particular ones? If possible please provide an input file if it is specific files that are required to duplicate this issue. Do you need -copyts? – llogan Sep 20 '14 at 0:29
  • @LordNeckbeard added output and information on what I tested it on. I don't need -copyts – Houseman Sep 22 '14 at 15:29
  • I can't tell much of a difference: ffplay vid_test001.mp4 & ffplay vid_test002.mp4. – llogan Sep 22 '14 at 21:46
  • Your two videos are using very different encoding settings. ET uses ABR rate control with -b:v 900k (I'm unsure if was two-pass), and your ffmpeg command uses CRF rate control with -crf 1 (why 1)? Also it appears that -refs is not being set correctly by your ffmpeg command. Does it decode better if you change -crf 1 to -crf 23 and add -refs 3? – llogan Sep 22 '14 at 21:58
  • @LordNeckbeard What's ffplay? What player are you using? If you can't tell much of a difference, either our definitions of "much" varies, or it's my player/computer – Houseman Sep 22 '14 at 22:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.