VideoHelp Forum
+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 54 of 54
Thread
  1. Image
    [Attachment 42324 - Click to enlarge]


    ahh

    please is there a way to don't see "original framerate = 50" ?
    Quote Quote  
  2. I think the issue lies with nvenc not supporting interlaced sources nor interlaced output, the source needs to be deinterlaced then fed into the encoder.
    Quote Quote  
  3. please ca someone help a cat to do a pipe from ffmpeg and "QSVEncC.exe -i C0034.avs -o V:\C0122\C0034_out.h264" (something like this, but as source not .avs but rawvideo feeded by ffmpeg) ? thanks
    Quote Quote  
  4. Drag/drop AVS file onto batch file (--tff = interlaced):
    Code:
    "G:\Program Files\QSVEnc\QSVEncC\x86\QSVEncC.exe" -i %1 --codec h264 --quality best --gop-len 60 --b-pyramid --scenechange --cqp 18:20:22 --ref 4 --sar 1:1 --colormatrix bt709 --tff  -o "%~dpnx1.qsvenc.mkv"
    Quote Quote  
  5. but maybe I have necessity of the muxer of ffmpeg to manage audio and other, so if possibile I would like pipe qsvencc in ffmpeg

    for example: using x264

    Code:
    v:\automazioneclip\core\ffmpeg64bitmar2017.exe -threads 12 -y -f concat -safe 0 -i concatList.txt -filter_complex "[0:1] [0:2] amerge" -vf scale=interl=1 -pix_fmt yuv420p -c:v libx264 -profile:v main -level:v 4.1 -g 33 -bf 2 -crf 24 -flags +ildct+ilme -top 1 -c:a ac3 -b:a 320k -ar 48000 -aspect 16:9 MP4_HD_420.MP4
    rem
    I wonder if I let feed ffmpeg in pipe with qsvencc
    Last edited by marcorocchini; 15th Jul 2017 at 19:25.
    Quote Quote  
  6. Originally Posted by marcorocchini View Post
    but maybe I have necessity of the muxer of ffmpeg to manage audio and other, so if possibile I would like pipe qsvencc in ffmpeg

    for example: using x264

    Code:
    v:\automazioneclip\core\ffmpeg64bitmar2017.exe -threads 12 -y -f concat -safe 0 -i concatList.txt -filter_complex "[0:1] [0:2] amerge" -vf scale=interl=1 -pix_fmt yuv420p -c:v libx264 -profile:v main -level:v 4.1 -g 33 -bf 2 -crf 24 -flags +ildct+ilme -top 1 -c:a ac3 -b:a 320k -ar 48000 -aspect 16:9 MP4_HD_420.MP4
    rem
    I wonder if I let feed ffmpeg in pipe with qsvencc


    I don't speak "cat" . Can you clarify in english ?

    Did you want
    video => ffmpeg pipe => qsvencc encode ?

    What about audio ? qsvencc can encode audio, but only if input is av codec direct input . But I don't think 422 is supported

    You can't "pipe" qsvencc output into ffmpeg, pipes are only for uncompressed data . But maybe make a batch calling multiple sequential operations

    Easiest would be ffmpeg qsv if you can get that to work reliably
    Quote Quote  
  7. video => ffmpeg pipe => qsvencc encode ?

    maybe yes but it's too complicate: the problem is QSV encoding using ffmpeg is not reliable

    using the same commandline sometimes encoding fails, sometime work, sometime freeze during encoding.
    I have change ffmpeg 32/64bit all version from april 2016 to now but nothing to do.
    I have change the intel HD4600 drivers but the problem remains. NVidia NCENC encoding is not bad but the quality is not the same of the QSV encoder that I prefer.

    For example just now I try to encode 139 MXF files using:

    Code:
    ffmpeg64bitjuly2017.exe -threads 12 -y -f concat -safe 0 -i concatList.txt -filter_complex "[0:1] [0:2] amerge" -pix_fmt nv12 -vf scale=interl=1,format=pix_fmts=nv12 -c:v h264_qsv -global_quality 27 -level:v 4.1 -flags +ildct+ilme -top 1 -aspect 16:9 -c:a ac3 -b:a 320k -ar 48000 -aspect 16:9 QSV.MP4
    where concatlist.txt is

    file 'V:\recanati\C0003.MXF'
    file 'V:\recanati\C0005.MXF'
    file 'V:\recanati\C0008.MXF'
    file 'V:\recanati\C0010.MXF'
    file 'V:\recanati\C0013.MXF'
    ....
    file 'V:\recanati\C0139MXF'

    after 3-4 minutes to the start... it frezze
    Last edited by marcorocchini; 16th Jul 2017 at 06:25.
    Quote Quote  
  8. Originally Posted by marcorocchini View Post
    video => ffmpeg pipe => qsvencc encode ?

    For example just now I try to encode 139 MXF files using:

    Code:
    ffmpeg64bitjuly2017.exe -threads 12 -y -f concat -safe 0 -i concatList.txt -filter_complex "[0:1] [0:2] amerge" -pix_fmt nv12 -vf scale=interl=1,format=pix_fmts=nv12 -c:v h264_qsv -global_quality 27 -level:v 4.1 -flags +ildct+ilme -top 1 -aspect 16:9 -c:a ac3 -b:a 320k -ar 48000 -aspect 16:9 QSV.MP4
    where concatlist.txt is

    file 'V:\recanati\C0003.MXF'
    file 'V:\recanati\C0005.MXF'
    file 'V:\recanati\C0008.MXF'
    file 'V:\recanati\C0010.MXF'
    file 'V:\recanati\C0013.MXF'
    ....
    file 'V:\recanati\C0139MXF'

    after 3-4 minutes to the start... it frezze
    First i would concatenate files to single file then reencode with HW, second not sure but HW encoding may not work in multithreading - split both operations (i.e. separate concatenate from encoding).
    Quote Quote  
  9. I have test h264_qsv over a single file (not concat), over an .avs and in all cases in single true video files but ... the same problem: it return an error, sometime works, sometimes frezze randomly.

    Also I have remove the -threads 12 from commandline, but the problem remains

    Image
    [Attachment 42339 - Click to enlarge]

    Image
    [Attachment 42340 - Click to enlarge]

    Image
    [Attachment 42341 - Click to enlarge]
    Quote Quote  
  10. Originally Posted by marcorocchini View Post
    Originally Posted by raffriff42 View Post
    You have a notebook, don't you - and doesn't the nVidia notebook GPU shut down (reverting to CPU graphics) sometimes to save power? If so, you might want to force the GPU to stay active when connected to AC power, using power profiles.

    I dont' know but not sure is a problem of the power profile however I keep alwais the maximum power in the pc using

    powercfg.exe /setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
    When encoding with nv_enc, try temporarily disabling the Intel GPU. This will force the nVidia GPU to be active full time. This is the way I run my desktop. Device Manager, Display Adapters, Intel -> disable.
    Quote Quote  
  11. Originally Posted by marcorocchini View Post
    video => ffmpeg pipe => qsvencc encode ?

    maybe yes but it's too complicate: the problem is QSV encoding using ffmpeg is not reliable
    Do you understand that single pipe to qsvencc only encode video, no audio. It only accepts 1 pipe. Audio has to be done in other step, muxed in other step, maybe in a batch

    But you can test it anyways, and if it work, it really is ffmpeg qsv implementation problem. I read some old threads about buffer flushing problem or something like that

    interlaced 422 => interlaced 420 pipe looks like this . You have many rate control options in qsvencc

    Code:
    ffmpeg -i "input.ext" -vf scale=interl=1,format=pix_fmts=yuv420p -c:v rawvideo -an -f rawvideo - | QSVEncC64.exe --raw --input-res 1920x1080 --fps 25 -i - --codec h264 --tff --la-icq 24 -o "output.mp4"

    Code:
    Encode Mode Options:
     EncMode default: --cqp
       --cqp <int> or               encode in Constant QP, default 24:26:27
             <int>:<int>:<int>      set qp value for i:p:b frame
       --vqp <int> or               encode in Variable QP, default 24:26:27
             <int>:<int>:<int>      set qp value for i:p:b frame
       --la <int>                   set bitrate in Lookahead mode (kbps)
       --la-hrd <int>               set bitrate in HRD-Lookahead mode (kbps)
       --icq <int>                  encode in Intelligent Const. Quality mode
                                      default value: 23
       --la-icq <int>               encode in ICQ mode with Lookahead
                                      default value: 23
       --cbr <int>                  set bitrate in CBR mode (kbps)
       --vbr <int>                  set bitrate in VBR mode (kbps)
       --avbr <int>                 set bitrate in AVBR mode (kbps)
                                     AVBR mode is only supported with API v1.3
       --avbr-unitsize <int>        avbr calculation period in x100 frames
                                     default 90 (= unit size 9000 frames)
       --qvbr <int>                 set bitrate in Quality VBR mode.
                                     requires --qvbr-q option to be set as well
       --qvbr-q <int>  or           set quality used in qvbr mode. default: 23
       --qvbr-quality <int>          QVBR mode is only supported with API v1.11
       --vcm <int>                  set bitrate in VCM mode (kbps)
    Quote Quote  
  12. Originally Posted by marcorocchini View Post
    I have test h264_qsv over a single file (not concat), over an .avs and in all cases in single true video files but ... the same problem: it return an error, sometime works, sometimes frezze randomly.

    Also I have remove the -threads 12 from commandline, but the problem remains
    qsv can be tricky when compared to nvenc - seem there is some issue with session start and stop on qsv - that's why i preferred to use nvenc over qsv.
    Quote Quote  
  13. Originally Posted by poisondeathray View Post
    Originally Posted by marcorocchini View Post
    video => ffmpeg pipe => qsvencc encode ?

    maybe yes but it's too complicate: the problem is QSV encoding using ffmpeg is not reliable
    Do you understand that single pipe to qsvencc only encode video, no audio. It only accepts 1 pipe. Audio has to be done in other step, muxed in other step, maybe in a batch

    But you can test it anyways, and if it work, it really is ffmpeg qsv implementation problem. I read some old threads about buffer flushing problem or something like that

    interlaced 422 => interlaced 420 pipe looks like this . You have many rate control options in qsvencc

    Code:
    ffmpeg -i "input.ext" -vf scale=interl=1,format=pix_fmts=yuv420p -c:v rawvideo -an -f rawvideo - | QSVEncC64.exe --raw --input-res 1920x1080 --fps 25 -i - --codec h264 --tff --la-icq 24 -o "output.mp4"

    Code:
    Encode Mode Options:
     EncMode default: --cqp
       --cqp <int> or               encode in Constant QP, default 24:26:27
             <int>:<int>:<int>      set qp value for i:p:b frame
       --vqp <int> or               encode in Variable QP, default 24:26:27
             <int>:<int>:<int>      set qp value for i:p:b frame
       --la <int>                   set bitrate in Lookahead mode (kbps)
       --la-hrd <int>               set bitrate in HRD-Lookahead mode (kbps)
       --icq <int>                  encode in Intelligent Const. Quality mode
                                      default value: 23
       --la-icq <int>               encode in ICQ mode with Lookahead
                                      default value: 23
       --cbr <int>                  set bitrate in CBR mode (kbps)
       --vbr <int>                  set bitrate in VBR mode (kbps)
       --avbr <int>                 set bitrate in AVBR mode (kbps)
                                     AVBR mode is only supported with API v1.3
       --avbr-unitsize <int>        avbr calculation period in x100 frames
                                     default 90 (= unit size 9000 frames)
       --qvbr <int>                 set bitrate in Quality VBR mode.
                                     requires --qvbr-q option to be set as well
       --qvbr-q <int>  or           set quality used in qvbr mode. default: 23
       --qvbr-quality <int>          QVBR mode is only supported with API v1.11
       --vcm <int>                  set bitrate in VCM mode (kbps)
    thanks cat but I suppose This commandline don't have audio?
    Quote Quote  
  14. I have try the commandline

    Code:
    ffmpeg64bitjuly2017 -i c0113.mxf -vf scale=interl=1,format=pix_fmts=yuv420p -c:v rawvideo -an -f rawvideo - | QSVEncC64.exe --raw --input-res 1920x1080 --fps 25 -i - --tff --la-icq 24 -o output.mp4
    without the --codec h264 otherwise:

    Code:
    QSVEncC.exe --input-res 1920x1080 --fps 25 -i c0034.avs --codec h264 --tff --la-icq 24 -o output.mp4
    Error: Unknown value for codec
    so what version of QSVEncC.exe/QSVEncC64.exe are you using?

    However removing "--codec h264" from the commandline the pipe generate the final output but in VLC won't play. Also using the 32 bit version

    Code:
    QSVEncC.exe --input-res 1920x1080 --fps 25 -i c0034.avs --codec h264 --tff --la-icq 24 -o output.mp4
    where C0034.avs is:

    Code:
    LoadPlugin("C:\staxrip\Applications\AviSynth plugins\ffms2\ffms2.dll")
    FFVideoSource("V:\C0122\C0034.MXF", cachefile = "V:\C0122\C0034 temp files\C0034.ffindex")
    AssumeFPS(25.000000)
    ConvertToYV12()
    I attach the output.mp4 here

    However I wonder:

    what parameters I have to take to NVENC which correspond to the maximum with these QSV parameters?

    ------------------------------------------------------------
    Encoding video command line encoder: Intel H.264 Encoder
    ------------------------------------------------------------

    "C:\staxrip\Applications\QSVEncC\QSVEncC.exe" --sar 1:1 -i "V:\C0122\C0049 temp files\C0049.avs" -o "V:\C0122\C0049 temp files\C0049_out.h264"

    V:\C0122\C0049 temp files\C0049.avs
    QSVEnc 1.31 (x86), based on Intel(R) Media SDK Encoding Sample 6,0,0,98947
    OS Unknown (x64)
    CPU Info Intel Core i7-4702MQ @ 2.20GHz [TB: 2.90GHz] (4C/8T)
    GPU Info Intel HD Graphics 4600 (20 EU) @ 1150 MHz (20.19.15.4624)
    Media SDK QuickSyncVideo (hardware encoder), 1st GPU, API v1.13
    Buffer Memory d3d9, 3 input buffer
    Input Frame Info Avisynth 2.60 (yv12)->nv12[AVX2], 1920x1080, 25/1 fps
    Output Video H.264/AVC High @ Level 4
    1920x1080p 1:1 25.000fps (25/1fps)
    Target usage 4 - balanced
    Encode Mode Constant QP (CQP)
    CQP Value I:24 P:26 B:27
    QP Limit min: none, max: none
    Trellis Auto
    Ref frames 2 frames
    Bframes 3 frames?????? off
    Max GOP Length 250 frames
    Scene Change on


    qsvencc --check-features 1>features.txt

    QSVEncC (x86) 1.19 by rigaya, build Mar 25 2014 23:31:39
    based on Intel(R) Media SDK Encoding Sample 5,0,337,0
    avi reader: enabled
    avs reader: enabled
    vpy reader: enabled

    Media SDK Hardware API v1.8
    Supported features:
    CBR VBR AVBR CQP VQP LA ICQ LAICQ VCM
    RC mode available o o o o o o o o x
    VUI info output o o o o o o o o x
    Trellis o o o o o o o o x
    Adaptive_I x x x x x x x x x
    Adaptive_B x x x x x x x x x
    B_Pyramid x x x x x x x x x
    Ext_BRC o o o x x x o x x
    MBBRC o o o x x x o x x
    Lookahead Quality x x x x x o x o x


    Media SDK Software API v1.8
    Supported features:
    CBR VBR AVBR CQP VQP LA ICQ LAICQ VCM
    RC mode available o o o o o x x x x
    VUI info output o o o o o x x x x
    Trellis x x x x x x x x x
    Adaptive_I o o o o o x x x x
    Adaptive_B o o o o o x x x x
    B_Pyramid o o o o o x x x x
    Ext_BRC x x x x x x x x x
    MBBRC x x x x x x x x x
    Lookahead Quality x x x x x x x x x


    Image
    [Attachment 42351 - Click to enlarge]
    Image Attached Files
    Last edited by marcorocchini; 17th Jul 2017 at 07:34.
    Quote Quote  
  15. Ahnn .. ok
    maybe I use an older version of QSVenCc

    downloaded now the 2.71

    Where source422 is this usual MXF:

    https://www.dropbox.com/s/829iziwuetpdqm4/source422.MXF?dl=0

    I try:

    Code:
    ffmpeg64bitjuly2017 -i source422.mxf -vf scale=interl=1,format=pix_fmts=yuv420p -c:v rawvideo -an -f rawvideo - | c:\q\QSVEncC\x86\QSVEncC.exe --input-res 1920x1080 --fps 25 --raw -i - --codec h264 --tff --la-icq 24 -o output.mp4
    but output.mp4 is the attached green screen

    Image
    [Attachment 42354 - Click to enlarge]


    maybe a wrong little parameter in the pipe?
    Image Attached Files
    Last edited by marcorocchini; 20th Jul 2017 at 18:23.
    Quote Quote  
  16. I used 2.62 . Works here. Maybe problem with your driver / version mismatch ?
    Quote Quote  
  17. Code:
    ffmpeg64bitjuly2017 -i source422.mxf -vf scale=interl=1,format=pix_fmts=yuv420p -c:v rawvideo -an -f rawvideo - | c:\QSVENC262\x86\QSVEncC.exe --input-res 1920x1080 --fps 25 --raw -i - --codec h264 --tff --la-icq 24 -o output.mp4
    QSVENC 2.62 works

    and work also the 64bit version
    Code:
    ffmpeg64bitjuly2017 -i source422.mxf -vf scale=interl=1,format=pix_fmts=yuv420p -c:v rawvideo -an -f rawvideo - | c:\QSVENC262\x64\QSVEncC64.exe --input-res 1920x1080 --fps 25 --raw -i - --codec h264 --tff --la-icq 24 -o output.mp4
    but can audio passed trough the pipe?

    And 1 little problem:

    General
    Complete name : V:\C0122\output.mp4
    Format : MPEG-4
    Format profile : Base Media / Version 2
    Codec ID : mp42
    File size : 37.0 MiB
    Duration : 14s 80ms
    Overall bit rate : 22.1 Mbps
    Writing application : QSVEncC (x64) 2.62

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L4.0
    Format settings, CABAC : Yes
    Format settings, ReFrames : 3 frames
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 14s 80ms
    Bit rate : 22.1 Mbps
    Width : 1 920 pixels
    Height : 1 080 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Constant
    Frame rate : 50.000 fps
    Original frame rate : 25.000 fps
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Interlaced
    Scan order : Top Field First
    Bits/(Pixel*Frame) : 0.213
    Stream size : 37.0 MiB (100%)

    Why framerate is 50 fps? it should be 25
    Last edited by marcorocchini; 17th Jul 2017 at 13:12.
    Quote Quote  
  18. I answered the audio questions above

    Not sure about the framerate, or why both nvenc and qsv don't like interlaced video rate (it's field rate, not frame rate)

    Or use libx264, more stable, better quality , fewer problems, but much slower
    Quote Quote  
  19. Originally Posted by poisondeathray View Post
    I answered the audio questions above

    Not sure about the framerate, or why both nvenc and qsv don't like interlaced video rate (it's field rate, not frame rate)

    Or use libx264, more stable, better quality , fewer problems, but much slower
    Image
    [Attachment 42364 - Click to enlarge]


    Code:
    ffmpeg64bitjuly2017 -i source422.mxf -vf scale=interl=1,format=pix_fmts=yuv420p -c:v rawvideo -an -f rawvideo - | c:\QSVENC262\x86\QSVEncC.exe --input-res 1920x1080 --fps 25 --raw -i - --codec h264 --tff --la-icq 24 -o output.mkv

    maybe a feline solution: QSVencC don't encode with the correct framerate to .mp4 container

    try to mkv and all is ok
    Quote Quote  
  20. Originally Posted by poisondeathray View Post
    I used 2.62 . Works here. Maybe problem with your driver / version mismatch ?
    seems that encoding versus MP4 generate FPS error, versus MKV seems that only mediainfo show the correct framerate but internally the FPS is alwais wrong.

    Meanwhile in H264 seems ok

    Code:
    c:\QSVENC262\x86\QSVEncC.exe --fps 25 --avs -i v:\c0122\source422.avs --codec h264 --tff --gop-len 33 --bframes 1 --trellis b --qvbr 11500 --qvbr-q 26 -o output.h264
    where source422.avs is:

    Code:
    Import("v:\automazioneclip\avisynth\plugins\IResize.avsi")
    LoadPlugin("v:\automazioneclip\avisynth\plugins\LSMASHSource.dll")
    LoadCPlugin("v:\automazioneclip\core\yadif.dll")  
    vid=LWLibavVideoSource("V:\c0122\source422.MXF").convertToYV12(interlaced=true)
    left = ffaudiosource("V:\c0122\source422.MXF", track = 1)
    right = ffaudiosource("V:\c0122\source422.MXF", track = 2)
    both=mergechannels(left, right)
    audiodub(vid,both)
    poison please can I encode all the audio pack that are in the original source422.MXF file into the output.h264 ?
    Quote Quote  
  21. Use a batch file, temp directory, sequential steps . Mux with mp4box or lsmashworks or ffmpeg. You won't be able to do it with 1 step in qsvencc (and you don't want it to mux anyways, since your framerate errors for interlaced video are from qsvencc muxing)
    Quote Quote  
  22. Originally Posted by marcorocchini View Post
    can I encode all the audio pack that are in the original source422.MXF file into the output.h264 ?
    .h264 is an elementary stream of h.264 encoded video. By definition it is only video.
    Quote Quote  
  23. please is it possible pipe this

    Code:
    v:\automazioneclip\core\ffmpeg64bit332.exe -y -threads 12 -y -f concat -safe 0 -i concatlist.txt -vf scale=interl=1,format=pix_fmts=yuv420p -c:v rawvideo -an -f rawvideo - |  V:\automazioneclip\core\QSVenc262\x86\QSVEncC.exe --input-res 1920x1080 --fps 25 --raw -i - --codec h264 --tff --trellis ALL --la-icq 31 --la-depth 50 --gop-len 250 --bframes 3 --strict-gop --quality high -o concatHD.h264
    with this

    Code:
    V:\automazioneclip\core\MP4Box\mp4box.exe -fps 25.000000 -add "concatHD.H264#video:name=Video" -add "concatHD.mp3#audio:name=Audio" -new "concatHD.mp4"

    where the concatHD.mp3 is made in advance?
    Quote Quote  
  24. Originally Posted by marcorocchini View Post
    please is it possible pipe this

    Code:
    v:\automazioneclip\core\ffmpeg64bit332.exe -y -threads 12 -y -f concat -safe 0 -i concatlist.txt -vf scale=interl=1,format=pix_fmts=yuv420p -c:v rawvideo -an -f rawvideo - |  V:\automazioneclip\core\QSVenc262\x86\QSVEncC.exe --input-res 1920x1080 --fps 25 --raw -i - --codec h264 --tff --trellis ALL --la-icq 31 --la-depth 50 --gop-len 250 --bframes 3 --strict-gop --quality high -o concatHD.h264
    with this

    Code:
    V:\automazioneclip\core\MP4Box\mp4box.exe -fps 25.000000 -add "concatHD.H264#video:name=Video" -add "concatHD.mp3#audio:name=Audio" -new "concatHD.mp4"

    where the concatHD.mp3 is made in advance?

    No. pipes are for uncompressed data , I already mentioned that above .

    mp4box requires physical file, doesn't accept pipe input

    Do h264 in advance, do mp3 in advance, then mp4box in the last step (or delete temp files in the last step)
    Quote Quote  



Similar Threads

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