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.53k stars 201 forks source link

delugePostProcess.py doesn't relocate moov, manual.py & postSonarr.py does #777

Closed tconnz closed 7 years ago

tconnz commented 7 years ago

Hi,

Firstly, a huge thanks for mdhiggins for the excellent scripts, my Plex setup would have been lost without them!

Have been using manual.py & RSS + torrent feeds for years, finally switched over to Sonarr & Radarr and just today go things working again.

I do have one query:

Should deulgePostProcess.py still relocate the moov atom data just like manual.py or postSonarr.py?

I've noticed without changing anything in autoprocess.ini, the delugePostProcess converts the files to MP4 as normal but doesn't relocate the moov data. Once the script hands the file back to Sonarr, Sonarr renames and moves the file to a NAS , then fires the postSonarr.py script goes back and the moov data is relocated.

Initial conversion is done on an SSD, then the file is moved to a NAS , and then the moov ataom data is relocated. Hopeful I can get it to run in the first step so its on the SSD and not across the LAN to the NAS :)

Anyone have the same experience or complete opposite?

Here's the info.log excerpt:

2017-08-05 13:47:55 - delugePostProcess - INFO - Deluge post processing started. 2017-08-05 13:47:55 - readSettings - INFO - C:\Python27\python.exe 2017-08-05 13:47:55 - delugePostProcess - INFO - Successfully connected to Deluge 2017-08-05 13:47:55 - delugePostProcess - INFO - Converting file E:\Unsorted\Star.Wars.Rebels.S03E21.Zero.Hour.Part.II.720p.DSNY.WEBRip.AAC2.0.x264-TVSmash[rarbg]/Star.Wars.Rebels.S03E21.Zero.Hour.Part.II.720p.DSNY.WEBRip.AAC2.0.x264-TVSmash.mkv at location E:\Unsorted\Star.Wars.Rebels.S03E21.Zero.Hour.Part.II.720p.DSNY.WEBRip.AAC2.0.x264-TVSmash[rarbg]-convert. 2017-08-05 13:47:55 - mkvtomp4 - INFO - Reading video stream. 2017-08-05 13:47:55 - mkvtomp4 - INFO - Video codec detected: h264. 2017-08-05 13:47:55 - mkvtomp4 - INFO - Pix Fmt: yuv420p. 2017-08-05 13:47:55 - mkvtomp4 - INFO - Reading audio streams. 2017-08-05 13:47:55 - mkvtomp4 - INFO - No audio streams detected in any appropriate language, relaxing restrictions so there will be some audio stream present. 2017-08-05 13:47:55 - mkvtomp4 - INFO - Audio detected for stream #1: aac [eng]. 2017-08-05 13:47:55 - mkvtomp4 - INFO - Creating audio stream 0 from source stream 1. 2017-08-05 13:47:55 - mkvtomp4 - INFO - Audio Track is number 1 setting disposition to default 2017-08-05 13:47:55 - mkvtomp4 - INFO - Reading subtitle streams. 2017-08-05 13:47:55 - mkvtomp4 - INFO - Subtitle detected for stream #2: subrip [eng]. 2017-08-05 13:47:55 - mkvtomp4 - INFO - Creating subtitle stream 0 from source stream 2. 2017-08-05 13:47:55 - mkvtomp4 - INFO - Starting conversion. 2017-08-05 13:47:57 - mkvtomp4 - INFO - E:\Unsorted\Star.Wars.Rebels.S03E21.Zero.Hour.Part.II.720p.DSNY.WEBRip.AAC2.0.x264-TVSmash[rarbg]-convert\Star.Wars.Rebels.S03E21.Zero.Hour.Part.II.720p.DSNY.WEBRip.AAC2.0.x264-TVSmash.mp4 created. 2017-08-05 13:47:57 - delugePostProcess - INFO - Passing E:\Unsorted\Star.Wars.Rebels.S03E21.Zero.Hour.Part.II.720p.DSNY.WEBRip.AAC2.0.x264-TVSmash[rarbg]-convert directory to Sonarr. 2017-08-05 13:47:57 - autoprocess.sonarr - INFO - Sonarr notifier started. 2017-08-05 13:47:57 - autoprocess.sonarr - INFO - Requesting Sonarr to scan directory 'E:\Unsorted\Star.Wars.Rebels.S03E21.Zero.Hour.Part.II.720p.DSNY.WEBRip.AAC2.0.x264-TVSmash[rarbg]-convert'. 2017-08-05 13:47:58 - autoprocess.sonarr - INFO - Sonarr response: queued. 2017-08-05 13:47:58 - delugePostProcess - ERROR - Unable to delete temporary directory. Traceback (most recent call last): File "C:\Scripts\AutoConvert\delugePostProcess.py", line 122, in os.rmdir(delete_dir) WindowsError: [Error 145] The directory is not empty: 'E:\Unsorted\Star.Wars.Rebels.S03E21.Zero.Hour.Part.II.720p.DSNY.WEBRip.AAC2.0.x264-TVSmash[rarbg]-convert' 2017-08-05 13:48:07 - SonarrPostConversion - INFO - Sonarr extra script post processing started. 2017-08-05 13:48:07 - readSettings - INFO - C:\Python27\python.exe 2017-08-05 13:48:07 - SonarrPostConversion - INFO - Processing \QNAP\Multimedia\TV Series\Star Wars Rebels\Season 03\Star Wars Rebels - S03E21 - Zero Hour (2).mp4. 2017-08-05 13:48:07 - mkvtomp4 - INFO - Relocating MOOV atom to start of file. 2017-08-05 13:48:07 - qtfaststart - INFO - Removing free atom at 32 (8 bytes) 2017-08-05 13:48:07 - qtfaststart - INFO - Patching stco with 31022 entries 2017-08-05 13:48:07 - qtfaststart - INFO - Patching stco with 31017 entries 2017-08-05 13:48:07 - qtfaststart - INFO - Patching stco with 316 entries 2017-08-05 13:48:07 - qtfaststart - INFO - Writing output...

mdhiggins commented 7 years ago

This is the normal expected behavior, moving the MOOV atom only occurs after tagging takes place (due to issues with playback that come up if you tag after moving) and deluge, like all the other download client scripts, does not tag

If you'd like to move the moov atom and just tag after the fact you are free to do so. Simply have FFMPEG move the moov atom instead of using QTFastStart by adding -movflags, faststart to your postopts parameters in autoProcess.ini

tconnz commented 7 years ago

Cheers for the speedy response! P.S. Do you have a method of accepting donations/beer money?

mdhiggins commented 7 years ago

No need to do that but if you'd like I have a PayPal and can always use beer money! It's tehpsyc@gmail.com

Sent from my iPhone

On Aug 5, 2017, at 16:59, tconnz notifications@github.com wrote:

Cheers for the speedy response! P.S. Do you have a method of accepting donations/beer money?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.

tconnz commented 7 years ago

Legend, cheers :)

mdhiggins commented 7 years ago

Much appreciated! Thanks again

AverageUnknown commented 6 years ago

If you'd like to move the moov atom and just tag after the fact you are free to do so. Simply have FFMPEG move the moov atom instead of using QTFastStart by adding -movflags, faststart to your postopts parameters in autoProcess.ini

By doing it this way we shouldn't run into any playback issues, correct?

mdhiggins commented 6 years ago

You might, the whole reason I don’t do this as the default is occasionally after tagging if you move the MOOV before tagging you’ll get seeking and playback issues, but it is very rare

From: JySzE Sent: Sunday, February 18, 2018 2:46 PM To: mdhiggins/sickbeard_mp4_automator Cc: Michael Higgins; State change Subject: Re: [mdhiggins/sickbeard_mp4_automator] delugePostProcess.py doesn'trelocate moov, manual.py & postSonarr.py does (#777)

If you'd like to move the moov atom and just tag after the fact you are free to do so. Simply have FFMPEG move the moov atom instead of using QTFastStart by adding -movflags, faststart to your postopts parameters in autoProcess.ini By doing it this way we shouldn't run into any playback issues, correct? — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.