question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error while processing the decoded data for stream #0:0

See original GitHub issue

Describe the bug I am trying to use hardware acceleration in this script, but when converting, some files, I get several errors in a row and the conversion fails:

Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x560d9a5e3680] No decoder surfaces left
Impossible to convert between the formats supported by the filter 'Parsed_null_0' and the filter 'auto_scale_0'

Command or context you are trying to run /opt/sma/manual.py -i “/data/Atlanta S04E04.mp4” -a -c /opt/sma/autoProcess.ini

autoProcess.ini settings

[Converter]
ffmpeg = /usr/local/bin/ffmpeg
ffprobe = /usr/local/bin/ffprobe
threads = 0
hwaccels = cuda
hwaccel-decoders = h264_cuvid, hevc_cuvid, av1_cuvid, mjpeg_cuvid, mpeg1_cuvid, mpeg2_cuvid, mpeg4_cuvid, vc1_cuvid, vp8_cuvid, vp9_cuvid
hwdevices = cuda:0
hwaccel-output-format = cuda:cuda
output-directory =
output-format = mp4
output-extension = mp4
temp-extension =
minimum-size = 0
ignored-extensions = nfo, ds_store
copy-to =
move-to =
delete-original = True
process-same-extensions = False
bypass-if-copying-all = False
force-convert = False
post-process = False
wait-post-process = False
detailed-progress = False
opts-separator = ,
preopts =
postopts =
regex-directory-replace = [^\w\-_\. ]

[Permissions]
chmod = 0660
uid = -1
gid = -1

[Metadata]
relocate-moov = True
full-path-guess = True
tag = True
tag-language = eng
download-artwork = poster
sanitize-disposition =
strip-metadata = False
keep-titles = False

[Video]
codec = h264_nvenc
max-bitrate = 2800
bitrate-ratio =
crf = -1
crf-profiles =
preset =
codec-parameters =
dynamic-parameters = False
max-width = 0
profile =
max-level = 0.0
pix-fmt =
prioritize-source-pix-fmt = True
filter =
force-filter = False

[HDR]
codec =
pix-fmt =
space = bt2020nc
transfer = smpte2084
primaries = bt2020
preset =
codec-parameters =
filter =
force-filter = False
profile =

[Audio]
codec = ac3
languages =
default-language =
include-original-language = True
first-stream-of-language = False
channel-bitrate = 128
variable-bitrate = 0
max-bitrate = 0
max-channels = 0
filter =
profile =
force-filter = False
sample-rates =
sample-format =
copy-original = False
aac-adtstoasc = False
ignored-dispositions =
force-default = False
unique-dispositions = False
stream-codec-combinations =

[Audio.Sorting]
sorting = language, channels.d, map, d.comment
default-sorting = channels.d, map, d.comment
codecs =

[Universal Audio]
codec = aac
channel-bitrate = 128
variable-bitrate = 0
first-stream-only = False
filter =
profile =
force-filter = False

[Audio.ChannelFilters]
6-2 = pan=stereo|FL=0.5*FC+0.707*FL+0.707*BL+0.5*LFE|FR=0.5*FC+0.707*FR+0.707*BR+0.5*LFE

[Subtitle]
codec =
codec-image-based =
languages =
default-language =
include-original-language = False
first-stream-of-language = False
encoding =
burn-subtitles = False
burn-dispositions =
embed-subs = False
embed-image-subs = False
embed-only-internal-subs = False
filename-dispositions = forced
ignore-embedded-subs = False
ignored-dispositions =
force-default = False
unique-dispositions = False
attachment-codec =
remove-bitstream-subs = False

[Subtitle.Sorting]
sorting = language, d.comment, d.default.d, d.forced.d
burn-sorting = language, d.comment, d.default.d, d.forced.d
codecs =

[Subtitle.CleanIt]
enabled = False
config-path =
tags =

[Subtitle.FFSubsync]
enabled = False

[Subtitle.Subliminal]
download-subs = False
download-forced-subs = False
include-hearing-impaired-subs = False
providers =

[Subtitle.Subliminal.Auth]
opensubtitles =
tvsubtitles =

[Sonarr]
host = localhost
port = 8989
apikey =
ssl = False
webroot =
force-rename = False
rescan = True
block-reprocess = False

[Radarr]
host = localhost
port = 7878
apikey =
ssl = False
webroot =
force-rename = False
rescan = True
block-reprocess = False

[Sickbeard]
host = localhost
port = 8081
ssl = False
apikey =
webroot =
username =
password =

[Sickrage]
host = localhost
port = 8081
ssl = False
apikey =
webroot =
username =
password =

[SABNZBD]
convert = True
sickbeard-category = sickbeard
sickrage-category = sickrage
sonarr-category = sonarr
radarr-category = radarr
bypass-category = bypass
output-directory =
path-mapping =

[Deluge]
sickbeard-label = sickbeard
sickrage-label = sickrage
sonarr-label = sonarr
radarr-label = radarr
bypass-label = bypass
convert = True
host = localhost
port = 58846
username =
password =
output-directory =
remove = False
path-mapping =

[qBittorrent]
sickbeard-label = sickbeard
sickrage-label = sickrage
sonarr-label = sonarr
radarr-label = radarr
bypass-label = bypass
convert = True
action-before =
action-after =
host = localhost
port = 8080
ssl = False
username =
password =
output-directory =
path-mapping =

[uTorrent]
sickbeard-label = sickbeard
sickrage-label = sickrage
sonarr-label = sonarr
radarr-label = radarr
bypass-label = bypass
convert = True
webui = False
action-before =
action-after =
host = localhost
ssl = False
port = 8080
username =
password =
output-directory =
path-mapping =

[Plex]
host = localhost
port = 32400
refresh = False
token =

Log files Include log files for the specific job (not just a dump of all your logs for the past month) that’s causing the issue. Please turn on debug level logging Log files are found in your script root config folder ./sma/config/sma.log

2022-10-02 20:32:29 - MANUAL - INFO - Guessit version: 3.4.3.
2022-10-02 20:32:29 - MANUAL - INFO - /usr/bin/python3
2022-10-02 20:32:29 - MANUAL - INFO - Loading config file /opt/sma/autoProcess.ini.
2022-10-02 20:32:30 - MANUAL - DEBUG - Input IDs:
2022-10-02 20:32:30 - MANUAL - DEBUG - TMDBID: 65495
2022-10-02 20:32:30 - MANUAL - DEBUG - IMDBID: None
2022-10-02 20:32:30 - MANUAL - DEBUG - TVDBID: None
2022-10-02 20:32:30 - MANUAL - DEBUG - Using TMDB ID: 65495
2022-10-02 20:32:30 - MANUAL - DEBUG - Tagging language determined to be eng.
2022-10-02 20:32:31 - MANUAL - INFO - Matched TV episode as Atlanta (TMDB ID: 65495) S04E04
2022-10-02 20:32:31 - MANUAL - INFO - Processing Atlanta Season 04 Episode 04 - Light Skinned-Ed
2022-10-02 20:32:31 - MANUAL - DEBUG - Process started.
2022-10-02 20:32:31 - MANUAL - DEBUG - Appending eng to allowed audio languages [include-original-language].
2022-10-02 20:32:31 - MANUAL - INFO - Input Data
2022-10-02 20:32:31 - MANUAL - INFO - {
    "format": "matroska,webm",
    "format-fullname": "unknown",
    "video": {
        "index": 0,
        "codec": "h264",
        "bitrate": 5655204,
        "pix_fmt": "yuv420p",
        "profile": "100",
        "fps": 23.976023976023978,
        "framedata": {
            "pix_fmt": "yuv420p",
            "color_space": "bt709",
            "color_primaries": "bt709",
            "color_transfer": "bt709"
        },
        "dimensions": "1280x720",
        "level": 3.1,
        "field_order": "progressive"
    },
    "audio": [
        {
            "index": 1,
            "codec": "eac3",
            "bitrate": 640000,
            "channels": 6,
            "samplerate": 48000,
            "language": "eng",
            "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions"
        }
    ],
    "subtitle": [
        {
            "index": 2,
            "codec": "subrip",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "language": "eng"
        }
    ],
    "attachment": []
}
2022-10-02 20:32:31 - MANUAL - INFO - Reading video stream.
2022-10-02 20:32:31 - MANUAL - INFO - Video codec detected: h264.
2022-10-02 20:32:31 - MANUAL - INFO - Pix Fmt: yuv420p.
2022-10-02 20:32:31 - MANUAL - INFO - Profile: 100.
2022-10-02 20:32:31 - MANUAL - DEBUG - Stream is not HDR, color parameter bt709 does not match ['bt2020nc'] [hdr-['bt2020nc']].
2022-10-02 20:32:31 - MANUAL - DEBUG - Codec pool is missing the FFPROBE value of the primary conversion codec h264_nvenc which will prevent remuxing, adding h264 to the list.
2022-10-02 20:32:31 - MANUAL - DEBUG - Pool of video codecs is ['h264_nvenc', 'h264'].
2022-10-02 20:32:31 - MANUAL - DEBUG - Total bitrate is 6293737.0.
2022-10-02 20:32:31 - MANUAL - DEBUG - Total audio bitrate is 640000.
2022-10-02 20:32:31 - MANUAL - DEBUG - Estimated video bitrate is 5653737.0.
2022-10-02 20:32:31 - MANUAL - DEBUG - Using video bitrate ratio of 1.000000, which results in 5371.050150 changing to 5371.050150.
2022-10-02 20:32:31 - MANUAL - DEBUG - Overriding video bitrate. Codec cannot be copied because video bitrate is too high [video-max-bitrate].
2022-10-02 20:32:31 - MANUAL - DEBUG - Source bit-depth 8, output 0, using depth 8.
2022-10-02 20:32:31 - MANUAL - DEBUG - Video codec: h264_nvenc.
2022-10-02 20:32:31 - MANUAL - DEBUG - Video bitrate: 2800.
2022-10-02 20:32:31 - MANUAL - DEBUG - Video CRF: -1.
2022-10-02 20:32:31 - MANUAL - DEBUG - Video maxrate: None.
2022-10-02 20:32:31 - MANUAL - DEBUG - Video bufsize: None.
2022-10-02 20:32:31 - MANUAL - DEBUG - Video level: 0.0.
2022-10-02 20:32:31 - MANUAL - DEBUG - Video profile: None.
2022-10-02 20:32:31 - MANUAL - DEBUG - Video preset: None.
2022-10-02 20:32:31 - MANUAL - DEBUG - Video pix_fmt: None.
2022-10-02 20:32:31 - MANUAL - DEBUG - Video field order: progressive.
2022-10-02 20:32:31 - MANUAL - DEBUG - Video width: None.
2022-10-02 20:32:31 - MANUAL - DEBUG - Video debug video.max-bitrate.
2022-10-02 20:32:31 - MANUAL - INFO - Video codec parameters None.
2022-10-02 20:32:31 - MANUAL - INFO - Creating h264_nvenc video stream from source stream 0.
2022-10-02 20:32:31 - MANUAL - INFO - Reading audio streams.
2022-10-02 20:32:31 - MANUAL - INFO - The following stream indexes have been identified as being copies: [] [stream-codec-combinations].
2022-10-02 20:32:31 - MANUAL - DEBUG - Pool universal audio codecs is ['aac'].
2022-10-02 20:32:31 - MANUAL - DEBUG - Pool of audio codecs is ['ac3'].
2022-10-02 20:32:31 - MANUAL - INFO - Audio detected for stream 1 - eac3 eng 6 channel.
2022-10-02 20:32:31 - MANUAL - DEBUG - Found an audio filter for converting from 6 channels to 2 channels. Applying filter pan=stereo|FL=0.5*FC+0.707*FL+0.707*BL+0.5*LFE|FR=0.5*FC+0.707*FR+0.707*BR+0.5*LFE to UA.
2022-10-02 20:32:31 - MANUAL - DEBUG - Audio codec: aac.
2022-10-02 20:32:31 - MANUAL - DEBUG - Channels: 2.
2022-10-02 20:32:31 - MANUAL - DEBUG - Filter: pan=stereo|FL=0.5*FC+0.707*FL+0.707*BL+0.5*LFE|FR=0.5*FC+0.707*FR+0.707*BR+0.5*LFE.
2022-10-02 20:32:31 - MANUAL - DEBUG - Bitrate: 256.
2022-10-02 20:32:31 - MANUAL - DEBUG - VBR: 0.
2022-10-02 20:32:31 - MANUAL - DEBUG - Profile: None.
2022-10-02 20:32:31 - MANUAL - DEBUG - Language: eng.
2022-10-02 20:32:31 - MANUAL - DEBUG - Disposition: +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions.
2022-10-02 20:32:31 - MANUAL - DEBUG - Audio codec: ac3.
2022-10-02 20:32:31 - MANUAL - DEBUG - Channels: 6.
2022-10-02 20:32:31 - MANUAL - DEBUG - Bitrate: 768.
2022-10-02 20:32:31 - MANUAL - DEBUG - VBR: 0.
2022-10-02 20:32:31 - MANUAL - DEBUG - Audio Profile: None.
2022-10-02 20:32:31 - MANUAL - DEBUG - Language: eng.
2022-10-02 20:32:31 - MANUAL - DEBUG - Filter: None.
2022-10-02 20:32:31 - MANUAL - DEBUG - Disposition: +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions.
2022-10-02 20:32:31 - MANUAL - DEBUG - Debug: audio.
2022-10-02 20:32:31 - MANUAL - INFO - Creating ac3 audio stream from source stream 1.
2022-10-02 20:32:31 - MANUAL - INFO - Creating aac audio stream from source audio stream 1 [universal-audio].
2022-10-02 20:32:31 - MANUAL - DEBUG - Purging the following streams:
2022-10-02 20:32:31 - MANUAL - DEBUG - []
2022-10-02 20:32:31 - MANUAL - INFO - Found 0 streams that can be removed from the output file since they will be duplicates [stream-codec-combinations].
2022-10-02 20:32:31 - MANUAL - DEBUG - Triggering audio track sort [audio.sorting-sorting].
2022-10-02 20:32:31 - MANUAL - DEBUG - Sorting streams with keys ['language', 'channels.d', 'map', 'd.comment'].
2022-10-02 20:32:31 - MANUAL - DEBUG - Sorted ascending with language:
2022-10-02 20:32:31 - MANUAL - DEBUG - ['0->0', '1->1']
2022-10-02 20:32:31 - MANUAL - DEBUG - Sorted descending with channels:
2022-10-02 20:32:31 - MANUAL - DEBUG - ['0->0', '1->1']
2022-10-02 20:32:31 - MANUAL - DEBUG - Sorted ascending with map:
2022-10-02 20:32:31 - MANUAL - DEBUG - ['0->0', '1->1']
2022-10-02 20:32:31 - MANUAL - DEBUG - Sorted ascending with d.comment:
2022-10-02 20:32:31 - MANUAL - DEBUG - ['0->0', '1->1']
2022-10-02 20:32:31 - MANUAL - INFO - Final sorting:
2022-10-02 20:32:31 - MANUAL - INFO - ['0->0', '1->1']
2022-10-02 20:32:31 - MANUAL - DEBUG - Sorting streams with keys ['channels.d', 'map', 'd.comment'].
2022-10-02 20:32:31 - MANUAL - DEBUG - Sorted descending with channels:
2022-10-02 20:32:31 - MANUAL - DEBUG - ['0->0', '1->1']
2022-10-02 20:32:31 - MANUAL - DEBUG - Sorted ascending with map:
2022-10-02 20:32:31 - MANUAL - DEBUG - ['0->0', '1->1']
2022-10-02 20:32:31 - MANUAL - DEBUG - Sorted ascending with d.comment:
2022-10-02 20:32:31 - MANUAL - DEBUG - ['0->0', '1->1']
2022-10-02 20:32:31 - MANUAL - INFO - Final sorting:
2022-10-02 20:32:31 - MANUAL - INFO - ['0->0', '1->1']
2022-10-02 20:32:31 - MANUAL - DEBUG - Sorting audio streams for default audio stream designation.
2022-10-02 20:32:31 - MANUAL - DEBUG - 2 total audio streams with 2 set to default disposition. 2 defaults in your preferred language (eng), 0 in other languages.
2022-10-02 20:32:31 - MANUAL - DEBUG - 1 streams in preferred language cleared of default disposition flag from preferred language.
2022-10-02 20:32:31 - MANUAL - INFO - Default audio stream set to eng ac3 6 channel stream [audio-default-sorting: ['channels.d', 'map', 'd.comment']].
2022-10-02 20:32:31 - MANUAL - INFO - Reading subtitle streams.
2022-10-02 20:32:31 - MANUAL - INFO - Subtitle detected for stream 2 - subrip eng.
2022-10-02 20:32:31 - MANUAL - DEBUG - isImageBasedSubtitle FFmpeg command:
2022-10-02 20:32:31 - MANUAL - DEBUG - /usr/local/bin/ffmpeg -i "/data/Atlanta S04E04.mkv" -c:s:0 srt -map 0:2 -metadata:s:s:0 title= -metadata:s:s:0 handler_name= -metadata:s:s:0 language=und -disposition:s:0 -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -f srt -t 00:00:01 -f null -
2022-10-02 20:32:31 - MANUAL - INFO - Stream 2 is text-based subtitle for codec subrip.
2022-10-02 20:32:31 - MANUAL - INFO - Scanned for external subtitles and found 0 results in your approved languages.
2022-10-02 20:32:31 - MANUAL - DEBUG - Subtitle output is empty or no default subtitle language is set, will not pass over subtitle output to set a default stream.
2022-10-02 20:32:31 - MANUAL - DEBUG - Sorting streams with keys ['language', 'd.comment', 'd.default.d', 'd.forced.d'].
2022-10-02 20:32:31 - MANUAL - INFO - Final sorting:
2022-10-02 20:32:31 - MANUAL - INFO - []
2022-10-02 20:32:31 - MANUAL - DEBUG - Selected hwaccel options:
2022-10-02 20:32:31 - MANUAL - DEBUG - ['cuda']
2022-10-02 20:32:31 - MANUAL - DEBUG - Selected hwaccel decoder pairs:
2022-10-02 20:32:31 - MANUAL - DEBUG - ['h264_cuvid', 'hevc_cuvid', 'av1_cuvid', 'mjpeg_cuvid', 'mpeg1_cuvid', 'mpeg2_cuvid', 'mpeg4_cuvid', 'vc1_cuvid', 'vp8_cuvid', 'vp9_cuvid']
2022-10-02 20:32:31 - MANUAL - DEBUG - FFMPEG hwaccels:
2022-10-02 20:32:31 - MANUAL - DEBUG - ['cuda']
2022-10-02 20:32:31 - MANUAL - DEBUG - Input format yuv420p bit depth 8.
2022-10-02 20:32:31 - MANUAL - DEBUG - Setting hwaccel device to 0.
2022-10-02 20:32:31 - MANUAL - INFO - cuda hwaccel is supported by this ffmpeg build and will be used [hwaccels].
2022-10-02 20:32:31 - MANUAL - DEBUG - Decoder: h264_cuda.
2022-10-02 20:32:31 - MANUAL - DEBUG - canBypassConvert returned False.
2022-10-02 20:32:31 - MANUAL - INFO - Output Data
2022-10-02 20:32:31 - MANUAL - INFO - {
    "source": [
        "/data/Atlanta S04E04.mkv"
    ],
    "format": "mp4",
    "video": {
        "codec": "h264_nvenc",
        "map": 0,
        "bitrate": 2800,
        "crf": -1,
        "maxrate": null,
        "bufsize": null,
        "level": 0.0,
        "profile": null,
        "preset": null,
        "pix_fmt": null,
        "field_order": "progressive",
        "width": null,
        "filter": null,
        "params": null,
        "framedata": null,
        "bsf": null,
        "debug": "video.max-bitrate",
        "title": "HD"
    },
    "audio": [
        {
            "map": 1,
            "codec": "ac3",
            "channels": 6,
            "bitrate": 768,
            "profile": null,
            "quality": 0,
            "filter": null,
            "samplerate": null,
            "sampleformat": "",
            "language": "eng",
            "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "bsf": null,
            "debug": "audio",
            "title": "5.1 Channel"
        },
        {
            "map": 1,
            "codec": "aac",
            "channels": 2,
            "bitrate": 256,
            "quality": 0,
            "profile": null,
            "samplerate": null,
            "sampleformat": "",
            "filter": "pan=stereo|FL=0.5*FC+0.707*FL+0.707*BL+0.5*LFE|FR=0.5*FC+0.707*FR+0.707*BR+0.5*LFE",
            "language": "eng",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "debug": "universal-audio",
            "title": "Stereo"
        }
    ],
    "subtitle": [],
    "attachment": []
}
2022-10-02 20:32:31 - MANUAL - INFO - Preopts
2022-10-02 20:32:31 - MANUAL - INFO - [
    "-init_hw_device",
    "cuda=sma:0",
    "-hwaccel_device",
    "sma",
    "-hwaccel",
    "cuda",
    "-hwaccel_output_format",
    "cuda"
]
2022-10-02 20:32:31 - MANUAL - INFO - Postopts
2022-10-02 20:32:31 - MANUAL - INFO - [
    "-threads",
    "0",
    "-metadata:g",
    "encoding_tool=SMA"
]
2022-10-02 20:32:31 - MANUAL - INFO - Subtitle Extracts
2022-10-02 20:32:31 - MANUAL - INFO - []
2022-10-02 20:32:31 - MANUAL - INFO - Starting conversion.
2022-10-02 20:32:31 - MANUAL - DEBUG - Input directory: /data.
2022-10-02 20:32:31 - MANUAL - DEBUG - File name: Atlanta S04E04.
2022-10-02 20:32:31 - MANUAL - DEBUG - Input extension: mkv.
2022-10-02 20:32:31 - MANUAL - DEBUG - Output directory: /data.
2022-10-02 20:32:31 - MANUAL - DEBUG - Output extension: /data.
2022-10-02 20:32:31 - MANUAL - DEBUG - Output file: /data/Atlanta S04E04.mp4.
2022-10-02 20:32:31 - MANUAL - DEBUG - Input directory: /data.
2022-10-02 20:32:31 - MANUAL - DEBUG - File name: Atlanta S04E04.
2022-10-02 20:32:31 - MANUAL - DEBUG - Input extension: mkv.
2022-10-02 20:32:31 - MANUAL - DEBUG - Output directory: /data.
2022-10-02 20:32:31 - MANUAL - DEBUG - Output extension: /data.
2022-10-02 20:32:31 - MANUAL - DEBUG - Output file: /data/Atlanta S04E04.mp4.
2022-10-02 20:32:31 - MANUAL - DEBUG - Final output file: /data/Atlanta S04E04.mp4.
2022-10-02 20:32:31 - MANUAL - INFO - FFmpeg command:
2022-10-02 20:32:31 - MANUAL - INFO - ======================
2022-10-02 20:32:31 - MANUAL - INFO - /usr/local/bin/ffmpeg -init_hw_device cuda=sma:0 -hwaccel_device sma -hwaccel cuda -hwaccel_output_format cuda -i "/data/Atlanta S04E04.mkv" -vcodec h264_nvenc -map 0:0 -field_order progressive -vb 2800k -metadata:s:v BPS=2800000 -metadata:s:v BPS-eng=2800000 -metadata:s:v title=HD -metadata:s:v handler_name=HD -tag:v avc1 -c:a:0 ac3 -map 0:1 -ac:a:0 6 -b:a:0 768k -metadata:s:a:0 BPS=768000 -metadata:s:a:0 BPS-eng=768000 -metadata:s:a:0 "title=5.1 Channel" -metadata:s:a:0 "handler_name=5.1 Channel" -metadata:s:a:0 language=eng -disposition:a:0 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -c:a:1 aac -map 0:1 -ac:a:1 2 -b:a:1 256k -metadata:s:a:1 BPS=256000 -metadata:s:a:1 BPS-eng=256000 -filter:a:1 "pan=stereo|FL=0.5*FC+0.707*FL+0.707*BL+0.5*LFE|FR=0.5*FC+0.707*FR+0.707*BR+0.5*LFE" -metadata:s:a:1 title=Stereo -metadata:s:a:1 handler_name=Stereo -metadata:s:a:1 language=eng -disposition:a:1 -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -strict experimental -f mp4 -threads 0 -metadata:g encoding_tool=SMA -y "/data/Atlanta S04E04.mp4"
2022-10-02 20:32:31 - MANUAL - INFO - ======================
2022-10-02 20:32:31 - MANUAL - ERROR - Error converting file, FFMPEG error.
Traceback (most recent call last):
  File "/opt/sma/resources/mediaprocessor.py", line 2276, in convert
    for timecode, debug in conv:
  File "/opt/sma/converter/__init__.py", line 329, in convert
    for timecode, debug in self.ffmpeg.convert(outfile,
  File "/opt/sma/converter/ffmpeg.py", line 760, in convert
    raise FFMpegConvertError('Exited with code %d' % p.returncode, cmd,
converter.ffmpeg.FFMpegConvertError: <unprintable FFMpegConvertError object>
2022-10-02 20:32:31 - MANUAL - ERROR - /usr/local/bin/ffmpeg -init_hw_device cuda=sma:0 -hwaccel_device sma -hwaccel cuda -hwaccel_output_format cuda -i /data/Atlanta S04E04.mkv -vcodec h264_nvenc -map 0:0 -field_order progressive -vb 2800k -metadata:s:v BPS=2800000 -metadata:s:v BPS-eng=2800000 -metadata:s:v title=HD -metadata:s:v handler_name=HD -tag:v avc1 -c:a:0 ac3 -map 0:1 -ac:a:0 6 -b:a:0 768k -metadata:s:a:0 BPS=768000 -metadata:s:a:0 BPS-eng=768000 -metadata:s:a:0 title=5.1 Channel -metadata:s:a:0 handler_name=5.1 Channel -metadata:s:a:0 language=eng -disposition:a:0 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -c:a:1 aac -map 0:1 -ac:a:1 2 -b:a:1 256k -metadata:s:a:1 BPS=256000 -metadata:s:a:1 BPS-eng=256000 -filter:a:1 pan=stereo|FL=0.5*FC+0.707*FL+0.707*BL+0.5*LFE|FR=0.5*FC+0.707*FR+0.707*BR+0.5*LFE -metadata:s:a:1 title=Stereo -metadata:s:a:1 handler_name=Stereo -metadata:s:a:1 language=eng -disposition:a:1 -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -strict experimental -f mp4 -threads 0 -metadata:g encoding_tool=SMA -y /data/Atlanta S04E04.mp4
2022-10-02 20:32:31 - MANUAL - ERROR - ffmpeg version n5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-cuda --enable-cuvid --enable-fontconfig --enable-gpl --enable-libaom --enable-libaribb24 --enable-libass --enable-libbluray --enable-libfdk_aac --enable-libfreetype --enable-libkvazaar --enable-libmp3lame --enable-libnpp --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libsrt --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxvid --enable-libzmq --enable-nonfree --enable-nvenc --enable-openssl --enable-parser=acc --enable-parser=h264 --enable-postproc --enable-shared --enable-small --enable-version3 --extra-cflags='-I/install/include -I/install/include/ffnvcodec -I/usr/local/cuda/include/' --extra-ldflags='-L/install/lib -L/usr/local/cuda/lib64 -L/usr/local/cuda/lib32/' --extra-libs=-ldl --extra-libs=-lpthread --prefix=/install
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
Input #0, matroska,webm, from '/data/Atlanta S04E04.mkv':
  Metadata:
    COMPATIBLE_BRANDS: dashiso6
    MAJOR_BRAND     : dash
    MINOR_VERSION   : 0
    ENCODER         : Lavf59.16.100
  Duration: 00:26:26.20, start: 0.024000, bitrate: 6293 kb/s
  Stream #0:0: Video: h264, yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn (default)
    Metadata:
      HANDLER_NAME    : USP Video Handler
      VENDOR_ID       : [0][0][0][0]
      ENCODER         : AVC Coding
      BPS             : 5655204
      DURATION        : 00:26:25.209000000
      NUMBER_OF_FRAMES: 38004
      NUMBER_OF_BYTES : 1120585182
      _STATISTICS_WRITING_APP: mkvmerge v67.0.0 ('Under Stars') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:1(eng): Audio: eac3, 48000 Hz, 5.1(side), fltp, 640 kb/s (default)
    Metadata:
      HANDLER_NAME    : USP Sound Handler
      VENDOR_ID       : [0][0][0][0]
      BPS             : 640000
      DURATION        : 00:26:25.984000000
      NUMBER_OF_FRAMES: 49562
      NUMBER_OF_BYTES : 126878720
      _STATISTICS_WRITING_APP: mkvmerge v67.0.0 ('Under Stars') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:2(eng): Subtitle: subrip
    Metadata:
      title           : English
      BPS             : 79
      DURATION        : 00:26:17.576000000
      NUMBER_OF_FRAMES: 535
      NUMBER_OF_BYTES : 15760
      _STATISTICS_WRITING_APP: mkvmerge v67.0.0 ('Under Stars') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_nvenc))
  Stream #0:1 -> #0:1 (eac3 (native) -> ac3 (native))
  Stream #0:1 -> #0:2 (eac3 (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, mp4, to '/data/Atlanta S04E04.mp4':
  Metadata:
    COMPATIBLE_BRANDS: dashiso6
    MAJOR_BRAND     : dash
    MINOR_VERSION   : 0
    encoding_tool   : SMA
    encoder         : Lavf59.27.100
  Stream #0:0: Video: h264 (avc1 / 0x31637661), cuda(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 2800 kb/s, 23.98 fps, 24k tbn (default)
    Metadata:
      title           : HD
      VENDOR_ID       : [0][0][0][0]
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_WRITING_APP: mkvmerge v67.0.0 ('Under Stars') 64-bit
      DURATION        : 00:26:25.209000000
      NUMBER_OF_FRAMES: 38004
      NUMBER_OF_BYTES : 1120585182
      BPS             : 2800000
      BPS-eng         : 2800000
      handler_name    : HD
      encoder         : Lavc59.37.100 h264_nvenc
    Side data:
      cpb: bitrate max/min/avg: 0/0/2800000 buffer size: 5600000 vbv_delay: N/A
  Stream #0:1(eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 640 kb/s (default)
    Metadata:
      handler_name    : 5.1 Channel
      title           : 5.1 Channel
      VENDOR_ID       : [0][0][0][0]
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      DURATION        : 00:26:25.984000000
      NUMBER_OF_FRAMES: 49562
      NUMBER_OF_BYTES : 126878720
      _STATISTICS_WRITING_APP: mkvmerge v67.0.0 ('Under Stars') 64-bit
      BPS             : 768000
      BPS-eng         : 768000
      encoder         : Lavc59.37.100 ac3
  Stream #0:2(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s
    Metadata:
      handler_name    : Stereo
      title           : Stereo
      VENDOR_ID       : [0][0][0][0]
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      DURATION        : 00:26:25.984000000
      NUMBER_OF_FRAMES: 49562
      NUMBER_OF_BYTES : 126878720
      _STATISTICS_WRITING_APP: mkvmerge v67.0.0 ('Under Stars') 64-bit
      BPS             : 256000
      BPS-eng         : 256000
      encoder         : Lavc59.37.100 aac
[h264 @ 0x5582e9b86840] No decoder surfaces left00:00:01.75 bitrate=   0.2kbits/s dup=24 drop=0 speed=24.8x    
[h264 @ 0x5582e9c55b00] No decoder surfaces left
[h264 @ 0x5582e91771c0] No decoder surfaces left
[h264 @ 0x5582e9173000] No decoder surfaces left
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x5582e9ab7580] No decoder surfaces left
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x5582e9b86840] No decoder surfaces left
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x5582e9c55b00] No decoder surfaces left
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x5582e91771c0] No decoder surfaces left
Impossible to convert between the formats supported by the filter 'Parsed_null_0' and the filter 'auto_scale_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0
[aac @ 0x5582e90fa7c0] Qavg: 4291.062
[aac @ 0x5582e90fa7c0] 2 frames left in the queue on closing
Conversion failed!

2022-10-02 20:32:31 - MANUAL - ERROR - /data/Atlanta S04E04.mp4 deleted.
2022-10-02 20:32:31 - MANUAL - DEBUG - Error converting, no outputfile generated for inputfile /data/Atlanta S04E04.mkv.
2022-10-02 20:32:31 - MANUAL - ERROR - There was an error processing file /data/Atlanta S04E04.mkv, no output data received

FFMpeg headers

ffmpeg version n5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-cuda --enable-cuvid --enable-fontconfig --enable-gpl --enable-libaom --enable-libaribb24 --enable-libass --enable-libbluray --enable-libfdk_aac --enable-libfreetype --enable-libkvazaar --enable-libmp3lame --enable-libnpp --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libsrt --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxvid --enable-libzmq --enable-nonfree --enable-nvenc --enable-openssl --enable-parser=acc --enable-parser=h264 --enable-postproc --enable-shared --enable-small --enable-version3 --extra-cflags='-I/install/include -I/install/include/ffnvcodec -I/usr/local/cuda/include/' --extra-ldflags='-L/install/lib -L/usr/local/cuda/lib64 -L/usr/local/cuda/lib32/' --extra-libs=-ldl --extra-libs=-lpthread --prefix=/install
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
Hyper fast Audio and Video encoder

System Information

  • OS: Ubuntu 20.04
  • Python version: 3.8.10

Expected behavior The conversion should complete without failing

Additional context This issue does not happen when using the default autoProcess.ini. Its when I try and get it to use hardware acceleration when it seems to fail

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:19 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
mdhigginscommented, Oct 23, 2022

I would just stick with nv12 if you’re looking to have the safest hardware accelerated stream

0reactions
VampiricAliencommented, Oct 23, 2022

For now I’m grateful it’s working and saving me a lot of space!!

Thanks, you’re a real hero!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error while processing the decoded data for stream using ffmpeg
Error while processing the decoded data for stream #1:1. But, I have a new error. About an hour into running it, I receive...
Read more >
FFMpeg Error While Decoding Stream Cannot Allocate Memory
It appears that when you attempt to create the picture in a picture overlay, that the conversion is having a problem decoding the...
Read more >
Ffmpeg error in latest v3.0.0 - Video Enhance AI Discussion
Failed to inject frame into filter network: Invalid argument Error while processing the decoded data for stream #0:0.
Read more >
9184 (pngdec output frame that has double image) - FFmpeg
Failed to inject frame into filter network: Invalid argument Error while processing the decoded data for stream #0:0 Conversion failed!
Read more >
"Error reinitializing filters" error when transcoding on Fire Stick
20:45:42.640 Error while processing the decoded data for stream #0:4 20:45:42.650 Conversion failed! When transcoding on other devices (iOS, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found