olive-distributed icon indicating copy to clipboard operation
olive-distributed copied to clipboard

ffmpeg distributed

Open morrolinux opened this issue 5 years ago • 13 comments
trafficstars

Allows to distribute ffmpeg encoding with custom parameters

morrolinux avatar Mar 18 '20 12:03 morrolinux

Are there any known problems with this branch? Just these days I'm finding myself having to convert more than a hundred videos to make them available on the web and I'd like to take advantage of my little army of arm boards

JohnnyKetch avatar Jun 03 '20 19:06 JohnnyKetch

Hi @JohnnyKetch I haven't tested it extensively and it's not quite as polished as I'd like it to be for merging, but you could definitely give it a try.

morrolinux avatar Jun 03 '20 21:06 morrolinux

Yee, as soon as it's done I'll update you here

JohnnyKetch avatar Jun 03 '20 21:06 JohnnyKetch

When I run main.py specifying the ffmpeg video and commands, I keep getting this output:

/bin/sh: 1: [[: not found Traceback (most recent call last): File "./main.py", line 66, in project_manager.add_video(args.video) File "/home/user/olive-distributed/project_manager.py", line 23, in add_video self.jobs.append(Job(video, self.get_video_len(video), split=True)) File "/home/user/olive-distributed/project_manager.py", line 36, in get_video_len return float(subprocess.run(ffprobe_params, stdout=subprocess.PIPE).stdout) ValueError: could not convert string to float: b'N/A\n'

JohnnyKetch avatar Jun 04 '20 01:06 JohnnyKetch

there probabily is some error with paths and filenames containing spaces (which I probably haven't escaped yet) so make sure there are no spaces in your filenames and folders

morrolinux avatar Jun 04 '20 10:06 morrolinux

It's the same thing I thought having seen the output but the path to the file does not contain spaces, for safety I put it between two quotes but it gives me the same error

JohnnyKetch avatar Jun 05 '20 14:06 JohnnyKetch

Have you got ffprobe installed in your system?

morrolinux avatar Jun 05 '20 15:06 morrolinux

Yes, I have install ffmpeg with APT. That's enough?

JohnnyKetch avatar Jun 05 '20 15:06 JohnnyKetch

you can verify if ffprobe is installed on your system by simply typing ffprobe in a terminal and see what happens

morrolinux avatar Jun 05 '20 17:06 morrolinux

Yes, it is installed. 3.4.6 version

JohnnyKetch avatar Jun 05 '20 17:06 JohnnyKetch

I noticed that giving the --folder option gives a slightly different output, but basically the same error:

/bin/sh: 1: [[: not found connection ok Traceback (most recent call last): File "./run_worker_node.py", line 16, in node.run() File "/home/user/olive-distributed/worker_node.py", line 106, in run self.run_benchmark() File "/home/user/olive-distributed/worker_node.py", line 89, in run_benchmark self.cpu_score = float(subprocess.run([OD_FOLDER + 'bench/bench-host.sh'], s tdout=subprocess.PIPE).stdout) ValueError: could not convert string to float:

JohnnyKetch avatar Jun 06 '20 01:06 JohnnyKetch

I read the code (I'm not a programmer ...) and I saw that when you call up the file you make a match between .ove and.mp4. The file I was uploading was an .mkv, using an .mp4. I no longer have the error when I run main.py but I have it when I run worker_node.py:

/bin/sh: 1: [[: not found connection ok Traceback (most recent call last): File "./run_worker_node.py", line 16, in node.run() File "/home/user/olive-distributed/worker_node.py", line 106, in run self.run_benchmark() File "/home/user/olive-distributed/worker_node.py", line 89, in run_benchmark self.cpu_score = float(subprocess.run([OD_FOLDER + 'bench/bench-host.sh'], stdout=subprocess.PIPE).stdout) ValueError: could not convert string to float:

No idea

JohnnyKetch avatar Jun 06 '20 02:06 JohnnyKetch

Okay I went on. I eliminated the conversion to "float" to better see the error and I noticed that it pointed to the file /bench/bench-host.sh. I missed the sysbench program. At this point the program starts but I have problems with nfs sharing, this is the output: (the exporter and the mounter were both executed with sudo)

NFS Mounter ready. URI: PYRO:NfsMounter@localhost:9092 umounting /home/user/olive-share/ umount: /home/user/olive-share/: not mounted. There was an error umounting /home/user/olive-share/ - media might still be accessible. umounting /home/user/olive-share/ umount: /home/user/olive-share/: not mounted. There was an error umounting /home/user/olive-share/ - media might still be accessible. mounting user:/home/user There was an error mounting user:/home/user - I might not be able to access media. b'' b'mount.nfs: access denied by server while mounting user:/home/user\n'

JohnnyKetch avatar Jun 07 '20 23:06 JohnnyKetch