question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adding audio files (different media info)

See original GitHub issue

Amazing library Pydub!

I’m getting some audio cut out at the end of this attempt to add those 3 files in one: There’s obvious differences between them. What would be your recommended approach to achieve this? The audio cuts at the end by aprox 1 sec. everytime. Tried different files and the same happens. Audio can come in any kind of variation of this examples and any order. Example:

====== NEW AUDIO SOURCE =======
DEBUG:pydub.converter:subprocess.call(['avconv', '-y', '-f', 'mp3', '-i', '/var/folders/1_/551bnby96jb5yy_w__0b9_1r0000gn/T/tmp_Aald3', '-vn', '-f', 'wav', '/var/folders/1_/551bnby96jb5yy_w__0b9_1r0000gn/T/tmpUwSy3h'])
||||||||
Sample Width: 2
Frame Rate: 22050
Frame Width: 4
Channels: 2
Duration in Seconds: 5.48571428571
||||||||

====== NEW AUDIO SOURCE =======
DEBUG:pydub.converter:subprocess.call(['avconv', '-y', '-f', 'mp3', '-i', '/var/folders/1_/551bnby96jb5yy_w__0b9_1r0000gn/T/tmpRSXPFC', '-vn', '-f', 'wav', '/var/folders/1_/551bnby96jb5yy_w__0b9_1r0000gn/T/tmpyuxKub'])
||||||||
Sample Width: 2
Frame Rate: 22050
Frame Width: 4
Channels: 2
Duration in Seconds: 30.8506122449
||||||||

====== NEW AUDIO SOURCE =======
DEBUG:pydub.converter:subprocess.call(['avconv', '-y', '-f', 'mp3', '-i', '/var/folders/1_/551bnby96jb5yy_w__0b9_1r0000gn/T/tmpUUIaqx', '-vn', '-f', 'wav', '/var/folders/1_/551bnby96jb5yy_w__0b9_1r0000gn/T/tmp0QC4l8'])
||||||||
Sample Width: 2
Frame Rate: 24000
Frame Width: 2
Channels: 1
Duration in Seconds: 5.448
||||||||

====== FINAL MIXED AUDIO PARTS =======
||||||||
Sample Width: 2
Frame Rate: 24000
Frame Width: 4
Channels: 2
Duration in Seconds: 41.7842916667
||||||||
DEBUG:pydub.converter:subprocess.call(['avconv', '-y', '-f', 'wav', '-i', '/var/folders/1_/551bnby96jb5yy_w__0b9_1r0000gn/T/tmpN4XkDz', '-f', 'mp3', '/var/folders/1_/551bnby96jb5yy_w__0b9_1r0000gn/T/tmpfmKnzd'])

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
jiaarocommented, May 15, 2016

glad to hear you found a solution!

0reactions
sakthipscommented, Oct 6, 2017

how will i add delay(i.e 1 second) between two audio file, while merging.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding Labels and Descriptions into Your Audio Files
Run whatever media player you use to play music on your computer and open up the MP3 file. · Search online for “ID3...
Read more >
MediaInfo - MediaArea
MediaInfo features include: Read many video and audio file formats; View information in different formats (text, sheet, tree, HTML.
Read more >
Adding Audio Files - YouTube
Learn to add different kinds of audio files to your canvas in moments.Check out our Help Center article on this topic here: ...
Read more >
How to Download & Add Track Titles to Windows Media Player
Select the correct media information and track titles from the list in the case of multiple results. Press "Enter" to close the dialog...
Read more >
MediaInfo lets you view and export technical data of video and ...
If you need to view and export technical and tag data of multiple video and audio files on Windows, you can check out...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found