Ffmpeg extract audio duration #1199

Closed
opened 2026-02-20 23:22:56 -05:00 by deekerman · 3 comments
Owner

Originally created by @vanilla38 on GitHub (Oct 7, 2013).

Hello, everyone knows that ffmpeg returns wrong duration when we extract mp3 file using youtube-dl.

I wonder if someone already solved this problem and if not, if someone can tell me where i can find ffmpeg instruction in the code.

Thanks.

Originally created by @vanilla38 on GitHub (Oct 7, 2013). Hello, everyone knows that ffmpeg returns wrong duration when we extract mp3 file using youtube-dl. I wonder if someone already solved this problem and if not, if someone can tell me where i can find ffmpeg instruction in the code. Thanks.
Author
Owner

@phihag commented on GitHub (Oct 7, 2013):

Closing as duplicate of #1022. The code of youtube-dl that calls ffmpeg is in PostProcessor.py.

@phihag commented on GitHub (Oct 7, 2013): Closing as duplicate of #1022. The code of youtube-dl that calls ffmpeg is in [PostProcessor.py](https://github.com/rg3/youtube-dl/blob/master/youtube_dl/PostProcessor.py#L58).
Author
Owner

@vanilla38 commented on GitHub (Oct 7, 2013):

Okay, i started to work on it, btw do you got any way to pass "video_duration" variable from youtube.py to PostProcessor.py file ? Thanks.

@vanilla38 commented on GitHub (Oct 7, 2013): Okay, i started to work on it, btw do you got any way to pass "video_duration" variable from youtube.py to PostProcessor.py file ? Thanks.
Author
Owner

@vanilla38 commented on GitHub (Oct 10, 2013):

For people still trying to fix this => apt-get install vbrfix

syntax:
vbrfix file1.mp3 file2.mp3

this will correct mp3 headers and set a correct duration and bitrate without remuxe it.

thanks.

@vanilla38 commented on GitHub (Oct 10, 2013): For people still trying to fix this => apt-get install vbrfix syntax: vbrfix file1.mp3 file2.mp3 this will correct mp3 headers and set a correct duration and bitrate without remuxe it. thanks.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#1199
No description provided.