Search code examples
c#silverlightwindows-phone-8ffmpeg

.TS file to .mp3 using FFMPEG in windows phone


Hi I am using ffmpeg for windows phone which was found here. With this I am trying to convert a .ts file to .mp3 file but the command that I am using is not working for this type of conversion, I have also noted that it works for certain other format conversions such as ts to wma, ts to ogg e.t.c . The commands that I have tried are

 -i sourcewithfullpath.ts destinationwithfullpath.mp3

 -i sourcewithfullpath.ts 
 -f destinationwithfullpath.mp3

 -i sourcewithfullpath.ts
 -c:a libmp3lame destinationwithfullpath.mp3 

 -i sourcewithfullpath.ts
 -acodec mp3 destinationwithfullpath.mp3

most of these gave me an AccessViolationException while calling ffmpeg.Run() Any help is appreciated.


Solution

  • I think Mulvya is right MP3 encoding is not included in this FFMPEG build but I figured out another way which does not satisfy the exact need still a good option

    -i sourcewithfullpath.ts 
    -f destinationwithfullpath.mp2
    

    FFMPEG does support mp2 format, the file was converted to mp2 audio and renamed to mp3, it is playable in the windows phone. Please note that the compression ratio of the mp2 format is not that good compared to mp3 format which means that the output file resulted in a much greater size which was almost double.