Question / Help Wrong Resolution Captured (SOLVED)

hyperbolics

New Member
When I do local captures (FLV x264), it adds vertical lines to the video. Searching the web info says that encoders sometimes add lines to footage to make it divisible by a certain number. The lines are dropped when I play the footage back so it's okay for display. The problem is the lines are NOT dropped when I import the video into software. So I always have to crop out the extra lines that were added.

What I read all said for x264 it should be divisible by 8 or 16. I capture at 1280x720, which is divisible by 8 and 16, but OBS still adds lines internally making it 1280x738. Again no problem on display because all media players drop the lines and display the video at 1280x720 only. Just a problem with my editing software because I have to crop the extra pixels out.

I've tested different resolutions but OBS still adds lines to them (just a different number of lines depending). Is there a trick to making sure OBS doesn't need to add those lines? So far here's what I found keeping 1280x720 as the OBS base resolution with no downscaling in all cases...

WHEN GAME IS IN WINDOWED MODE & SET TO 1280X720

- Using game capture returns 1280x720. Using window capture adds the extra buffer lines (1280x738). Doesn't matter if I select inner/entire or set 1280x720 sub region. It still adds the 18 pixels.

WHEN GAME IS IN FULLSCREEN MODE & SET TO 1280X720

- Both game capture and window capture add the extra buffer lines (1280x738).

My workaround would be just sticking to windowed mode for every game to keep the "internal" resolution consistent with the display resolution. The problem is half of the games I play don't run in windowed mode (besides some games need fullscreen for the experience), so figuring out how to stop those 38 pixels getting added on the backend will really help.
 
Last edited:

Fenrir

Forum Admin
Can you provide a sample video that shows this?

Also, what editor? This might be a configuration issue with your editor, and not an issue with the files themselves.
 

hyperbolics

New Member
That VLC sources thread is only related in the sense that we're both talking about internal resolution ("buffer size/capture resolution") vs. display resolution.

Can't provide a video sample. It's all videos where the internal resolution and display resolution of the file are different and the only thing that results in the internal resolution and display resolution being the same is recording with game capture in windowed mode.

My display is 16:10 (1440x900). This still happens even if I use monitor as the base resolution rather than a custom 16:9 or 4:3. I'm using 1280x720 as an example. It doesn't matter what resolution I choose. This is a constant.

Recording with game capture in windowed mode results in both resolutions being the same. Recording any other way results in the internal resolution having extra line data added. The only difference from one resolution to the next is how many lines of data it adds.

I've already contacted Adobe support to see if there's a way to force their software to only import files at the display resolution. That's a separate issue. The problem starts with the files.

Clarifying what I'm doing, I'm not live streaming or using plugins. All I'm doing is local game capture to an FLV file. I later move it to an MP4 container for editing but the difference in resolution is already in the FLV file.

Most software that can analyze the stats of a video file have a separate field for the "internal resolution" or whatever they want to call it and the display resolution.

In all of the software I've analyzed the files with, they show that the files I record with game capture in windowed mode have the same internal resolution as display resolution while all of the files I record any other way have a different internal resolution from the display resolution. It's right there in the file's data, so it's not being caused by my video editors.

Like I said, it having a different internal resolution isn't a problem if all I'm doing is watching the video back or uploading it somewhere because the extra lines get dropped on playback. It's only a problem if I need to import it into my software because the lines don't get dropped there. I have to crop them out.

Fixing my software to import without the extra lines won't address what's causing OBS to add the extra lines in the first place. I need to know that because I may not be able to fix the importing.

Again, since everything I've read online has stated that encoders add data to files when needed, I can't imagine this isn't an x264 issue. The question is whether or not there are settings I can change in OBS (or with my graphics card) that will affect the encoder.

Hopefully that helped clear things up a bit!
 

Fenrir

Forum Admin
The reason I ask for a sample file is because I'm not able to replicate this on my end. Can you post the ffprobe output of one of the original flvs?

EDIT: Or at the very, VERY least, please provide a log file that shows a recording session.
 
Not sure why but I guess you see something like this:

OBS Res Error.PNG

I did something really horrible to create this file.
Base Resolution 1280x720
Scaled Resolution 1280x720

Single scene with one source, Game Capture, set to Capture any Full Screen Application

Start a game, set the resolution to 1280x720 make sure Full screen is enabled. My laptop has a stupid resolution 3200x1800.

Resultant video details from VLC show the problem.

Let me know if you need any more info, I also attached the log.

BTW I expect horrible encoding problems, my laptop is not designed for gaming or recording :-)
 

Attachments

  • 2017-06-26 20-43-53.txt
    16.3 KB · Views: 59

hyperbolics

New Member
I already deleted the original files since I finished with those projects already. I'm not home to make new test files but it may not help. I finally heard back from a friend of mine who said he had this same problem (not using OBS but that other popular capture) and found the encoder was treating the games differently on their individual programming, like how they were configured internally by the developer beyond the resolution options we could see.

So it could be that I had a bunch of games that OBS captured in the same way because they were all configured in the backend by their respective developers the same way. I won't know because I download and removes dozens of games each day on these computers for what I do. I can't go back and figure out which ones were what and from which batches and if I install something random now just for testing, it might be apples and oranges if it does or doesn't behave the same.

The only workaround he found was to switch up his capture on a game by game basis, in some cases he could guess pretty easily which would encode a certain way (e.g. all his unity 3d games that have config screen built-in captured the same). I'll see if I notice any patterns with the games themselves that could be affecting how OBS is encoding the footage then and update this thread if I find anything!
 

hyperbolics

New Member
Not sure why but I guess you see something like this:

View attachment 27935

I did something really horrible to create this file.
Base Resolution 1280x720
Scaled Resolution 1280x720

Single scene with one source, Game Capture, set to Capture any Full Screen Application

Start a game, set the resolution to 1280x720 make sure Full screen is enabled. My laptop has a stupid resolution 3200x1800.

Resultant video details from VLC show the problem.

Let me know if you need any more info, I also attached the log.

BTW I expect horrible encoding problems, my laptop is not designed for gaming or recording :-)

Oh Adrian yes! The fields in the screen capture you show are how I meant different software that I use to look at the media details show up. I tried four different analyzers that showed the display resolution back when I was testing and this is what they showed, one resolution listed said 720 and the other said 738. Other resolutions had other numbers I don't recall now.

And the resolutions shown in the second field are the resolutions that my files end up getting imported at so my 1280x720 footage for example ends up importing at 1280x738. Thank you for posting your log since I can't do a good test right now. Maybe yours will help!
 

Fenrir

Forum Admin
That's a VLC issue, and is not indicative of a faulty file. If you can replicate easily, please create a small sample video file that can be uploaded (raw, to something like dropbox or google drive, not to youtube) for us to examine properly.
 

hyperbolics

New Member
Sorry not sure if you're talking to me or Adrian? Adrian's screenshot is from VLC. I'm not using anything VLC, unless you mean since OBS x264 encoder is from Videolan's library? I just said the software I used to analyze my files also shows media info that displays the two resolutions as internally different just like Adrian's does.

Nothing is faulty with my files. I said the encoder is adding lines which as searched is common when an encoder feels necessary to add that data. What I'm looking for is if I can control it so it only captures at the right resolution without padding.

Because all the info I've found so far has said encoders typically do this to make the resolution divisible by a certain number (as I understand it from my video work it's because compression is in blocks of 16), yet it does this even if my resolutions are already divisible by that.

So it could be something else making it think it needs to add the data. I'm trying to find out what that is and if it's something I can change in my settings so OBS won't capture internally at any resolution other than display.

My friend's observation about his own captures that hinted at it being the internal configuration of his games that changes how OBS encodes the captures could be what I'm experiencing too even though he's not using OBS. I just have to work out a pattern between the different games compared to how OBS captures them and how the capture method I choose affects them if that's the case.
 

Fenrir

Forum Admin
My point is that I cannot replicate this issue. So there is some missing data/information here. If you cannot provide a sample file, and you cannot provide a log, there is nothing more we can do to help you.
 

Tomasz Góral

Active Member
Hi,
Mediainfo say: 1280x720, this what you see in VLC is source buffer resolution, but video is scaled to 1280x720.
Probably window source resolution is 1280x738, that's just my guess.
 

Fenrir

Forum Admin
Does the game show up properly in the preview? The resulting video is being output at the proper resolution:

Width : 1 280 pixels
Height : 720 pixels

So you're saying that the PREVIEW in OBS is where the issue is? Have you tried clicking on the game capture source and pressing ctrl+f?
 

hyperbolics

New Member
File Uploaded here:

http://unshapedadrian.co.uk/downloads/2017-06-26 20-45-45.flv

This is the file I recorded covered by the previously attached log. The game is called Stephen's Sausage Roll. As you'll be able to see the video did not record correctly.

Thank you for posting your file! I checked it to see if we have the same problem. Yes and no.

What's the same is that your video plays back at the proper display resolution of 720 yet imports into my Adobe software at the padded resolution of 738 just like mine did. I will troubleshoot with it!

What's different is that your footage itself was captured wrong like you said. If you're using OBS with preview, you edit the scene to make the source fit the space as you want it to appear. This file looks like the source wasn't adjusted.

In my case, the footage itself is fine. It's just the padded encode that's causing a problem because it imports into Adobe with those extra 18 lines of empty data at the bottom that I have to crop out.

My point is that I cannot replicate this issue. So there is some missing data/information here. If you cannot provide a sample file, and you cannot provide a log, there is nothing more we can do to help you.

My original post may have been confusing, sorry! The point wasn't that OBS has a problem others might be able to replicate, it's that I'm having a unique problem and researching solutions. I found lots of information about x264 encoding and why it sometimes pads data, but I asked here thinking someone would know how x264 behaves in OBS.

You already said earlier you couldn't reproduce the results and asked for a sample. I said my issue may specifically be tied to the games I recorded based on their internal configuration, those games and files are already gone, and if the problem is application specific, then creating test files with new applications would be apples and oranges.

So starting fresh, this time I will track differences in the games and in how OBS encodes them and update with the results. This way I can rule out the games as the problem. I've not been back at that computer long enough yet to do this.

Someone suggested VLC sources as a culprit so I clarified I'm not using VLC sources/plugins unless there's something inherent from VLC in x264? Another asked for my monitor resolution so I gave it but I don't know if it matters since I don't have another monitor to test. If you don't also have suggestions of things to check offhand without a log or file then that's fine. Someone else might until I can post one.

I have time to test with Adrian's file now and will update with what I find!
 
Last edited:

hyperbolics

New Member
UPDATE

Troubleshooting with Adrian's file I may have found a workaround! Hopefully this will make sense to follow. Since Adrian showed a VLC snapshot, I downloaded VLC player to start at the same place. I've used it before so I'm familiar with it. I checked the info there to make sure it's the same as what they showed with the 738 resolution and it is:

Hm2CeBH
VLC 1
I also used Mediainfo like Tomasz to check the data for Adrian's file. Resolution looks fine there, no mention of 738:

IAd3DwK
MI1

In my workflow, I transfer my FLV files to an MP4 container since Adobe dropped FLV support. I use whatever software I have where I'm at (usually Handbrake or AVC) but I'm adding FLV to the list for this test.

Here's what I found:

All of the software has a bunch of encode profiles/settings I can use to convert the FLV to MP4 so I went through a few of them with each program. None of them output an MP4 file with the 738 resolution showing in its data except VLC and all of them imported into Adobe at the proper display resolution except the ones from VLC.

EXCEPTION

In VLC, you can choose one of the encoding profiles (or customize them) or you can choose to use the original video data so nothing actually gets encoded again. It just swaps containers. This is what checking that option looks like.

FyXB0So
VLC2

That's the only method that outputs an MP4 file without the 738 resolution data embedded in it like the other applications do. Every other encode setting in VLC retained that data in the resulting MP4 and was reflected in Mediainfo. See how instead of only saying width and height like before it now shows width height and original height:

rx9QPvN
MI2

Something is definitely off with VLC making it embed this 738 resolution in files it encodes itself. This may go back to the VLC issues mentioned in the other thread if anyone is using VLC plugins and stuff with OBS.

This still doesn't help me figure out why my MP4s had this 738 data because I wasn't using VLC to convert my FLVs but the fact that VLC is capable of dropping the extra lines as long as you choose the right encode settings tells me that I may have had some funky settings in whichever software I was using to convert my files at the time.

It also doesn't tell me why my FLV files ever capture with that 738 data to begin with. From these tests I would have said it's just VLC creating it and it doesn't actually exist in the FLV files except that not all of the FLV files I captured in OBS had 738 resolution data. Some did and some didn't in spite of my OBS settings never changing.

So there had to be a difference between how OBS encoded those captures. It could have been which capture method and fullscreen vs windowed mode as I found to be the case with some but I don't know if I'll ever figure out 100% what the difference was for all of them to be able to avoid it going forward.

WORKAROUND/SOLUTION

For now, if I notice that something I captured in OBS has any resolution info in its data other than the display resolution, I'll just adjust my encode settings accordingly when I convert it to MP4 to make sure that junk data doesn't transfer over.

I don't know if this info will be useful to anyone else but hopefully it will! Thanks for the help everyone and Adrian for the file I could test since I didn't have my own. It really helped!
 
Last edited:

hyperbolics

New Member
Sorry. I was trying to use http://imgur.com for the images but they're not showing. I tried to upload instead but it's only letting me do one at a time and then blocking it as if it's spam.
 

Attachments

  • vlc1.jpg
    vlc1.jpg
    43.8 KB · Views: 110
  • vlc2.jpg
    vlc2.jpg
    49.3 KB · Views: 111
  • mi1.jpg
    mi1.jpg
    42.3 KB · Views: 93
  • mi2.jpg
    mi2.jpg
    52.9 KB · Views: 96
Top