VideoHelp Forum
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. Member Klagar's Avatar
    Join Date
    Sep 2010
    Location
    Montreal, Canada
    Search Comp PM
    Hi !

    I'm starting to create a bunch of "standard" command lines to run FFmpeg, based greatly on Robert Swain's guide to x264... Now I lack some knowledge that I hope to find here...

    Most of my encoding goes to mp4 files with H264 codec, but I also need to have a few efficient commands to convert sources to WMV. So I was wondering if anyone had experimented with WMV's and could share a few tricks he/she's understood over time ? Because so far I've run a few tests but most changes I've tried didn't change much, either quality-wise, or file weight-wise. And I have a major something I want to better, and that is the encoding speed. In WMV, encodings typically run at 8 to 10 fps, whereas H264 encodings go as high as 25-30 fps. I don't know if it's an expected particularity of one or the other codec, and that's exactly one of the things I'd like to know.

    I'll post here the 2-pass line I currently use, so if anyone sees something irregular or just has a general suggestion to make the encoding better and/or faster, feel free to express yourself !

    So thanks in advances to all who will spread their wisdom !
    Regards.

    Pass 1 :

    Code:
    -an
    -pass 1
    -vcodec wmv2
    -vpre slow_firstpass
    -passlogfile 123whatever
    -b 15000k
    -bt 15000k
    -r 29.97
    From slow_firstpass.ffpreset
    coder=1
    flags=+loop
    cmp=+chroma
    partitions=-parti8x8-parti4x4-partp8x8-partb8x8
    me_method=dia
    subq=2
    me_range=16
    g=250
    keyint_min=25
    sc_threshold=40
    i_qfactor=0.71
    b_strategy=2
    qcomp=0.6
    qmin=10
    qmax=51
    qdiff=4
    bf=3
    refs=1
    directpred=3
    trellis=0
    flags2=+bpyramid-mixed_refs+wpred-dct8x8+fastpskip
    wpredp=2
    rc_lookahead=50
    Pass 2 :
    Code:
    Pass 2
    -acodec wmav2
    -ab 192k
    -ar 44100
    -ac 2
    -pass 2
    -vcodec wmv2
    -vpre slow
    -passlogfile 123whatever
    -b 15000k
    -bt 15000k
    -s 1280x720
    -aspect 16:9
    -r 29.97
    From slow.ffpreset
    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=10
    qmax=51
    qdiff=4
    bf=3
    refs=5
    directpred=3
    trellis=1
    flags2=+bpyramid+mixed_refs+wpred+dct8x8+fastpskip
    wpredp=2
    rc_lookahead=50
    Note : I know 15000k as bitrate is rather high, but this is the template for a source file, one for which we must make sure there is no friggin quality loss ! But I tested as well with bitrates as low as 500k and I know rather well what to expect quality-wise.
    Quote Quote  
  2. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    OK, I admit I have used ffmpeg for WMV-encoding very few times,
    and only for curiosity // learning purposes, but hey,
    from what I read on your post, ffmpeg probably is "wasting time"
    on many "unused" options

    Yes, unless the ffmpeg implementation of the WMV compression
    has been "enriched" a lot, the following switches are pointless:

    partitions=-parti8x8-parti4x4-partp8x8-partb8x8

    keyint_min=25

    qmax=51

    flags2=+bpyramid-mixed_refs+wpred-dct8x8+fastpskip
    Besides, and AFAIK,

    -acodec wmav2 does not support -pass 2

    HTH.
    Quote Quote  
  3. Member Klagar's Avatar
    Join Date
    Sep 2010
    Location
    Montreal, Canada
    Search Comp PM
    -acodec wmav2 does not support -pass 2
    Do you mean the encoding should altogether crash, or that it just won't matter to the audio that it is pass 2 ? Cause I just encoded a video and it worked fine !

    Yes, unless the ffmpeg implementation of the WMV compression has been "enriched" a lot, the following switches are pointless:

    partitions=-parti8x8-parti4x4-partp8x8-partb8x8
    keyint_min=25
    qmax=51
    flags2=+bpyramid-mixed_refs+wpred-dct8x8+fastpskip
    Totally true. I removed these parameters from my preset and compared the two video outputs (one with, one without) with Avisynth and it yielded the exact same frigging thing. Points for having simplified my code !

    Great advice, thanks !
    Quote Quote  
  4. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Apologies for not being clear enough

    Do you mean the encoding should altogether crash, or that it just won't matter to the audio that it is pass 2 ?
    ffmpeg simply ignored the 2-pass option ( good boy! )

    Besides: you were telling ffmpeg to encode into WMV while using
    x264 encoding parameters I suppose ffmpeg, again,
    ignores these, and instead it uses the built-in
    "default values" for WMV compression. You'd better read and
    re-read again the ffmpeg documentation.
    Quote Quote  
  5. Member Klagar's Avatar
    Join Date
    Sep 2010
    Location
    Montreal, Canada
    Search Comp PM
    Yeah, I know I didn't do the ideal thing by mixing WMV encoding with x264 parameters... That's exactly why I started this thread, to know what was good or bad to do
    I'd be more than happy to read the documentation, if it weren't so vague... I've been looking for the last month for pertinent information but found sooo little... The closet thing I've encountered to an exhaustive guide was Robert Swain's page, and then again, it's limited to x264...
    Is there any sign I should watch out for that'd tell me if some parameter is compatible with one or another codec ? Or any other useful advice, for that matter ?

    Note on the side : I had to change some of my parameters that, it turns out, didn't fit with my codec. For example, me_method has had to be set to epzs,
    umh and dia were rejected...
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!