[FFmpeg-user] "-vf mp=softpulldown" drops all frames

Austin de Coup-Crank austindcc at gmail.com
Fri Feb 21 15:43:30 CET 2014


Hi all,So far my mpeg2 conversion looks great, but some of my source
material is 24p and hence I need 3:2 pulldown for NTSC DVDs.

I see the mplayer filter "softpulldown" is available, but when invoked, it
simply drops all frames. As far as I can tell, softpulldown has not been
natively ported into libavfilter yet.

Here is my ffmpeg script:

#!/bin/bash

SOURCE=$1
DESTINATION=$2

VB=$3

VF="mp=softpulldown",\
scale=720:480,\
hqdn3d=2:1:2,\
pp=ac"


# Pass 1
ffmpeg \
-i $SOURCE \
-framerate 24000/1001 \
-vf "$VF" \
-aspect 16:9 \
-dc 10 \
-g 12 \
-b_strategy 2 \
-brd_scale 2 \
-bf 2 \
-lmin 0 \
-lmax '320*QP2LAMBDA' \
-mblmin 1 \
-qmin 1 \
-qmax 31 \
-maxrate 9800k \
-b:v $VB \
-bf 2 \
-pre_dia_size 5 \
-dia_size 5 \
-qcomp 0.7 \
-qblur 0 \
-preme 1 \
-me_method dia \
-sc_threshold 0 \
-sc_factor 4 \
-bidir_refine 4 \
-profile:v 4 \
-mbd rd \
-mbcmp satd \
-precmp satd \
-cmp satd \
-subcmp satd \
-skipcmp satd \
-pass 1 \
-passlogfile ffmpeg \
-threads 4 \
-an \
-f mpeg2video \
-y \
/dev/null

# Pass 2
ffmpeg \
-i $SOURCE \
-vf "$VF" \
-framerate 24000/1001 \
-aspect 16:9 \
-dc 10 \
-g 12 \
-brd_scale 2 \
-bf 2 \
-lmin 0 \
-lmax '320*QP2LAMBDA' \
-mblmin 1 \
-qmin 1 \
-qmax 31 \
-maxrate 9800k \
-b:v $VB \
-bf 2 \
-pre_dia_size 5 \
-dia_size 5 \
-qcomp 0.7 \
-qblur 0 \
-preme 1 \
-me_method dia \
-sc_threshold 0 \
-sc_factor 4 \
-bidir_refine 4 \
-profile:v 4 \
-mbd rd \
-mbcmp satd \
-precmp satd \
-cmp satd \
-subcmp satd \
-skipcmp satd \
-pass 2 \
-passlogfile ffmpeg \
-threads 4 \
-an \
-y \
-f mpeg2video \
$DESTINATION


Here is the output:

ffmpeg version 2.1.3 Copyright (c) 2000-2013 the FFmpeg developers
  built on Feb  8 2014 08:54:30 with Apple LLVM version 5.0
(clang-500.2.79) (based on LLVM 3.3svn)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/2.1.3 --enable-shared
--enable-pthreads --enable-gpl --enable-version3 --enable-nonfree
--enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang
--host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac
--enable-libmp3lame --enable-libxvid
  libavutil      52. 48.101 / 52. 48.101
  libavcodec     55. 39.101 / 55. 39.101
  libavformat    55. 19.104 / 55. 19.104
  libavdevice    55.  5.100 / 55.  5.100
  libavfilter     3. 90.100 /  3. 90.100
  libavresample   1.  1.  0 /  1.  1.  0
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'in/rm-sample.m4v':
  Metadata:
    major_brand     : M4V
    minor_version   : 512
    compatible_brands: isomiso2avc1
    encoder         : Lavf55.19.104
  Duration: 00:00:30.07, start: 0.000000, bitrate: 1536 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
bt709), 1280x720 [SAR 2000:2000 DAR 16:9], 1406 kb/s, 23.98 fps, 23.98 tbr,
24k tbn, 48k tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo,
fltp, 123 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[Parsed_mp_0 @ 0x7fb7f0c0bde0] 'softpulldown' is a wrapped MPlayer filter
(libmpcodecs). This filter may be removed
once it has been ported to a native libavfilter.
[mpeg2video @ 0x7fb7f1023600] Automatically choosing VBV buffer size of 224
kbyte
[mpeg2video @ 0x7fb7f1023600] [lavc rc] Using all of requested bitrate is
not necessary for this video with these parameters.
Output #0, mpeg2video, to 'out/rm-sample.m2v':
  Metadata:
    major_brand     : M4V
    minor_version   : 512
    compatible_brands: isomiso2avc1
    encoder         : Lavf55.19.104
    Stream #0:0(eng): Video: mpeg2video, yuv420p, 720x480 [SAR 32:27 DAR
16:9], q=1-31, pass 2, 8000 kb/s, 90k tbn, 23.98 tbc (default)
    Metadata:
      handler_name    : VideoHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> mpeg2video)
Press [q] to stop, [?] for help
frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.00 bitrate=N/A
dup=0 drop=721
video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead nan%
Output file is empty, nothing was encoded (check -ss / -t / -frames
parameters if used)


I have tried several variations of the above script but it ultimately drops
all frames. I know mp filters are not really supported, I just want to know
if I'm doing something wrong, or if there is another way to insert soft
telecine flags into the mpeg2 stream so I can retain 24p material on a
29.97fps NTSC DVD.

Regards,
Austin


More information about the ffmpeg-user mailing list