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.
129 stars 23 forks source link

Just not working #40

Closed jroncalli closed 4 years ago

jroncalli commented 5 years ago

Here is an output when I run it, I am using powershell and a scheduled task. Building file list, please wait. This may take a while, especially for large libraries.

Found 6 files so far...conv2mp4-ps v3.1.2.3 RELEASE - https://github.com/BrianDMG/conv2mp4-ps

There are 6 files in the queue:

  1. Z:\movies\Ralph Breaks the Internet (2018)\Ralph Breaks the Internet (2018).avi
  2. Z:\movies\The House with a Clock in Its Walls (2018)\The House with a Clock in Its Walls (2018).mkv
  3. Z:\movies\Night School (2018)\Night School (2018).avi
  4. Z:\tvshows\The Blacklist\Season 6\The Blacklist - S06E01 - Dr. Hans Koehler.mkv
  5. Z:\tvshows\The Orville\Season 2\The Orville - S02E01 - Ja'loja.mkv
  6. Z:\tvshows\The Orville\Season 2\The Orville - S02E02 - Primal Urges.mkv

01/04/19 20:04:26 Processing - Z:\movies\Ralph Breaks the Internet (2018)\Ralph Breaks the Internet (2018).avi 01/04/19 20:04:26 File 1 of 6 - Total queue 16.67% 01/04/19 20:04:27 Video: MPEG4, Audio: AC3. Encoding video to H264 and audio to AAC. ffmpeg version N-92644-gfe0416f8a1 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 8.2.1 (GCC) 20181201 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt libavutil 56. 24.101 / 56. 24.101 libavcodec 58. 41.102 / 58. 41.102 libavformat 58. 23.102 / 58. 23.102 libavdevice 58. 6.101 / 58. 6.101 libavfilter 7. 46.101 / 7. 46.101 libswscale 5. 4.100 / 5. 4.100 libswresample 3. 4.100 / 3. 4.100 libpostproc 55. 4.100 / 55. 4.100 Input #0, avi, from 'Z:\movies\Ralph Breaks the Internet (2018)\Ralph Breaks the Internet (2018).avi': Metadata: encoder : VirtualDubMod 1.5.10.2 (build 2542/release) Duration: 01:50:25.36, start: 0.000000, bitrate: 1951 kb/s Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x304 [SAR 1:1 DAR 45:19], 1749 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, fltp, 192 kb/s Z:\movies\Ralph Breaks the Internet (2018)\Ralph Breaks the Internet (2018).mp4: Permission denied 01/04/19 20:04:27 ffmpeg completed Get-Item : Cannot find path 'Z:\movies\Ralph Breaks the Internet (2018)\Ralph Breaks the Internet (2018).mp4' because it does not exist. At C:\Sysinternals\conv2mp4\conv2mp4-ps.ps1:831 char:16

01/04/19 20:04:27 ERROR: Z:\movies\Ralph Breaks the Internet (2018)\Ralph Breaks the Internet (2018).mp4 could not be deleted. Full error below. Cannot find path 'Z:\movies\Ralph Breaks the Internet (2018)\Ralph Breaks the Internet (2018).mp4' because it does not exist. [20:04:27] hb_init: starting libhb thread [20:04:27] thread 5b8e440 started ("libhb") HandBrake 1.1.2 (2018090500) - MinGW x86_64 - https://handbrake.fr 16 CPUs detected Opening Z:\movies\Ralph Breaks the Internet (2018)\Ralph Breaks the Internet (2018).avi... [20:04:27] CPU: [20:04:27] - logical processor count: 16 [20:04:27] Intel Quick Sync Video support: no [20:04:27] hb_scan: path=Z:\movies\Ralph Breaks the Internet (2018)\Ralph Breaks the Internet (2018).avi, title_index=1 udfread ERROR: ECMA 167 Volume Recognition failed src/libbluray/disc/disc.c:323: failed opening UDF image Z:\movies\Ralph Breaks the Internet (2018)\Ralph Breaks the Internet (2018).avi src/libbluray/disc/disc.c:424: error opening file BDMV\index.bdmv src/libbluray/disc/disc.c:424: error opening file BDMV\BACKUP\index.bdmv [20:04:27] bd: not a bd - trying as a stream/file instead libdvdnav: Using dvdnav version 6.0.0 libdvdread: Encrypted DVD support unavailable. libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed libdvdread: Can't open file VIDEO_TS.IFO. libdvdnav: vm: failed to read VIDEO_TS.IFO [20:04:27] dvd: not a dvd - trying as a stream/file instead Input #0, avi, from 'Z:\movies\Ralph Breaks the Internet (2018)\Ralph Breaks the Internet (2018).avi': Metadata: encoder : VirtualDubMod 1.5.10.2 (build 2542/release) Duration: 01:50:25.36, start: 0.000000, bitrate: 1951 kb/s Stream #0:0: Video: mpeg4 (Advanced Simple Profile) [XVID / 0x44495658] yuv420p, 720x304 [PAR 1:1 DAR 45:19] 25 fps, 25 tbn Stream #0:1: Audio: ac3 [[0] [0][0] / 0x2000] 48000 Hz, stereo, fltp, 192 kb/s [20:04:27] scan: decoding previews for title 1 Scanning title 1 of 1, preview 1, 0.00 %[ac3 @ 00000000060806c0] frame sync error [ac3 @ 00000000060806c0] frame sync error [20:04:28] scan: audio 0x1: ac3, rate=48000Hz, bitrate=192000 Unknown (AC3) (2.0 ch) [20:04:28] scan: 10 previews, 720x304, 25.000 fps, autocrop = 0/0/0/0, aspect 2.37:1, PAR 1:1 [20:04:28] libhb: scan thread found 1 valid title(s)

Encode failed (error 3). HandBrake has exited.

Encoding: task 1 of 1, 0.00 % 01/04/19 20:04:28 Handbrake finished. Get-Item : Cannot find path 'Z:\movies\Ralph Breaks the Internet (2018)\Ralph Breaks the Internet (2018).mp4' because it does not exist. At C:\Sysinternals\conv2mp4\conv2mp4-ps.ps1:855 char:20

01/04/19 20:04:28 ERROR: New file was too small (-1541.41MB). Retained Z:\movies\Ralph Breaks the Internet (2018)\Ralph Breaks the Internet (2018).avi. 01/04/19 20:04:28 ERROR: Z:\movies\Ralph Breaks the Internet (2018)\Ralph Breaks the Internet (2018).mp4 could not be deleted. Full error below. Cannot find path 'Z:\movies\Ralph Breaks the Internet (2018)\Ralph Breaks the Internet (2018).mp4' because it does not exist. cfg_conv2mp4-ps - Copy.txt

jroncalli commented 5 years ago

And I also tried the python version, here was the output There are 6 files in the queue:

1: //srv/4fb31e81-35c5-42de-acb2-9bb80b7ec9b7/plexmedia/tvshows/The Orville/Season 2/The Orville - S02E02 - Primal Urges.mkv
2: //srv/4fb31e81-35c5-42de-acb2-9bb80b7ec9b7/plexmedia/tvshows/The Orville/Season 2/The Orville - S02E01 - Ja'loja.mkv
3: //srv/4fb31e81-35c5-42de-acb2-9bb80b7ec9b7/plexmedia/tvshows/The Blacklist/Season 6/The Blacklist - S06E01 - Dr. Hans Koehler.mkv
4: //srv/4fb31e81-35c5-42de-acb2-9bb80b7ec9b7/plexmedia/movies/Ralph Breaks the Internet (2018)/Ralph Breaks the Internet (2018).avi
5: //srv/4fb31e81-35c5-42de-acb2-9bb80b7ec9b7/plexmedia/movies/The House with a Clock in Its Walls (2018)/The House with a Clock in Its Walls (2018).mkv
6: //srv/4fb31e81-35c5-42de-acb2-9bb80b7ec9b7/plexmedia/movies/Night School (2018)/Night School (2018).avi


01/04/2019 20:20:27 Processing - //srv/4fb31e81-35c5-42de-acb2-9bb80b7ec9b7/plexmedia/tvshows/The Orville/Season 2/The Orville - S02E02 - Primal Urges.mkv
01/04/2019 20:20:27 File 1 of 6 - Total queue 16.67%
Argument 'Orville/Season' provided as input filename, but '//srv/4fb31e81-35c5-42de-acb2-9bb80b7ec9b7/plexmedia/tvshows/The' was already specified. Argument 'Orville/Season' provided as input filename, but '//srv/4fb31e81-35c5-42de-acb2-9bb80b7ec9b7/plexmedia/tvshows/The' was already specified. Argument 'Orville/Season' provided as input filename, but '//srv/4fb31e81-35c5-42de-acb2-9bb80b7ec9b7/plexmedia/tvshows/The' was already specified. Traceback (most recent call last):

BrianDMG commented 4 years ago

Is this an issue you continued to have? Busy year, apologies for the delay in response.