rosenbjerg / FFMpegCore

A .NET FFMpeg/FFProbe wrapper for easily integrating media analysis and conversion into your C# applications
MIT License
1.61k stars 289 forks source link

when trying to convert mp3/flac to m3u8 #404

Open herorelative opened 1 year ago

herorelative commented 1 year ago

Here is the code sample.

FFMpegArguments.FromFileInput(input.mp3)
                .OutputToFile(output.m3u8, false, option => option
                .WithAudioCodec(AudioCodec.Aac))
                .ProcessSynchronously();

All ts files generated. But in the output.m3u8 file missing contents. 0 to 157.ts was missing. Can anybody point me out what am i missing, please?

EXTM3U

EXT-X-VERSION:3

EXT-X-TARGETDURATION:2

EXT-X-MEDIA-SEQUENCE:158

EXTINF:2.020133,

test158.ts

EXTINF:1.996922,

test159.ts

EXTINF:1.996911,

test160.ts

EXTINF:1.996911,

test161.ts

EXTINF:0.139333,

test162.ts

EXT-X-ENDLIST

TheBlueSky commented 8 months ago

I don't know if you found the issue or not, but this is unlikely an issue with this library. The code that you listed will execute the following command:

ffmpeg -i "input.mp3" -c:a aac "output.m3u8"

If you run it, you will get the same result; i.e., missing part.

Unfortunately, I don't know what the exact command should be, but it looks like (from a quick search) that you need to set more arguments for this to work.