从c#生成视频缩略图时,当视频处于纵向模式时,该视频缩略图会自动转换为横向模式。
我正在使用 NReco.VideoConverter.FFMpegConverter 库 以下是我的代码段
var firstName, lastName;
if (window.navigator.userAgent.indexOf("MSIE") > 0) {
// they are using I.E.
firstName = self.firstName().replace(/\'/g, "%27");
lastName = self.lastName().replace(/\'/g, "%27");
}
else {
// every other browser, just set them normally
firstName = self.firstName();
lastName = self.lastName();
}
$.getJSON(
"https://fqdn.to.server:8888/pdqm/endpoint",
{
firstName: firstName,
lastName: lastName
},
function (data) {
//here is some stuff to do with UI
}
);
答案 0 :(得分:0)
-noautorotate
选项:
ffMpeg.ConvertMedia(filePath, null, SnippetsVideoThumbUploadPath + guid + ".jpeg", "mjpeg",
new ConvertSettings() {
VideoFrameCount = 1,
Seek = 1, // this is 3rd param of GetVideoThumbnail
MaxDuration = 1,
CustomInputArgs = "-noautorotate"
});
(此调用等效于“ GetVideoThumbnail”功能,但允许您指定其他任何ffmpeg选项)