Home How can i use ffmpeg to extract audio from an video every 5 seconds
Reply: 1

How can i use ffmpeg to extract audio from an video every 5 seconds

roomy
1#
roomy Published in 2017-12-06 02:57:40Z

I need to extract audio from live stream. I want to generate an audio file every 5s.

  • if i use the command ffmpeg -i ***.flv -c:a aac -fs 128k output.aac I can only get one file. but i want generate a file every 5s.
  • if i use the commmand ffmpeg -i ***.mp4 -vf fps=1/5.0 E:\image%d.jpg I got an image every 1s. How can i do the same thing to extract audio.
LordNeckbeard
2#
LordNeckbeard Reply to 2017-12-06 04:05:17Z

Use the segment muxer:

ffmpeg -i input -map 0:a -f segment -segment_time 5 output_%03d.aac

Add -c copy and use a compatible output container format if you don't want to re-encode.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.296393 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO