What is simple way to cut long wav file into pieces so that i don't break any words ? i mean pieces of 10-20 sec length with start and end during the pause in sentences/words ? Could you please point me out pros and cons of launching ffmpeg from python as a command line utility ? (I mean using python multiprocessing module or something similar). ![]() I looked to gstreamer and found it nice but unable to satisfy my needs - the only way I found to accomplish this from command line looks like gst-launch-0.10 playbin2 uri=file://`pwd`/ex.mp4 audio-sink='identity single-segment=true ! audioconvert ! audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)16000, channels=(int)1 ! wavenc ! filesink location=foo.wav’īut it is not efficient because i need to wait ages while playing video and simultaneously writing to wav file.įfmpeg is much better: avconv -i foo.mp4 -ab 160k -ac 1 -ar 16000 -vn ffaudio.wavīut i am unable to launch it from python (not as a command line subprocess). I don't know if it is right solution and i am looking for good one. I read many articles and everywhere people suggest to use (from Python) ffmpeg as a subprocess (because there are no reliable python bindings to ffmpeg - the only hope was PyFFmpeg but i found it is unmaintaned now). ![]() ![]() My question is how could I extract wav audio track from video file, say video.avi? ![]() How to extract audio from a video file using python?
0 Comments
Leave a Reply. |