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 202 forks source link

Invalid source, no data returned. #1535

Closed sourpatched closed 2 years ago

sourpatched commented 2 years ago

Describe the bug Command output : Manual processor started. Python 64-bit 3.8.10 (default, Nov 26 2021, 20:14:08) [GCC 9.3.0]. Guessit version: 3.4.3. /usr/bin/python Loading default config file. Loading config file /config/autoProcess.ini. Enter path to file: Invalid source, no data returned. File /home/jimmy.mp4 is not in a valid format

From the log MANUAL - DEBUG - Invalid source, no data returned.

I have looked at other issues and spent days trying to work out why it no longer works.

Command or context you are trying to run python manual.py

autoProcess.ini settings I've copied the default one to test with

Log files MANUAL - DEBUG - Invalid source, no data returned.

System Information

Expected behavior Convert files

Additional context Other programs work fine. I think it could be an issue with the PATH, doesn't matter what file or location, the script doesn't work.

Issues posted without any logs or autoProcess settings will be closed

mdhiggins commented 2 years ago

Can you run

ffprobe -show_streams /home/jimmy.mp4

and post the output?

sourpatched commented 2 years ago

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/jimmy.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 title : artist : album : genre : date : 2016 track : 0 show : network : season_number : 0 episode_sort : 0 lyrics : encoder : Lavf55.33.100 media_type : 9

               : <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//ENhttp://www.apple.com/DTDs/PropertyList-1.0.dtd">
                : <plist version="1.0">
                :   <dict>
                :       <key>directors</key>
                :       <array>
                :           <dict>
                :               <key>name</key>
                :               <string>Sam</string>
                :           </dict>
                :       </array>
                :       <key>producers</key>
                :       <array>
                :           <dict>
                :               <key>name</key>
                :               <string>Jimmy</string>
                :           </dict>
                :       </array>
                :       <key>screenwriters</key>
                :       <array>
                :           <dict>
                :               <key>name</key>
                :               <string>&lt;a href=&quot;/name/nm0139743?ref_=tt_ov_wr&quot;&#x0A;itemprop=&apos;url&apos;&gt;&lt;span class=&quot;itemprop&quot; itemprop=&quot;name&quot;&gt;Jimmy</string>
                :           </dict>
                :       </array>
                :       <key>studio</key>
                :       <array>
                :           <dict>
                :               <key>name</key>
                :               <string>Fulwell 73</string>
                :           </dict>
                :       </array>
                :   </dict>
                : </plist>
                : 

Duration: 01:02:06.83, start: 0.000000, bitrate: 2048 kb/s Stream #0:00x1: Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 1280x720, 1915 kb/s, 23.98 fps, 23.98 tbr, 19184 tbn (default) Metadata: handler_name : VideoHandler vendor_id : [0][0][0][0] Stream #0:10x2: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default) Metadata: handler_name : SoundHandler vendor_id : [0][0][0][0] Stream #0:2[0x0]: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 182x268 [SAR 1:1 DAR 91:134], 90k tbr, 90k tbn (attached pic) [STREAM] index=0 codec_name=h264 codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 profile=Main codec_type=video codec_tag_string=avc1 codec_tag=0x31637661 width=1280 height=720 coded_width=1280 coded_height=720 closed_captions=0 film_grain=0 has_b_frames=2 sample_aspect_ratio=N/A display_aspect_ratio=N/A pix_fmt=yuv420p level=31 color_range=unknown color_space=unknown color_transfer=unknown color_primaries=unknown chroma_location=left field_order=progressive refs=1 is_avc=true nal_length_size=4 id=0x1 r_frame_rate=1199/50 avg_frame_rate=1199/50 time_base=1/19184 start_pts=0 start_time=0.000000 duration_ts=71495200 duration=3726.814012 bit_rate=1915531 max_bit_rate=N/A bits_per_raw_sample=8 nb_frames=89369 nb_read_frames=N/A nb_read_packets=N/A extradata_size=39 DISPOSITION:default=1 DISPOSITION:dub=0 DISPOSITION:original=0 DISPOSITION:comment=0 DISPOSITION:lyrics=0 DISPOSITION:karaoke=0 DISPOSITION:forced=0 DISPOSITION:hearing_impaired=0 DISPOSITION:visual_impaired=0 DISPOSITION:clean_effects=0 DISPOSITION:attached_pic=0 DISPOSITION:timed_thumbnails=0 DISPOSITION:captions=0 DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 TAG:language=und TAG:handler_name=VideoHandler TAG:vendor_id=[0][0][0][0] [/STREAM] [STREAM] index=1 codec_name=aac codec_long_name=AAC (Advanced Audio Coding) profile=LC codec_type=audio codec_tag_string=mp4a codec_tag=0x6134706d sample_fmt=fltp sample_rate=48000 channels=2 channel_layout=stereo bits_per_sample=0 id=0x2 r_frame_rate=0/0 avg_frame_rate=0/0 time_base=1/48000 start_pts=0 start_time=0.000000 duration_ts=178886640 duration=3726.805000 bit_rate=127792 max_bit_rate=N/A bits_per_raw_sample=N/A nb_frames=174695 nb_read_frames=N/A nb_read_packets=N/A extradata_size=2 DISPOSITION:default=1 DISPOSITION:dub=0 DISPOSITION:original=0 DISPOSITION:comment=0 DISPOSITION:lyrics=0 DISPOSITION:karaoke=0 DISPOSITION:forced=0 DISPOSITION:hearing_impaired=0 DISPOSITION:visual_impaired=0 DISPOSITION:clean_effects=0 DISPOSITION:attached_pic=0 DISPOSITION:timed_thumbnails=0 DISPOSITION:captions=0 DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 TAG:language=eng TAG:handler_name=SoundHandler TAG:vendor_id=[0][0][0][0] [/STREAM] [STREAM] index=2 codec_name=mjpeg codec_long_name=Motion JPEG profile=Baseline codec_type=video codec_tag_string=[0][0][0][0] codec_tag=0x0000 width=182 height=268 coded_width=182 coded_height=268 closed_captions=0 film_grain=0 has_b_frames=0 sample_aspect_ratio=1:1 display_aspect_ratio=91:134 pix_fmt=yuvj420p level=-99 color_range=pc color_space=bt470bg color_transfer=unknown color_primaries=unknown chroma_location=center field_order=unknown refs=1 id=0x0 r_frame_rate=90000/1 avg_frame_rate=0/0 time_base=1/90000 start_pts=0 start_time=0.000000 duration_ts=335414430 duration=3726.827000 bit_rate=N/A max_bit_rate=N/A bits_per_raw_sample=8 nb_frames=N/A nb_read_frames=N/A nb_read_packets=N/A DISPOSITION:default=0 DISPOSITION:dub=0 DISPOSITION:original=0 DISPOSITION:comment=0 DISPOSITION:lyrics=0 DISPOSITION:karaoke=0 DISPOSITION:forced=0 DISPOSITION:hearing_impaired=0 DISPOSITION:visual_impaired=0 DISPOSITION:clean_effects=0 DISPOSITION:attached_pic=1 DISPOSITION:timed_thumbnails=0 DISPOSITION:captions=0 DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 [/STREAM]

ffprobe can read the file. I've also reinstall python3 and removed python2 but still the script doesn't work.

mdhiggins commented 2 years ago

This error is returned when ffprobe can't read the file. Are you seeing this with every file? Any chance this is a permissions issue?

sourpatched commented 2 years ago

Every file within the script.

ffprobe is owned by root and same result before upgrade to 5.0

sourpatched commented 2 years ago

ffmpeg -i /home/ji ffmpeg -i /home/jimmy.mp4 /home/jimmy.mkv works without issue

mdhiggins commented 2 years ago

Are you running manual.py as root? If not you might not have execute permission if not running as root

Can you show me the permissions on ffprobe and confirm what user you're running from

This is a tough one to troubleshoot cause it's failing to get output from ffprobe so I don't have much to go on

It's usually some kind of permission issue since ffprobe is otherwise returning output when invoked manually

mdhiggins commented 2 years ago

Also double check and make sure you don't have a minimum file size set in autoProcess that you're below

I would suspect a different debug error message but just want to confirm

sourpatched commented 2 years ago

Never understood how this happened, worked one day but not the other. Command was ran with root, made no difference without sudo.

I've fix the issue with a total reinstall of the system ( then remembered had no up to date backups) Fun day 🤣

Thanks for the input and thanks for creating this script!