У меня есть скрипт фоллинга с al oop:
#!/bin/bash
set -x
find . -type f -name '*265*.mkv' -print0 | while IFS= read -r -d '' file; do
orig_file=${file}
new_file=${file#"./"}
new_file="${new_file/x265/264}"
echo ${new_file}
ffmpeg -hide_banner -loglevel warning -y -hwaccel nvdec \
-i "${orig_file}" -c:v h264_nvenc -pix_fmt yuv420p -c:a copy "${new_file}"
done
Я вижу, что команды верны
ffmpeg -hide_banner -loglevel warning -y -hwaccel nvdec -i './Something (2018) - S01E01 - (1080p WEB-DL x265 ImE).mkv' -c:v h264_nvenc -pix_fmt yuv420p -c:a copy 'Something (2018) - S01E01 - (1080p WEB-DL 264 ImE).mkv'
, но они выдают этот гигантский c отладочный вывод с debug=1
debug=1
cur_dts is invalid st:2 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[hevc @ 0x55f5dc354b40] nal_unit_type: 0(TRAIL_N), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x55f5dc354b40] Output frame with POC 28.
Clipping frame in rate conversion by 0.003990
cur_dts is invalid st:2 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
Last message repeated 8 times
[hevc @ 0x55f5dc365480] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x55f5dc365480] Output frame with POC 29.
cur_dts is invalid st:2 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[hevc @ 0x55f5dc375dc0] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x55f5dc375dc0] Output frame with POC 30.
cur_dts is invalid st:2 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[hevc @ 0x55f5dc386700] nal_unit_type: 0(TRAIL_N), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x55f5dc386700] Output frame with POC 31.
...
и затем он останавливается на:
stream #0:
keyframe=0
duration=0.041
dts=73.156 pts=73.407
size=47859
stream #0:
keyframe=0
duration=0.041
dts=73.198 pts=73.323
size=14585
Enter command: <target>|all <time>|-1 <command>[ <argument>]
Но когда я запускаю это с терминала или без al oop, все работает хорошо.
Что здесь не так?