mdhiggins / sickbeard_mp4_automator

Automatically convert video files to a standardized format with metadata tagging to create a beautiful and uniform media library
MIT License
1.51k stars 201 forks source link

Files being processed twice #128

Closed jrderuiter closed 10 years ago

jrderuiter commented 10 years ago

For some reason my installation of sick beard_mp4_automator is processing files twice (ever since I updated to a newer version with subtitle functionality). This happens both with the sabnzbd to sick beard script and with manual post processing. Any idea what is causing this?

If it helps, importing of subtitles only seems to happen on the second try?

My auto process.ini is as follows:

[MP4] ffmpeg=C:\Scripts\ffmpeg-1.2\bin\ffmpeg.exe ffprobe=C:\Scripts\ffmpeg-1.2\bin\ffprobe.exe output_directory= copy_to= move_to=D:\iTunes\iTunes Media\Automatically Add to iTunes output_extension=m4v output_format=m4v delete_original=False relocate_moov=True audio-codec=ac3 video-codec=h264,x264 ios-audio=True audio-language=eng audio-default-language=eng subtitle-language=eng,nld subtitle-default-language=eng fullpathguess=True convert-mp4=False tagfile=True download-artwork=True download-subs=True embed-subs=True sub-providers=addic7ed,podnapisi,thesubdb,open subtitles

Log file of a processed file (from Sickbeard):

Processing folder C:\Users... Processing C:\Users... (None) Found result in history: (..., ..., ...) Parsed ... Checking scene exceptions for a match on ... Looking up ... in the DB Lookup successful, using tvdb id ... Loading show object for tvdb_id ... Retrieving episode object for ... Looking up quality for name ... SB snatched this episode so I'm marking it as priority Is ep a priority download: True File ... This download is marked a priority download so I'm going to replace an existing file if I find one Deleting file D:...mkv Found release name ... Destination folder for this episode: D:... Copying file from C:\Users... to D:... Absolute path to script: C:\Python27\python.exe Executing command [u'C:\Python27\python.exe', 'C:\Scripts\sickbeard_mp4_automator\postConversion.py', u"D:...", u"C:...", '...', '...', '...', '2014-04-27'] Script result: Tagging file :D:... Trying to write tags Tags written successfully Relocating MOOV atom to start of file QT FastStart did not run - perhaps moov atom was at the start already File moved to D:... ... has queued to be refreshed {} success

Processing succeeded for C:\Users... Processing C:\Users... (None) Found result in history: (..., ..., []) Parsed ... Checking scene exceptions for a match on ... Looking up ... in the DB Lookup successful, using tvdb id ... Loading show object for tvdb_id ... Retrieving episode object for ... Looking up quality for name ... SB snatched this episode so I'm marking it as priority Is ep a priority download: True File ... doesn't exist so there's no worries about replacing it This download is marked a priority download so I'm going to replace an existing file if I find one Deleting file D:....m4v Found release name ... Destination folder for this episode: D:... Copying file from C:\Users...mkv to D:....mkv Absolute path to script: C:\Python27\python.exe Executing command [u'C:\Python27\python.exe', 'C:\Scripts\sickbeard_mp4_automator\postConversion.py', u"D:...mkv", u"C:\Users....mkv", '...', '...', '...', '2014-04-27'] Script result: Video codec detected: h264 Audio stream detected: ac3 eng [Stream 1] Creating dual audio channels for iOS compatability for this stream Subtitle stream detected: subrip eng [Stream 2] External subtitle file detected, language eng Importing ....eng.srt subtitle stream D:....m4v created Tagging file :D:....m4v Trying to write tags Tags written successfully Relocating MOOV atom to start of file QT FastStart did not run - perhaps moov atom was at the start already Unable to move file to D:.. [Error 32] The process cannot access the file because it is being used by another process: u"D:....m4v" ... has queued to be refreshed {} success

Processing succeeded for ...

mdhiggins commented 10 years ago

This is strange. First off I'm noticing that for output format you have m4v, which is not a valid option. It should be mp4 or mov. This has nothing to do with your problem though. 

Can you email me the output log? A lot of what I'm seeing is being truncated with '...' And I can't make out what's going on in the log file.  — Sent from Mailbox

On Mon, Apr 28, 2014 at 12:55 PM, Julian de Ruiter notifications@github.com wrote:

For some reason my installation of sick beard_mp4_automator is processing files twice (ever since I updated to a newer version). This happens both with the sabnzbd to sick beard script and with manual post processing. Any idea what is causing this? If it helps, importing of subtitles only seems to happen on the second try? My auto process.ini is as follows: [MP4] ffmpeg=C:\Scripts\ffmpeg-1.2\bin\ffmpeg.exe ffprobe=C:\Scripts\ffmpeg-1.2\bin\ffprobe.exe output_directory= copy_to= move_to=D:\iTunes\iTunes Media\Automatically Add to iTunes output_extension=m4v output_format=m4v delete_original=False relocate_moov=True audio-codec=ac3 video-codec=h264,x264 ios-audio=True audio-language=eng audio-default-language=eng subtitle-language=eng,nld subtitle-default-language=eng fullpathguess=True convert-mp4=False tagfile=True download-artwork=True download-subs=True embed-subs=True sub-providers=addic7ed,podnapisi,thesubdb,open subtitles

Log file of a processed file (from Sickbeard): Processing folder C:\Users... Processing C:\Users... (None) Found result in history: (..., ..., ...) Parsed ... Checking scene exceptions for a match on ... Looking up ... in the DB Lookup successful, using tvdb id ... Loading show object for tvdb_id ... Retrieving episode object for ... Looking up quality for name ... SB snatched this episode so I'm marking it as priority Is ep a priority download: True File ... This download is marked a priority download so I'm going to replace an existing file if I find one Deleting file D:...mkv Found release name ... Destination folder for this episode: D:... Copying file from C:\Users... to D:... Absolute path to script: C:\Python27\python.exe Executing command [u'C:\Python27\python.exe', 'C:\Scripts\sickbeard_mp4_automator\postConversion.py', u"D:...", u"C:...", '...', '...', '...', '2014-04-27'] Script result: Tagging file :D:... Trying to write tags Tags written successfully Relocating MOOV atom to start of file QT FastStart did not run - perhaps moov atom was at the start already File moved to D:... ... has queued to be refreshed {} success Processing succeeded for C:\Users... Processing C:\Users... (None) Found result in history: (..., ..., []) Parsed ... Checking scene exceptions for a match on ... Looking up ... in the DB Lookup successful, using tvdb id ... Loading show object for tvdb_id ... Retrieving episode object for ... Looking up quality for name ... SB snatched this episode so I'm marking it as priority Is ep a priority download: True File ... doesn't exist so there's no worries about replacing it This download is marked a priority download so I'm going to replace an existing file if I find one Deleting file D:....m4v Found release name ... Destination folder for this episode: D:... Copying file from C:\Users...mkv to D:....mkv Absolute path to script: C:\Python27\python.exe Executing command [u'C:\Python27\python.exe', 'C:\Scripts\sickbeard_mp4_automator\postConversion.py', u"D:...mkv", u"C:\Users....mkv", '...', '...', '...', '2014-04-27'] Script result: Video codec detected: h264 Audio stream detected: ac3 eng [Stream 1] Creating dual audio channels for iOS compatability for this stream Subtitle stream detected: subrip eng [Stream 2] External subtitle file detected, language eng Importing ....eng.srt subtitle stream D:....m4v created Tagging file :D:....m4v Trying to write tags Tags written successfully Relocating MOOV atom to start of file QT FastStart did not run - perhaps moov atom was at the start already Unable to move file to D:.. [Error 32] The process cannot access the file because it is being used by another process: u"D:....m4v" ... has queued to be refreshed {} success

Processing succeeded for ...

Reply to this email directly or view it on GitHub: https://github.com/mdhiggins/sickbeard_mp4_automator/issues/128

jrderuiter commented 10 years ago

I sent you an e-mail. Note that you state 'output_format = mp4/m4v' in your read me.

mdhiggins commented 10 years ago

I'll review it when I get home. And thanks I fixed the readme. — Sent from Mailbox

On Mon, Apr 28, 2014 at 5:00 PM, Julian de Ruiter notifications@github.com wrote:

I sent you an e-mail. Note that you state 'output_format = mp4/m4v' in your read me.

Reply to this email directly or view it on GitHub: https://github.com/mdhiggins/sickbeard_mp4_automator/issues/128#issuecomment-41612940

mdhiggins commented 10 years ago

So your problem comes from the fact that you have delete-original disabled, so the script creates a new mp4, and then Sickbeard processes the folder and finds an mp4 file and an mkv file, then when it does its processing the mkv gets converted again. You either need to delete the original or setup an output-directory so that the new file isn't created in the same location as the original.