ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
131.4k stars 9.96k forks source link

youtube-dl dose not work on shared network volume #23292

Open nanderer opened 4 years ago

nanderer commented 4 years ago

Checklist

Verbose log

ytdl --restrict-filenames  -v https://www.tvnow.de/serien/naruto-shippuden-12957/staffel-1/episode-8-bereitmachen-team-kakashi-340620
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--all-subs', u'--write-info-json', u'--hls-use-mpegts', u'--prefer-avconv', u'--restrict-filenames', u'-v', u'https://www.tvnow.de/serien/naruto-shippuden-12957/staffel-1/episode-8-bereitmachen-team-kakashi-340620']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.11.28
[debug] Python version 2.7.9 (CPython) - Linux-3.10.106+-armv7l-with-debian-8.11
[debug] exe versions: avconv 2.6.9, avprobe 2.6.9, ffmpeg 2.6.9, ffprobe 2.6.9, phantomjs .
[debug] Proxy map: {}
[TVNow] naruto-shippuden/bereitmachen-team-kakashi: Downloading JSON metadata
[TVNow] 340620: Downloading MPD manifest
[TVNow] 340620: Downloading MPD manifest
[TVNow] 340620: Downloading ISM manifest
[TVNow] 340620: Downloading ISM manifest
[TVNow] 340620: Downloading m3u8 information
[TVNow] 340620: Downloading m3u8 information
WARNING: Your copy of avconv is outdated and unable to properly mux separate video and audio files, youtube-dl will download single file media. Update avconv to version 10-0 or newer to fix this.
[debug] Default format spec: best/bestvideo+bestaudio
[info] Writing video description metadata as JSON to: Bereitmachen_Team_Kakashi-340620.info.json
ERROR: Cannot write metadata to JSON file Bereitmachen_Team_Kakashi-340620.info.json
Traceback (most recent call last):
  File "/home/treaki/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1849, in process_info
    write_json_file(self.filter_requested_info(info_dict), infofn)
  File "/home/treaki/bin/youtube-dl/youtube_dl/utils.py", line 1825, in write_json_file
    tf = tempfile.NamedTemporaryFile(**compat_kwargs(args))
  File "/usr/lib/python2.7/tempfile.py", line 462, in NamedTemporaryFile
    (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags)
  File "/usr/lib/python2.7/tempfile.py", line 239, in _mkstemp_inner
    fd = _os.open(file, flags, 0600)
OSError: [Errno 22] Invalid argument: 'Bereitmachen_Team_Kakashi-340620.info.json.Q2vzXY.tmp'

Description

hi there, i would like to download files directly onto my shared volume but got following error, i have all necceccery rights but the access module sheams to want to access in a special cached way that is not supported by the server in use, so could you fix that or guide me how to set up a cache fs which addes the requierered operations on debian based systems:

user@hostname:/mnt/netdata4/ytdl4$ ytdl --restrict-filenames  -v https://www.tvnow.de/serien/naruto-shippuden-12957/staffel-1/episode-8-bereitmachen-team-kakashi-340620
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--all-subs', u'--write-info-json', u'--hls-use-mpegts', u'--prefer-avconv', u'--restrict-filenames', u'-v', u'https://www.tvnow.de/serien/naruto-shippuden-12957/staffel-1/episode-8-bereitmachen-team-kakashi-340620']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.11.22
[debug] Python version 2.7.9 (CPython) - Linux-3.10.106+-armv7l-with-debian-8.11
[debug] exe versions: avconv 2.6.9, avprobe 2.6.9, ffmpeg 2.6.9, ffprobe 2.6.9, phantomjs .
[debug] Proxy map: {}
[TVNow] naruto-shippuden/bereitmachen-team-kakashi: Downloading JSON metadata
[TVNow] 340620: Downloading MPD manifest
[TVNow] 340620: Downloading MPD manifest
[TVNow] 340620: Downloading ISM manifest
[TVNow] 340620: Downloading ISM manifest
[TVNow] 340620: Downloading m3u8 information
[TVNow] 340620: Downloading m3u8 information
WARNING: Your copy of avconv is outdated and unable to properly mux separate video and audio files, youtube-dl will download single file media. Update avconv to version 10-0 or newer to fix this.
[debug] Default format spec: best/bestvideo+bestaudio
[info] Writing video description metadata as JSON to: Bereitmachen_Team_Kakashi-340620.info.json
ERROR: Cannot write metadata to JSON file Bereitmachen_Team_Kakashi-340620.info.json
Traceback (most recent call last):
  File "/home/user/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1849, in process_info
    write_json_file(self.filter_requested_info(info_dict), infofn)
  File "/home/user/bin/youtube-dl/youtube_dl/utils.py", line 1822, in write_json_file
    tf = tempfile.NamedTemporaryFile(**compat_kwargs(args))
  File "/usr/lib/python2.7/tempfile.py", line 462, in NamedTemporaryFile
    (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags)
  File "/usr/lib/python2.7/tempfile.py", line 239, in _mkstemp_inner
    fd = _os.open(file, flags, 0600)
OSError: [Errno 22] Invalid argument: 'Bereitmachen_Team_Kakashi-340620.info.json.exfuKg.tmp'

user@hostname:/mnt/netdata4/ytdl4$ mount
[...]
\\192.168.x.y\netdata4 on /mnt/netdata4 type cifs (rw,relatime,vers=1.0,sec=ntlmssp,cache=strict,uid=0,noforceuid,gid=0,noforcegid,addr=0000:0000:0000:0000:0000:0000:0000:0001,file_mode=0666,dir_mode=0777,nounix,serverino,rsize=61440,wsize=65536,actimeo=1)
user@hostname:/mnt/netdata4/ytdl4$ #dose not work
user@hostname:/mnt/netdata4/ytdl4$ cat >>  Bereitmachen_Team_Kakashi-340620.info.json
asd
test
user@hostname:/mnt/netdata4/ytdl4$ cat Bereitmachen_Team_Kakashi-340620.info.json
asd
test
user@hostname:/mnt/netdata4/ytdl4$ rm Bereitmachen_Team_Kakashi-340620.info.json
user@hostname:/mnt/netdata4/ytdl4$ #i am able to create and write to that file on my own...
nanderer commented 4 years ago

thanks a lot in advance

salamihawk commented 4 years ago

I use Youtube-dl from a linux machine saving the videos to a mounted network drive, works just fine. You just have to mount the drive with permissions for the user running youtube-dl

salamihawk commented 4 years ago

This is how I mount my drive: mount -t cifs //HOSTNAME/Path/To/Directory /media/root/Mountpoint -o username=MY_SMB_USERNAME,password=MY_SMB_PASSWORD,uid=$UID,gid=$UID

nanderer commented 4 years ago

Hi, thanks for the reply. I am using an ftp share mounted throuhg fuse curl ftp client, any idea how to mount it right with that

nanderer commented 4 years ago

I now wrote a workaround wrapper script that downloads stuff to /tmp and moves it afterwards but ive got only 200mb on this system (ramdisk only its an little xwrt think i put a bare debian chroot on)

nanderer commented 4 years ago

Thanks in advance

nanderer commented 4 years ago

This is how i mount stuff:

Curlftpfs -o allow_other,nonempty ftp:@192.168.178.3 /mnt/fbftp/