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

Killing download and resuming it goes wrong #2059

Open
johnnynoone opened this issue Dec 29, 2013 · 4 comments
Open

Killing download and resuming it goes wrong #2059

johnnynoone opened this issue Dec 29, 2013 · 4 comments

Comments

@johnnynoone
Copy link

@johnnynoone johnnynoone commented Dec 29, 2013

I try to download a movie from Dailymotion and embed metadata (and subtitles, if available). Ubuntu 13.10 x64, ffmpeg version 0.8.9-6:0.8.9-0ubuntu0.13.10.1 . Here's a sample output:

youtube-dl --verbose --keep-video --embed-subs --add-metadata --write-description --write-info-json --write-annotations http://www.dailymotion.com/video/x18z4dq_mlp-fim-s4-e7-bats-hd-tv-rip-temporary_shortfilms
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', '--keep-video', '--embed-subs', '--add-metadata', '--write-description', '--write-info-json', '--write-annotations', 'http://www.dailymotion.com/video/x18z4dq_mlp-fim-s4-e7-bats-hd-tv-rip-temporary_shortfilms']
[debug] Encodings: locale 'UTF-8', fs 'UTF-8', out 'UTF-8', pref: 'UTF-8'
[debug] youtube-dl version 2013.12.26
[debug] Python version 2.7.5+ - Linux-3.11.0-14-generic-x86_64-with-Ubuntu-13.10-saucy
[debug] Proxy map: {}
[dailymotion] x18z4dq: Downloading webpage
[dailymotion] x18z4dq: Extracting information
[dailymotion] x18z4dq: Downloading embed page
[info] Writing video description to: MLP - FiM _ S4 E7 _ Bats! _ HD TV Rip _ Temporary-x18z4dq.mp4.description
WARNING: There's no description to write.
[info] Writing video annotations to: MLP - FiM _ S4 E7 _ Bats! _ HD TV Rip _ Temporary-x18z4dq.mp4.annotations.xml
WARNING: There are no annotations to write.
[info] Writing video description metadata as JSON to: MLP - FiM _ S4 E7 _ Bats! _ HD TV Rip _ Temporary-x18z4dq.info.json
[download] Destination: MLP - FiM _ S4 E7 _ Bats! _ HD TV Rip _ Temporary-x18z4dq.mp4
[download] 100% of 959.14MiB in 26:04
[ffmpeg] Adding metadata to 'MLP - FiM _ S4 E7 _ Bats! _ HD TV Rip _ Temporary-x18z4dq.mp4'
[debug] ffmpeg command line: avconv -y -i 'MLP - FiM _ S4 E7 _ Bats! _ HD TV Rip _ Temporary-x18z4dq.mp4' -c copy -metadata artist=MysteriousBrony -metadata 'title=MLP: FiM | S4 E7 | Bats! | HD TV Rip | Temporary' -f mp4 'MLP - FiM _ S4 E7 _ Bats! _ HD TV Rip _ Temporary-x18z4dq.mp4.temp'
ERROR: av_interleaved_write_frame(): Invalid argument
Traceback (most recent call last):
  File "/home/username/Downloads/youtube-dl/youtube_dl/YoutubeDL.py", line 942, in post_process
    keep_video_wish, new_info = pp.run(info)
  File "/home/username/Downloads/youtube-dl/youtube_dl/PostProcessor.py", line 508, in run
    self.run_ffmpeg(filename, temp_filename, options)
  File "/home/username/Downloads/youtube-dl/youtube_dl/PostProcessor.py", line 102, in run_ffmpeg
    self.run_ffmpeg_multiple_files([path], out_path, opts)
  File "/home/username/Downloads/youtube-dl/youtube_dl/PostProcessor.py", line 99, in run_ffmpeg_multiple_files
    raise FFmpegPostProcessorError(msg)
FFmpegPostProcessorError
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jan 2, 2014

The video you posted is not available, I've tested with youtube-dl 'http://www.dailymotion.com/video/x33vw9_tutoriel-de-youtubeur-dl-des-video_tech' --add-metadata and it works fine with ffmpeg (1.2.4) and avconv (9.10). Could you post which version of avconv you have (that's what is run instead of ffmpeg): avprobe -version.
Also could you paste the output you get when you run the command seen in ffmpeg command line: avconv ...?, it may give additional info

@johnnynoone
Copy link
Author

@johnnynoone johnnynoone commented Jan 5, 2014

$ avprobe -version
avprobe version 0.8.9-6:0.8.9-0ubuntu0.13.10.1, Copyright (c) 2007-2013 the Libav developers
  built on Nov  9 2013 19:09:46 with gcc 4.8.1
avprobe 0.8.9-6:0.8.9-0ubuntu0.13.10.1
libavutil    51. 22. 1 / 51. 22. 1
libavcodec   53. 35. 0 / 53. 35. 0
libavformat  53. 21. 1 / 53. 21. 1
libavdevice  53.  2. 0 / 53.  2. 0
libavfilter   2. 15. 0 /  2. 15. 0
libswscale    2.  1. 0 /  2.  1. 0
libpostproc  52.  0. 0 / 52.  0. 0

The following worked for a while and then displayed an error: (BTW when I download things from youtube, everything is OK and ffmpeg throws no errors.)

$ avconv -y -i 'MLP - FiM _ S4 E7 _ Bats! _ HD TV Rip _ Temporary-x18z4dq.mp4' -c copy -metadata artist=MysteriousBrony -metadata 'title=MLP: FiM | S4 E7 | Bats! | HD TV Rip | Temporary' -f mp4 'MLP - FiM _ S4 E7 _ Bats! _ HD TV Rip _ Temporary-x18z4dq.mp4.temp'
avconv version 0.8.9-6:0.8.9-0ubuntu0.13.10.1, Copyright (c) 2000-2013 the Libav developers
  built on Nov  9 2013 19:09:46 with gcc 4.8.1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'MLP - FiM _ S4 E7 _ Bats! _ HD TV Rip _ Temporary-x18z4dq.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.19.104
  Duration: 00:21:53.28, start: 0.000000, bitrate: 6126 kb/s
    Stream #0.0(und): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 5990 kb/s, 27.45 fps, 27.45 tbr, 13727 tbn, 54.91 tbc
    Stream #0.1(und): Audio: aac, 44100 Hz, stereo, s16, 127 kb/s
Output #0, mp4, to 'MLP - FiM _ S4 E7 _ Bats! _ HD TV Rip _ Temporary-x18z4dq.mp4.temp':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : MLP: FiM | S4 E7 | Bats! | HD TV Rip | Temporary
    artist          : MysteriousBrony
    encoder         : Lavf53.21.1
    Stream #0.0(und): Video: libx264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], q=2-31, 5990 kb/s, 13727 tbn, 13727 tbc
    Stream #0.1(und): Audio: libvo_aacenc, 44100 Hz, stereo, 127 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press ctrl-c to stop encoding
Application provided invalid, non monotonically increasing dts to muxer in stream 1: 57885696 >= 57885696
av_interleaved_write_frame(): Invalid argument
@johnnynoone
Copy link
Author

@johnnynoone johnnynoone commented Jan 25, 2014

I found an interesting case: two videos from Dailymotion, from the same user. One causes the error and one not. http://www.dailymotion.com/video/x19jnpl_my-little-pony-friendship-is-magic-season-4-episode-9-pinkie-apple-pie-1080p_shortfilms and http://www.dailymotion.com/video/x19wpfn_my-little-pony-season-4-episode-10-rainbow-fall-hd_shortfilms

[debug] youtube-dl version 2014.01.23.4
[debug] Python version 2.7.5+ - Linux-3.11.0-15-generic-x86_64-with-Ubuntu-13.10-saucy

Avconv command line was the same for both videos, except for title. The error on the second video:

[ffmpeg] Adding metadata to 'My Little Pony Season 4 Episode 10 Rainbow Fall HD-x19wpfn.mp4'
[debug] ffmpeg command line: avconv -y -i 'My Little Pony Season 4 Episode 10 Rainbow Fall HD-x19wpfn.mp4' -c copy -metadata artist=hasbromlp -metadata 'title=My Little Pony Season 4 Episode 10 Rainbow Fall HD' 'My Little Pony Season 4 Episode 10 Rainbow Fall HD-x19wpfn.temp.mp4'
ERROR: av_interleaved_write_frame(): Invalid argument
Traceback (most recent call last):
  File "/home/username/Downloads/youtube/youtube-dl/youtube_dl/YoutubeDL.py", line 1016, in post_process
    keep_video_wish, new_info = pp.run(info)
  File "/home/username/Downloads/youtube/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 472, in run
    self.run_ffmpeg(filename, temp_filename, options)
  File "/home/username/Downloads/youtube/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 64, in run_ffmpeg
    self.run_ffmpeg_multiple_files([path], out_path, opts)
  File "/home/username/Downloads/youtube/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 61, in run_ffmpeg_multiple_files
    raise FFmpegPostProcessorError(msg)
FFmpegPostProcessorError
@johnnynoone
Copy link
Author

@johnnynoone johnnynoone commented Feb 1, 2014

OK, I think I figured it out. It's not Dailymotion's fault. Postprocessing error happens if I kill youtube-dl and then resume download later. I guess something is wrong with resuming.

@johnnynoone johnnynoone changed the title Dailymotion and ffmpeg error Killing download and resuming it goes wrong Aug 19, 2014
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
2 participants
You can’t perform that action at this time.