alexheretic / ab-av1

AV1 re-encoding using ffmpeg, svt-av1 & vmaf.
MIT License
442 stars 29 forks source link

Conversion failed! #154

Closed N72826 closed 3 weeks ago

N72826 commented 1 year ago

I'm receiving this error and I wanted some advice even though it is probably an error on behalf of ffmpeg. I have the latest version of ffmpeg and the latest driver for the intel arc a380.

Encoding normalized\2019-08-03-21-21-46-17.av1_qsv.mkv
  Searching 00:04:40 ################################################################################ (crf 29, VMAF 95.54, size 34%)
Error: ffmpeg encode exit code 1
---stderr---
[av1_qsv @ 0000019dad20d240] Error allocating the output packetrate=20568.1kbits/s speed=4.68x
[vost#0:0/av1_qsv @ 0000019dad6fbb00] Error submitting video frame to the encoder
Conversion failed!

I have a batch script that is running ab-av1 auto-encode on every video file in a folder. The videos I plan on re-encoding are organized by date and stored on another system. This means that many of the videos I move to the script folder in order to be re-encoded have similarities. For example, every file the script is currently running on was recorded using the same application and the same CRF value. This is the reason I am so confused. How can auto-encode run successfully on many of the files but fail on others if the recording methodology was identical? I think it's safe to say this is more of an ffmpeg problem given that the error clearly states that ffmpeg exited—which means that the VMAF calculation was successful and the encode parameters were passed by ab-av1—but I still wanted to know if this is something anyone has run into.

N72826 commented 1 year ago

here's another example. No idea why I am now receiving Error copy_in_pipe_to_out: The pipe is being closed. (os error 232)

Encoding "normalized\2019-08-05 01-06-50-15.av1_qsv.mkv"
⠐ Searching 00:00:05 ####--------------------------------------------------------------------------------- (sampling crf 32, eta 2m)
Error copy_in_pipe_to_out: The pipe is being closed. (os error 232)
⠁ Searching 00:00:15 ##################------------------------------------------------------------------ (sampling crf 21, eta 78s)
Error copy_in_pipe_to_out: The pipe is being closed. (os error 232)
  Searching 00:07:20 ################################################################################ (crf 24, VMAF 95.42, size 68%)
Error: ffmpeg encode exit code 1
---stderr---
[av1_qsv @ 0000011e477775c0] Error allocating the output packetrate=19857.8kbits/s speed=4.72x
[vost#0:0/av1_qsv @ 0000011e47ba5540] Error submitting video frame to the encoder
Conversion failed!
------------
alexheretic commented 1 year ago

Error copy_in_pipe_to_out: can only happen on Windows during the vmaf run. It looks like this error is not causing the run to fail as Error: ffmpeg encode exit code 1 comes from the later attempt to encode.

I wonder if both errors have the same cause though, could the input be corrupt?

Perhaps you can reproduce the issue using ffmpeg encode directly, if so you could report that upstream. If so maybe also try another encoder like x264 in case it also encounters errors (suggesting issues with the input data).

mr44er commented 1 year ago

Maybe your shell hickups on the - in the filename. Try ab-av1 auto-encode -i "2019-08-03-21-21-46-17.mkv" or rename it just to be sure to test.mkv -> ab-av1 auto-encode -i test.mkv

If it's still not working, please show the output of ffmpeg -i "2019-08-03-21-21-46-17.mkv" and mediainfo "2019-08-03-21-21-46-17.mkv"

alexheretic commented 3 weeks ago

I think enough time has passed and the tool error output should be much improved now to include ffmpeg output. I'll close this for now, feel free to reopen with more info.