Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffmpeg conversion => broken duration #1022

Open
vanilla38 opened this issue Jul 10, 2013 · 10 comments
Open

ffmpeg conversion => broken duration #1022

vanilla38 opened this issue Jul 10, 2013 · 10 comments

Comments

@vanilla38
Copy link

@vanilla38 vanilla38 commented Jul 10, 2013

Hello, i downloaded some files with this command:

youtube-dl --extract-audio --max-quality=18 http://www.youtube.com/watch?v=ZnXZR6MB5qI

Then

youtube-dl --extract-audio --max-quality=6 http://www.youtube.com/watch?v=ZnXZR6MB5qI

The 2 mp3 files have different durations for the same video :o it's only a graphic bug since the video stops at the correct time but show a different duration.

this is due to ffmpeg calculating wrong duration for files when converting.

@Shuro
Copy link

@Shuro Shuro commented Jul 11, 2013

Same error here, noticed it also yesterday.

@yasoob
Copy link
Contributor

@yasoob yasoob commented Jul 11, 2013

I guess its ffmpeg's bug not of youtube-dl's because youtube-dl is just calling ffmpeg for file conversion and all the rest of the work is handled by ffmpeg.

@vanilla38
Copy link
Author

@vanilla38 vanilla38 commented Jul 11, 2013

maybe we can modify some options in the call, any idead on where i can set it ? Thanks.

@JMSwag
Copy link

@JMSwag JMSwag commented Jul 11, 2013

@vanilla38 In module Postprocessors.

@vanilla38
Copy link
Author

@vanilla38 vanilla38 commented Jul 12, 2013

thanks I'll check for smthg to change.

@Shuro
Copy link

@Shuro Shuro commented Jul 12, 2013

Is there some sort of workaround for this problem?

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jul 13, 2013

First the downloaded videos doesn't even have the same duration (according to ffprobe):

  • for youtube-dl --extract-audio --max-quality=18 http://www.youtube.com/watch?v=ZnXZR6MB5qI: Duration: 00:07:11.94, start: 0.000000, bitrate: 671 kb/s
  • for youtube-dl --extract-audio --max-quality=6 http://www.youtube.com/watch?v=ZnXZR6MB5qI: Duration: 00:07:11.88, start: 0.000000, bitrate: 393 kb/s

The duration of the audio files is 00:07:11.94 and 00:07:12.07, it may happens with all videos, but you have noticed here because players seem to truncate the duration.

@vanilla38
Copy link
Author

@vanilla38 vanilla38 commented Jul 15, 2013

Yea but we're talking about 2 or 3 minutes of difference between two quality selections.
I'm actually working on it but it seems to be an ffmpeg bug.

@phihag
Copy link
Contributor

@phihag phihag commented Oct 7, 2013

@vanilla38 Can you post a command line (like @jaimeMF did) of two videos that differ significantly?

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Nov 30, 2013

After doing some tests with different versions of avconv (see #1866), I have more information:

  • version 8.9 reports the wrong duration.
  • version 9.10 and ffmpeg 1.2.4 works fine.

I guess that any player using the version of avconv with the bug will also report the wrong duration, you'll have to report the problem to its author. For example Quicktime player and VLC report the right durations.

Could someone confirm if this is the problem, please?, so that we can close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.