Maniphest T48686

Video gets cut in half after adding it to the VSE in 2.77 or 2.77a - need ffmpeg update
Closed, ResolvedTO DO

Assigned To
Bastien Montagne (mont29)
Authored By
John Moran (Jmoran)
Jun 20 2016, 8:50 AM
Tags
  • BF Blender
Subscribers
Aaron Carlisle (Blendify)
Bastien Montagne (mont29)
Campbell Barton (campbellbarton)
John Moran (Jmoran)
Sergey Sharybin (sergey)

Description

Model Name:	iMac V 10.6.8
Model Identifier:	iMac11,2
Processor Name:	Intel Core i3
Processor Speed:	3.2 GHz
Memory: 4 GB
64-bit Operating System
ATI Radeon HD 5670
VRAM (Total):	512 MB

Windows 7 Professional
Dell XPS L502X Laptop
Intel i7 2630QM CPU @ 2.00 GHz
Memory: 6.00 GB
NVIDIA GeForce GT 525M
64-bit Operating System

Blender Version
Broken: 2.77 and 2.77a
Worked: 2.76b

I add a video (1080 or 4k .mp4) to the VSE by adding it or drag and dropping it to the sequencer with all the correct frame rate and frame length (also without the correct frame rate and frame length) but it gets cut close to half in 2.77 and 2.77a (should be 3912 frames but only 1953 frames show up. Except the audio is correct or shows up full). Added the same video without making sure the frame or length was correct in 2.67b and the whole video was there. This happens on a Mac and Windows using any 1080 or 4k .mp4 video.
Thank you for all you hard work and a great program
John Moran
jmoran@san.rr.com

Event Timeline

John Moran (Jmoran) created this task.Jun 20 2016, 8:50 AM
John Moran (Jmoran) claimed this task.
John Moran (Jmoran) raised the priority of this task from to 90.
John Moran (Jmoran) updated the task description.
John Moran (Jmoran) added a project: BF Blender.
John Moran (Jmoran) edited a custom field.
John Moran (Jmoran) added a subscriber: John Moran (Jmoran).
Campbell Barton (campbellbarton) lowered the priority of this task from 90 to 30.Jun 21 2016, 2:29 AM
Campbell Barton (campbellbarton) added a subscriber: Campbell Barton (campbellbarton).

Please link to a sample video that has this problem.

John Moran (Jmoran) added a comment.Jun 21 2016, 9:13 AM

Here is a link to the video (Test Video.mp4) and the .blend file (test video.blend) with the video packed into the file.
https://www.dropbox.com/sh/yoy7dhj9bsxt5xv/AABHa1uLMFChs-BOYY4VCqk2a?dl=0

The video was shot with a LG G3 phone. VLC player says the frame rate is 29.451966 codec is H264 MPEG-4 AVC (part 10) (avc1).

The other bug I did not mention if you look at the Test Video.blend file the Auto Frame Rate put the video at Custom (10.0 fps) FPS:120 /: 12.000.
I didn't want to add it as it was not so important as the VSE cutting video.
Thank you so much
You are awesome for getting back to me so soon specially for an open source program. Another reason Blender is so great!

Bastien Montagne (mont29) removed John Moran (Jmoran) as the assignee of this task.Jun 21 2016, 4:25 PM
Bastien Montagne (mont29) updated the task description.
Bastien Montagne (mont29) added a subscriber: Bastien Montagne (mont29).Jun 21 2016, 4:44 PM

Please try the latest build from our buildbot. Here everything looks OK (1953 frames at 29fps makes it 1min6sec, as expected). 2.77a however indeed detects/sets bad framerate, but this seems to be fixed in current master.

John Moran (Jmoran) added a comment.Jun 21 2016, 7:08 PM

I am sorry but the problem is still happening in that new build (blender-2.77-994dd5c-OSX-10.6-x86_64.zip) except now the auto frame rate is Custom (58.92fps) FPS: 707 /: 12.000. (In 2.76b the frame length comes out 3912 which is at 1min 6sec and that is the whole clip). When I add the video to the new build as was the problem in 2.77a the video comes out at 1953 frames at 33sec and should be 3912 frames at 1min 6sec. The cut clip shows the dog sniffing near a yellow patch of grass at the end. The whole clip has the dog walking away from camera at the end (just for your reference). Here is the link to the .blend file of the new build you ask me to use with the same video cut problem called (Test Video 1.blend). The .blend file has the video pack into the file. https://www.dropbox.com/sh/yoy7dhj9bsxt5xv/AABHa1uLMFChs-BOYY4VCqk2a?dl=0
Thank you so much for all you work!!

John Moran (Jmoran) added a comment.Jun 21 2016, 8:46 PM

Okay I am not very fast at math and I should have known that 1953 frames equals 1min 6 sec at 29.451966. But everything I said in my last comment is true. So thinking about it 2.76b was giving me the wrong frame rate at 3912 frames but showing me the whole clip and 2.77a and the new build is giving me the correct frame rate but only showing me half the clip as you will see in my (Test Video 1.blend) file it shows 1953 frames at 33 sec and if you look at the original clip the 33sec mark shows the dog sniffing near the yellow spot of grass and 33sec later the dog is walking away from camera at 1min 6sec.
Sorry for not realizing I was getting the correct frame rate just not the whole clip.

Bastien Montagne (mont29) raised the priority of this task from 30 to 50.Jul 15 2016, 4:39 PM
Bastien Montagne (mont29) added a subscriber: Sergey Sharybin (sergey).

I still cannot reproduce the issue, here on my linux build of current master it loads the video correctly (1953 frames over 1min06sec). However, indeed loading it with testbuild of linux64 of today am getting odd things.

So my bet is, your file is too recent for ffmpeg used in official builds (own debian testing version is newer than the one used on testbuilds), i.e. you'll have to wait for an update there (@Sergey Sharybin (sergey) shall know better about that), until then you'll have to adjust framerate manually…

Bastien Montagne (mont29) renamed this task from Video gets cut in half after adding it to the VSE in 2.77 or 2.77a to Video gets cut in half after adding it to the VSE in 2.77 or 2.77a - need ffmpeg update.Jul 15 2016, 4:39 PM
Bastien Montagne (mont29) edited a custom field.
John Moran (Jmoran) added a comment.Jul 15 2016, 7:28 PM

It must be the Phones way of doing the frame rate in combo with Windows and Mac OS build if you are not getting my results. I cant get blender to give me back the last half of any video no matter what I try on Blender. I can of course use another Editing program like Premiere and it works just fine. I just want to use Blender to do all my video and animation work. Just so you know and if it might help. I did run the video through HandBrake and trans-coded the video to 29.97 FPS instead of how it came straight out of the phone at 29.451966 FPS and it worked on blender perfect in all respects on both Windows and MAC OS. I don't know enough if that is an ffmpeg problem or not, I hope it is and you wont have to work on the build too hard to fix it.
Thank you so much for all your work!!

Aaron Carlisle (Blendify) lowered the priority of this task from 50 to 30.Dec 25 2016, 4:35 AM
Aaron Carlisle (Blendify) added a subscriber: Aaron Carlisle (Blendify).

After updating FFmpeg can we close this? @John Moran (Jmoran) try using a daily build https://builder.blender.org/download/

Bastien Montagne (mont29) changed the task status from Unknown Status to Resolved.Jan 6 2017, 2:39 PM
Bastien Montagne (mont29) claimed this task.

More than a week without reply. Due to the policy of the tracker archiving for until required info/data are provided. For now assuming this has been fixed.