Xubuntu 16.04, I am using a Dell and an Asus laptops. I don't think my graphics card matters for Blender VSE.
Broken: All later versions: 2.78 and 2.79 (obtained form the website) (although have not tested with 2.77)
Worked: Blender 2.76b f337fea (obtained form the website)
Short description of error
Importing any video to Blender VSE results in different video and audio lengths, with video usually being shorter than the audio. The fps chosen matches the video fps. Same video file is imported correctly in Blender 2.76b.
In the vast majority of cases (basically, a careful way of saying always) fiddling with custom fps settings doesn't solve the problem, the difference remains. The issue was reproduced by Blender users on the #blender IRC channel.
A very important note: the same happens to all videos with constant bit rates.
This ticket is not about supporting "a codec", this ticket is about fixing a bug that has broken video import across codecs. Also, I have to repeat here, otherwise people don't read further and attempt to close the ticket:
The problem is reproducible for me in the vast majority of cases, with all sorts of video files. This includes screencasting videos made with the SimpleScreenRecorder and all videos downloaded from YouTube. In fact, I was not able to find a file for which it doesn't happen.
Exact steps for others to reproduce the error
Please note, you don't have to use my file. The problem occurs with virtually any video file that has audio and video. Download one from YouTube. This ticket is not about supporting "a codec", this is a bug across codecs.
This is the test project with a video file. The video was shot using a standard camera app of a Samsung Galaxy 4mini phone.
The video is 95 Mb (it is only 50 sec), wanted to make it somewhat longer, since for very short videos the difference might not be that large, although typically still there, even if by 1.
Since I put the file on my server, I ask to not download it if you are not planning to work on the bug, so that I don't get a huge bill by the end of the month :)
Results of the test:
Lengths in 2.76b:
Lengths in 2.79:
The problem is reproducible for me in the vast majority of cases, with all sorts of video files. This includes screencasting videos made with the SimpleScreenRecorder and videos downloaded from YouTube. The only reason I am including a sample file is because clear reproduction steps are required to file a ticket of this sort. But I could have asked anyone to take any file that has audio and video and import it into Blender VSE, with same results.
All videos from any of the cameras I own, from three mobile phones (Samsung Galaxy 4mini, Huawei P8 Lite, Samsung A3) and from an expensive Nikon camera - all videos without exception always end up being opened with different lengths in 2.78 and 2.79. At the same time, they are all in complete sync in Blender 2.76b, with audio and video always having the exact same length.
I have asked several people to reproduce the issue in Blender 2.79 and all the people I asked were able to reproduce the problem immediately, using their own video files.
Another way to reproduce is to download a video from YouTube. Here is a random video I watched, downloaded and tested: https://www.youtube.com/watch?v=FNLoxaSSQ2A
Here, inspite of the video being long, the difference is smaller - but still there. The video is at 29.970030 frame rate.
It seems that the ability of later versions of Blender to automatically detect the imported video fps is at play here. Many videos will not have exactly 30 fps, for example the frame rate of the video I supply with my test project is 30.003730. This difference is small enough to be neglected, but as JA12 in the IRC channel found out, Blender seems to try to convert this fps to some exact number and fails because of the length of the field, however, he was not certain this is really the cause. He was able to immediately reproduce an issue with my project and by importing some other video and seeing the same problem. Everyone on IRC were able to reproduce the problem using my TestProject file with the video also. JA12 was also able to reproduce the problem with the latest development version of Blender.
I will do my best to provide additional information is necessary.