Mkv to MP4 convert and tag?

Status
Not open for further replies.

mclarkin9681

Dabbler
Joined
Aug 13, 2014
Messages
11
I was curious what the community used to convert mkv files to mp4? I am using SickBerad with SABnzbd. I am running the znbToSickBeard script. This is working fine...i starting googling some ways to convert mkv to mp4 on the fly. I came across the SickBeard Mp4 automator script. Has anyone used this? I added the PostConversion script to the "extra_script" section in sickbeard. Its supposed to convert the mkv and then embed the meta data. I wanted to convert and add the meta data(embed) so i can add to iTunes and this script sounds perfect. But i am not able to get it to run all the way through. I updated the AutoProcess.ini accordingly.

For the most part, the file will convert, errors once in a while. But it does not seem to add the tags or delete the original or move to another location...all of which are set in the AutoProcess.ini

Has anyone had success with this?
 

mclarkin9681

Dabbler
Joined
Aug 13, 2014
Messages
11
Here is the log for one of them.
Im not exactly sure what OSError: [Errno 1] means...from searching around its an issue with Python?

Code:
[22:48:11] [INFO]::MAIN: Auto-detected SECTION:SickBeard
[22:48:11] [INFO]::MAIN: Calling SickBeard:tv to post-process:The.Goldbergs.2013.S02E01.Love.is.a.Mix.Tape.720p.WEB-DL.DD5.1.h.264-NTb-NZBgeek.nzb
[22:48:11] [INFO]::MAIN: Attempting to auto-detect tv fork
[22:48:11] [INFO]::MAIN: SickBeard:tv fork auto-detection successful ...
[22:48:11] [INFO]::MAIN: SickBeard:tv fork set to sickrage
[22:48:11] [INFO]::TRANSCODER: Checking [8a60392fe5869997b830b71b271aa10fcb681660.mkv] for corruption, please stand by ...
[22:48:11] [INFO]::TRANSCODER: SUCCESS: [8a60392fe5869997b830b71b271aa10fcb681660.mkv] has no corruption.
[22:48:11] [INFO]::MAIN: FLATTEN: Flattening directory: /mnt/media/downloads/sabnzbd/complete/tv/The.Goldbergs.2013.S02E01.Love.is.a.Mix.Tape.720p.WEB-DL.DD5.1.h.264-NTb-NZBgeek
[22:48:11] [INFO]::MAIN: FLATTEN: Flattening directory: /mnt/media/downloads/sabnzbd/complete/tv/The.Goldbergs.2013.S02E01.Love.is.a.Mix.Tape.720p.WEB-DL.DD5.1.h.264-NTb-NZBgeek
[22:48:11] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request
[22:49:16] [POSTPROCESS]::SICKBEARD: Processing folder /mnt/media/downloads/sabnzbd/complete/tv/The.Goldbergs.2013.S02E01.Love.is.a.Mix.Tape.720p.WEB-DL.DD5.1.h.264-NTb-NZBgeek
[22:49:16] [POSTPROCESS]::SICKBEARD: TV_DOWNLOAD_DIR:
[22:49:16] [POSTPROCESS]::SICKBEARD: PostProcessing Path: /mnt/media/downloads/sabnzbd/complete/tv
[22:49:16] [POSTPROCESS]::SICKBEARD: PostProcessing Dirs: [u'The.Goldbergs.2013.S02E01.Love.is.a.Mix.Tape.720p.WEB-DL.DD5.1.h.264-NTb-NZBgeek']
[22:49:16] [POSTPROCESS]::SICKBEARD: PostProcessing Files: []
[22:49:16] [POSTPROCESS]::SICKBEARD: PostProcessing VideoFiles: []
[22:49:16] [POSTPROCESS]::SICKBEARD: PostProcessing RarContent: []
[22:49:16] [POSTPROCESS]::SICKBEARD: PostProcessing VideoInRar: []
[22:49:16] [POSTPROCESS]::SICKBEARD: Processing folder The.Goldbergs.2013.S02E01.Love.is.a.Mix.Tape.720p.WEB-DL.DD5.1.h.264-NTb-NZBgeek
[22:49:16] [POSTPROCESS]::SICKBEARD: Processing /mnt/media/downloads/sabnzbd/complete/tv/The.Goldbergs.2013.S02E01.Love.is.a.Mix.Tape.720p.WEB-DL.DD5.1.h.264-NTb-NZBgeek/The.Goldbergs.2013.S02E01.Love.is.a.Mix.Tape.720p.WEB-DL.DD5.1.h.264-NTb-NZBgeek.mkv (The.Goldbergs.2013.S02E01.Love.is.a.Mix.Tape.720p.WEB-DL.DD5.1.h.264-NTb-NZBgeek.nzb)
[22:49:16] [POSTPROCESS]::SICKBEARD: Found result in history: (<sickbeard.tv.TVShow object at 0x80a9a4950>, 2, [], 32, -1)
[22:49:16] [POSTPROCESS]::SICKBEARD: Retrieving episode object for 2x1
[22:49:16] [POSTPROCESS]::SICKBEARD: Snatch history had a quality in it, using that: 720p WEB-DL
[22:49:16] [POSTPROCESS]::SICKBEARD: SB snatched this episode so I'm marking it as priority
[22:49:16] [POSTPROCESS]::SICKBEARD: Is ep a priority download: True
[22:49:16] [POSTPROCESS]::SICKBEARD: Snatch history had a version in it, using that: v-1
[22:49:16] [POSTPROCESS]::SICKBEARD: There is no existing file so there's no worries about replacing it
[22:49:16] [POSTPROCESS]::SICKBEARD: This download is marked a priority download so I'm going to replace an existing file if I find one
[22:49:16] [POSTPROCESS]::SICKBEARD: Found release name The.Goldbergs.2013.S02E01.Love.is.a.Mix.Tape.720p.WEB-DL.DD5.1.h.264-NTb
[22:49:16] [POSTPROCESS]::SICKBEARD: Destination folder for this episode: /mnt/media/videos/tvshows/The Goldbergs (2013)/Season 02
[22:49:16] [POSTPROCESS]::SICKBEARD: Moving file from /mnt/media/downloads/sabnzbd/complete/tv/The.Goldbergs.2013.S02E01.Love.is.a.Mix.Tape.720p.WEB-DL.DD5.1.h.264-NTb-NZBgeek/The.Goldbergs.2013.S02E01.Love.is.a.Mix.Tape.720p.WEB-DL.DD5.1.h.264-NTb-NZBgeek.mkv to /mnt/media/videos/tvshows/The Goldbergs (2013)/Season 02/The Goldbergs (2013) - S02E01 - Love Is a Mix Tape.mkv
[22:49:16] [POSTPROCESS]::SICKBEARD: Absolute path to script: /usr/local/share/sickbeard_mp4_automator/postConversion.py
[22:49:16] [POSTPROCESS]::SICKBEARD: Executing command [u'/usr/local/share/sickbeard_mp4_automator/postConversion.py', u'/mnt/media/videos/tvshows/The Goldbergs (2013)/Season 02/The Goldbergs (2013) - S02E01 - Love Is a Mix Tape.mkv', u'/mnt/media/downloads/sabnzbd/complete/tv/The.Goldbergs.2013.S02E01.Love.is.a.Mix.Tape.720p.WEB-DL.DD5.1.h.264-NTb-NZBgeek/The.Goldbergs.2013.S02E01.Love.is.a.Mix.Tape.720p.WEB-DL.DD5.1.h.264-NTb-NZBgeek.mkv', '269653', '2', '1', '2014-09-24']
[22:49:16] [POSTPROCESS]::SICKBEARD: Script result: Audio bitrate was invalid, defaulting to 256 per channel
[22:49:16] [POSTPROCESS]::SICKBEARD: 64
[22:49:16] [POSTPROCESS]::SICKBEARD: Video codec detected: h264
[22:49:16] [POSTPROCESS]::SICKBEARD: Audio stream detected: ac3 eng [Stream 1]
[22:49:16] [POSTPROCESS]::SICKBEARD: Creating dual audio channels for iOS compatability for this stream
[22:49:16] [POSTPROCESS]::SICKBEARD: Subtitle stream detected: subrip eng [Stream 2]
[22:49:16] [POSTPROCESS]::SICKBEARD: /mnt/media/videos/tvshows/The Goldbergs (2013)/Season 02/The Goldbergs (2013) - S02E01 - Love Is a Mix Tape.mp4 created
[22:49:16] [POSTPROCESS]::SICKBEARD: Traceback (most recent call last):
[22:49:16] [POSTPROCESS]::SICKBEARD:   File "/usr/local/share/sickbeard_mp4_automator/postConversion.py", line 23, in <module>
[22:49:16] [POSTPROCESS]::SICKBEARD:     output = converter.process(inputfile, original=original)
[22:49:16] [POSTPROCESS]::SICKBEARD:   File "/usr/local/share/sickbeard_mp4_automator/mkvtomp4.py", line 111, in process
[22:49:16] [POSTPROCESS]::SICKBEARD:     outputfile, inputfile = self.convert(inputfile, options, reportProgress)
[22:49:16] [POSTPROCESS]::SICKBEARD:   File "/usr/local/share/sickbeard_mp4_automator/mkvtomp4.py", line 403, in convert
[22:49:16] [POSTPROCESS]::SICKBEARD:     os.chmod(outputfile, 0777) # Set permissions of newly created file
[22:49:16] [POSTPROCESS]::SICKBEARD: OSError: [Errno 1] Operation not permitted: '/mnt/media/videos/tvshows/The Goldbergs (2013)/Season 02/The Goldbergs (2013) - S02E01 - Love Is a Mix Tape.mp4'
[22:49:16] [POSTPROCESS]::SICKBEARD: Processing succeeded for /mnt/media/downloads/sabnzbd/complete/tv/The.Goldbergs.2013.S02E01.Love.is.a.Mix.Tape.720p.WEB-DL.DD5.1.h.264-NTb-NZBgeek/The.Goldbergs.2013.S02E01.Love.is.a.Mix.Tape.720p.WEB-DL.DD5.1.h.264-NTb-NZBgeek.mkv
[22:49:16] [POSTPROCESS]::SICKBEARD: Deleting file 8a60392fe5869997b830b71b271aa10fcb681660.sfv
[22:49:16] [POSTPROCESS]::SICKBEARD: Deleted folder: /mnt/media/downloads/sabnzbd/complete/tv/The.Goldbergs.2013.S02E01.Love.is.a.Mix.Tape.720p.WEB-DL.DD5.1.h.264-NTb-NZBgeek
[22:49:16] [POSTPROCESS]::SICKBEARD: Successfully processed
[22:49:16] [INFO]::CLEANDIR: Directory /mnt/media/downloads/sabnzbd/complete/tv/The.Goldbergs.2013.S02E01.Love.is.a.Mix.Tape.720p.WEB-DL.DD5.1.h.264-NTb-NZBgeek has been processed and removed ...
[22:49:16] [INFO]::MAIN: The /usr/local/share/nzbToMedia/nzbToSickBeard.py script completed successfully.
SickBeard: Successfully post-processed The.Goldbergs.2013.S02E01.Love.is.a.Mix.Tape.720p.WEB-DL.DD5.1.h.264-NTb-NZBgeek.nzb!
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
If you look at the line above the OSError, it looks to be failing while trying to set permissions of the output file. But, it then states that processing succeeded.

You'll need the script to either be run as root, or have write access to the files.
 

mclarkin9681

Dabbler
Joined
Aug 13, 2014
Messages
11
When i look in SickRage Logs and Error the recent downloaded shows have "Failed to set permission for /mnt/media/videos/tvshows/The Goldbergs (2013)/Season 02/The Goldbergs (2013) - S02E01 - Love Is a Mix Tape.mkv to 664"

Not sure if the 2 are related. But the shows show up fine and play no problem.
 
Status
Not open for further replies.
Top