2014-04-30 1 views
1
내가 그것을 변환하는 모든 비디오에이 변경 사항을 적용하고

감소 .flv 파일 -비디오 FLV로 변환하지만, 크기

public void TestConverter(HttpPostedFileBase file) 
     { 
      if (file.ContentLength > 0 && file != null) 
      { 
       string path = Server.MapPath("~/Videos/" + file.FileName); 
       string outputpath = Server.MapPath("~/Videos-Original/"); 
       file.SaveAs(path); 

       FFMpegConverter ff = new FFMpegConverter(); 
       ff.ConvertMedia(Server.MapPath("~/Videos/" + file.FileName), (outputpath + file.FileName), Format.flv); 
} 
} 

참고 - 내가 파일을 업로드하고의 Wildlife.wmv 지명하지 크기 25MB. 이 Wildlife.wmv

이었다로 내 플레이어가이 작업을 지원하도록 내가 .flv 파일로 변환 어떻게 내 비디오의 크기가 6MB로 변환되고 확장은 여전히 ​​동일이 코드를 통해 비디오를 통과 한 후.

플레이어 나는이의 경로가 /Videos-Original/Wildlife.wmv

<script type="text/javascript"> 
      jwplayer('player').setup({ 
      file: '@Model.videopath', 
      title: '@Model.videoname', 
       width: '100%', 
       aspectratio: '16:9', 
       primary: 'flash' 
      }); 
    </script> 

을 문자를 구분

가 어떻게 그렇게 JWplayer가 지원하는 것을 .flv에 대한 확장을 변환 마십시오

JWPlayer-
을 사용하고? 내가 여기에 사용하고

도서관은 다음 링크가 당신을 도울 수 http://www.nrecosite.com/video_converter_net.aspx

+0

가 왜 FFMPEG를 사용하여 MP4 대신 FLV로 인코딩 :

은 그냥 그렇게 출력 파일 확장자 뭔가를 변경? – emaxsaun

+0

@ EthanJWPlayer.이 변환을 통해 쉽게 이해할 수있는 몇 가지 예제를 찾지 못했기 때문입니다. – user3163213

+0

온라인에서보고있는 일부가 있습니다. http://bit.ly/1fQNOaF – emaxsaun

답변

0

귀하의 경우 유일한 문제는 파일을 결과 것 같다 - 이것도 확장자 (".wmv"로 유지됨)이지만 실제로는 FLV 미디어 데이터가 포함됩니다.

ff.ConvertMedia(Server.MapPath("~/Videos/" + file.FileName), 
    (outputpath + Path.GetFileNameWithoutExtension(file.FileName)+".flv"), Format.flv);