VideoHelp Forum
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Hello:
    I am trying to capture the content of the secondary monitor on Windows10 with the typical command:
    Code:
    ffmpeg -f gdigrab -i desktop -pix_fmt yuv420p output.mp4
    If the secondary monitor is to the left of the main desktop, it captures both monitors with a width of 3840px (1920+1920). However, if the secondary monitor is located to the right of the primary monitor, the maximum capture width is 3200px and the second monitor's content appears cropped.
    I have tried setting an offset to capture only the secondary monitor:
    Code:
    ffmpeg -f gdigrab -offset_x 1920 -offset_y 0 -video_size 1920x1080 -i desktop -pix_fmt yuv420p output.mp4
    But in this case it doesn't even start capturing it gives me an error indicating that the area to capture exceeds the limits:

    Code:
    Capture area (1920,0),(3840,1080) extends outside window area (0,0),(3200,1200)desktop: I/O error.
    However when the secondary monitor is on the left it seamlessly captures the full width of both monitors (3840px). I can 'solve' the problem by placing the monitor (in Windows settings) on the left but it is counter-intuitive because I have the physical monitor on the right.
    Any suggestions on how to correct this problem?

    Thanks
    Quote Quote  
  2. Member
    Join Date
    Feb 2006
    Location
    United States
    Search Comp PM
    Originally Posted by mgayo View Post
    Hello:
    I am trying to capture the content of the secondary monitor on Windows10 with the typical command:
    Code:
    ffmpeg -f gdigrab -i desktop -pix_fmt yuv420p output.mp4
    If the secondary monitor is to the left of the main desktop, it captures both monitors with a width of 3840px (1920+1920). However, if the secondary monitor is located to the right of the primary monitor, the maximum capture width is 3200px and the second monitor's content appears cropped.
    I have tried setting an offset to capture only the secondary monitor:
    Code:
    ffmpeg -f gdigrab -offset_x 1920 -offset_y 0 -video_size 1920x1080 -i desktop -pix_fmt yuv420p output.mp4
    But in this case it doesn't even start capturing it gives me an error indicating that the area to capture exceeds the limits:

    Code:
    Capture area (1920,0),(3840,1080) extends outside window area (0,0),(3200,1200)desktop: I/O error.
    However when the secondary monitor is on the left it seamlessly captures the full width of both monitors (3840px). I can 'solve' the problem by placing the monitor (in Windows settings) on the left but it is counter-intuitive because I have the physical monitor on the right.
    Any suggestions on how to correct this problem?

    Thanks
    try this here - https://stackoverflow.com/questions/36986037/screen-capture-recorder-to-record-2nd-mon...r-ffmpeg-win-7
    Quote Quote  
  3. Yes. That is precisely what I am already doing.
    The command works correctly when the secondary monitor is on the left but not when the secondary monitor is on the right.
    When it is on the left it captures the 3840px width but when it is on the right it only captures 3200px.
    In both cases the total width is the same (1920+1920=3840).
    What parameter or option needs to be changed to correct this difference?
    Quote Quote  
  4. it may be limited by Windows itself not necessarily by ffmpeg as seem gdigrab is somehow limited accordingly to ffmpeg developers (limited Windows API?) - there is some effort to replace gdigrab by newer Windows API's but i don't expect to happen this soon...
    Quote Quote  



Similar Threads

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