Extract audio from a YouTube video file
ffmpeg -i INPUT.mp4 -ab 256k OUTPUT.mp3Cut 3s length
ffmpeg -y -ss 00:00:03 -i INPUT.mp4 -codec copy OUTPUT.mp4| import os | |
| DIRECTORY = "videos2" | |
| for f in os.listdir(DIRECTORY): | |
| if f.endswith(".mp4"): | |
| in_file = DIRECTORY + '/' + f | |
| out_file = DIRECTORY + '/ytout-- ' + f | |
| ex = 'ffmpeg -i "{in_file}" -c:v libx264 -preset slow -profile:v high -crf 18 -coder 1 -pix_fmt yuv420p -movflags +faststart -g 30 -bf 2 -c:a aac -b:a 384k -profile:a aac_low "{out_file}"'.format(in_file=in_file, out_file=out_file) | |
| os.system(ex) |
Extract audio from a YouTube video file
ffmpeg -i INPUT.mp4 -ab 256k OUTPUT.mp3Cut 3s length
ffmpeg -y -ss 00:00:03 -i INPUT.mp4 -codec copy OUTPUT.mp4| def calcPi(limit): # Generator function | |
| """ | |
| Prints out the digits of PI | |
| until it reaches the given limit | |
| """ | |
| q, r, t, k, n, l = 1, 0, 1, 1, 3, 3 | |
| decimal = limit | |
| counter = 0 |
| import statistics as _s | |
| # diketahui | |
| A = list(range(1000000)) | |
| # 4a | |
| def mean_odd_number(n): | |
| odds = filter(lambda x: x % 2, n) | |
| return _s.mean(odds) |
| <input class="checkit" type="checkbox" name="daftar" value="Bike"> I have a bike<br> | |
| <input class="checkit" type="checkbox" name="daftar" value="Car" checked> I have a car<br> | |
| <input class="checkit" type="checkbox" name="daftar" value="Pen" checked> I have a Pen<br> | |
| <input type="button" onclick="alert(getCheckedCheckboxesFor('daftar'));" value="Get Values" /> | |
| <button id="create">Create file</button> | |
| <a download="info.txt" id="downloadlink" style="display: none">Download</a> | |
| <script> | |
| function getCheckedCheckboxesFor(checkboxName) { |