BrianDMG / conv2mp4

This Powershell script will recursively search through a user-defined file path and convert all videos of user-specified file types to MP4 with H264 video and AAC audio using ffmpeg. The purpose of this script is to reduce transcoding CPU load on a media server like Plex or Emby and increase video compatibility across platforms.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error running on Raspberry Pi

EricH9958 opened this issue · comments

commented

Love your script. I have it running on one of my windows boxes right now. I was trying to get it up and running on an R-Pi that I have and keep getting an error that I can't quite figure out.
The script starts up and catalogs all the shows then presents this error.

06/19/2017 19:29:31 Processing - //home/pi/Shared/DESKTOP-2/Tvshows/A Series of Unfortunate Events/A Series of Unfortunate Events - 1x02 - The Bad Beginning Part Two.mkv
06/19/2017 19:29:31 File 1 of 1298 - Total queue 0.08%

Traceback (most recent call last):
File "/home/pi/Documents/Plex Media Convert/conv2mp4-py.py", line 411, in
codec_discovery()
File "/home/pi/Documents/Plex Media Convert/conv2mp4-py.py", line 161, in codec_discovery
get_duration_temp = humanize_time(head)
File "/home/pi/Documents/Plex Media Convert/conv2mp4-py.py", line 129, in humanize_time
mins, secs = divmod(int(secs), 60)
ValueError: invalid literal for int() with base 10: ''

I have attached both the script and the output.

Regards,
Eric

code.txt
error.txt

commented

Hey Eric, I just want to note that it looks like you're having an issue with the Python version (this is the issues list for the PowerShell version). It looks like it's not getting a value for the duration (in seconds) of the video during codec discovery. What's the output if you run:
ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 " //home/pi/Shared/DESKTOP-2/Tvshows/A Series of Unfortunate Events/A Series of Unfortunate Events - 1x02 - The Bad Beginning Part Two.mkv"

commented

Thanks for the help, I really appreciate it.

The script running on my Windows box had already processed that folder by the time I was able to get home. I ran the ffprobe against another folder.

ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "Jessica Jones - S01E01.mkv"
3115.011000

When I tried to run the script with that folder name in media path I got this.

conv2mp4-py v0.9 BETA - https://github.com/BrianDMG/conv2mp4-py

Building file list, please wait. This may take a while, especially for large libraries.

conv2mp4-py v0.9 BETA - https://github.com/BrianDMG/conv2mp4-py

There are 13 files in the queue:

1: /home/pi/Shared/DESKTOP-2/Tvshows/Jessica Jones/Jessica Jones - S01E01.mkv
2: /home/pi/Shared/DESKTOP-2/Tvshows/Jessica Jones/Jessica Jones - S01E02.mkv
3: /home/pi/Shared/DESKTOP-2/Tvshows/Jessica Jones/Jessica Jones - S01E03.mkv
4: /home/pi/Shared/DESKTOP-2/Tvshows/Jessica Jones/Jessica Jones - S01E04.mkv
5: /home/pi/Shared/DESKTOP-2/Tvshows/Jessica Jones/Jessica Jones - S01E05.mkv
6: /home/pi/Shared/DESKTOP-2/Tvshows/Jessica Jones/Jessica Jones - S01E06.mkv
7: /home/pi/Shared/DESKTOP-2/Tvshows/Jessica Jones/Jessica Jones - S01E07.mkv
8: /home/pi/Shared/DESKTOP-2/Tvshows/Jessica Jones/Jessica Jones - S01E08.mkv
9: /home/pi/Shared/DESKTOP-2/Tvshows/Jessica Jones/Jessica Jones - S01E09.mkv
10: /home/pi/Shared/DESKTOP-2/Tvshows/Jessica Jones/Jessica Jones - S01E10.mkv
11: /home/pi/Shared/DESKTOP-2/Tvshows/Jessica Jones/Jessica Jones - S01E11.mkv
12: /home/pi/Shared/DESKTOP-2/Tvshows/Jessica Jones/Jessica Jones - S01E12.mkv
13: /home/pi/Shared/DESKTOP-2/Tvshows/Jessica Jones/Jessica Jones - S01E13.mkv


06/22/2017 16:02:17 Processing - /home/pi/Shared/DESKTOP-2/Tvshows/Jessica Jones/Jessica Jones - S01E01.mkv
06/22/2017 16:02:17 File 1 of 13 - Total queue 7.69%
Argument 'Jones/Jessica' provided as input filename, but '/home/pi/Shared/DESKTOP-2/Tvshows/Jessica' was already specified.
Argument 'Jones/Jessica' provided as input filename, but '/home/pi/Shared/DESKTOP-2/Tvshows/Jessica' was already specified.
Argument 'Jones/Jessica' provided as input filename, but '/home/pi/Shared/DESKTOP-2/Tvshows/Jessica' was already specified.
Traceback (most recent call last):
File "conv2mp4-py.py", line 411, in
codec_discovery()
File "conv2mp4-py.py", line 161, in codec_discovery
get_duration_temp = humanize_time(head)
File "conv2mp4-py.py", line 129, in humanize_time
mins, secs = divmod(int(secs), 60)
ValueError: invalid literal for int() with base 10: ''

I attached my copy of the script and the log file.

conv2mp4-py.zip

conv2mp4-py.txt

commented

If you're still having this issue, would you mind opening the issue on the py issues list? Thanks.