• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Title change when uploading video, and video doesn't render.

tonmo

Active member
#1
Strange issue. ffmpeg seems to be installed properly. I'll upload a file named, for example, "dr.octavius.avi"... but the title of the file will be "dr.octmp4us.avi"

Also, "shedding.avi" was titled "shedd4ing.avi"

And the videos would not play... the timer for the video ticks off and it seems to be proper length, but there is no video rendered.

Any thoughts? I noticed that "mp4" was the string of replaced letters in the first file. Odd.
 

Chris D

XenForo developer
Staff member
#2
Ugh... That's dumb. I think I can see what's happening here without looking.

Workaround for now is to change the name of the file before upload; change it to dr.octav1us.avi or something. We change the file type from avi to mp4, the process that does this is being too overzealous and replacing part of the file name too. Obviously not ideal. That workaround should help for now, though.
 

tonmo

Active member
#3
huh, ok. note, the name of the file IS dr.octavius.avi before I upload. The mp4 is replacing the avi after upload in the title of the file.

Why would shedding.avi change to shedd4ng.avi? I had other examples too... I's becoming E's, etc.

In the meantime I could change the files to numeric titles only (maybe that would help) or something real generic (aaa.avi). I'll play around.
 

Chris D

XenForo developer
Staff member
#4
Actually, now I've looked at the code, I can't actually see where this would be going wrong. We don't do what I thought we did to switch the extension, so something else is going wrong.

I'll do some testing, too.
 

tonmo

Active member
#6
I just tried another file, it seems I can recreate this pretty easily.

The original file name is Molly1.MOV. But the title of the uploaded file is Mplly1.

The video upload itself did work this time, though.
 

Chris D

XenForo developer
Staff member
#7
Well this makes less and less sense with each post :)

Are you able to upload the video here? Does it exhibit the same behaviour?
 

tonmo

Active member
#9
Also recreated the dr. octavius.avi issue, and the video does not render - so same experience as on my own site, although I noticed a thumbnail was produced.

 

Chris D

XenForo developer
Staff member
#10
OK. I've found the bug now, so this is fixed for the next version.

This bug, however, should not (and doesn't, in my testing) affect the videos being uploaded, being playable or affect thumbnails in any way. These things are likely to be different.

That said, the fix is pretty simple if you'd like to make it yourself.

Open the file library/XenGallery/Model/File.php and find:
PHP:
$filename = strtr($filename, strtolower(substr(strrchr($filename, '.'), 1)), 'mp4');
Replace with:
PHP:
$filename = preg_replace('/\\.[^.\\s]{3,4}$/', '.mp4', $filename);
 

tonmo

Active member
#11
thanks. The dr.octavius.avi video plays fine locally. Any thoughts why it doesn't render when uploaded? A couple/few others aren't rendering either.
 

tonmo

Active member
#13
I mean, if you look at the video for Dr. Octavius that I uploaded to your media gallery, you'll see it's only producing sound, but no video.

I could send you the original file if it would help to inspect it - the video plays fine from my local hard drive and video player.

It's not with all videos, just some.
 

Mike

XenForo developer
Staff member
#14
FWIW, both of the videos you uploaded and linked here play video and sound for me in Chrome. In FF, the second video doesn't play, though that may point to the original file itself not being totally valid (and FF's implementation being less forgiving).
 

tonmo

Active member
#15
Ah ok - I was testing on FF (about 10% of my audience).

You're right, it does work on Chrome (45%).

But it does not seem to work on Safari, either (31%).