From bf200cdf6be469da2f980a9235a8e6fb9549b941 Mon Sep 17 00:00:00 2001 From: Alexei Bezborodov Date: Mon, 8 Jan 2024 11:48:55 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=D1=81=D0=B5=20=D1=84=D0=B0=D0=B9=D0=BB?= =?UTF-8?q?=D1=8B=20=D0=B2=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD=D1=8B=D0=B5?= =?UTF-8?q?,=20=D0=BA=D1=80=D0=BE=D0=BC=D0=B5=20=D1=84=D0=B8=D0=BD=D0=B0?= =?UTF-8?q?=D0=BB=D1=8C=D0=BD=D1=8B=D1=85=20=D0=B8=20=D0=BF=D0=BE=D1=81?= =?UTF-8?q?=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=87=D0=BD=D1=8B=D1=85=20=D0=9F?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D0=BC=D0=B5=D1=82=D1=80=20=D1=81=D0=BE=D1=85?= =?UTF-8?q?=D1=80=D0=B0=D0=BD=D0=B8=D1=82=D1=8C=20=D0=B2=D1=80=D0=B5=D0=BC?= =?UTF-8?q?=D0=B5=D0=BD=D0=BD=D1=8B=D0=B5=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B?= =?UTF-8?q?=20=D0=9B=D0=BE=D0=B3=D0=BE=D1=82=D0=B8=D0=BF=20=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=B1=D0=B5=D0=BB=D0=BE=D0=BC=20=D1=84=D0=BE=D0=BD=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- Logo.png => img/Logo.png | Bin Logo.svg => img/Logo.svg | 0 img/Logo_White.png | Bin 0 -> 24575 bytes pdf2video | 118 ++++++++++++++++++++++++++++------------------- txt2mp3 | 6 ++- 6 files changed, 75 insertions(+), 51 deletions(-) rename Logo.png => img/Logo.png (100%) rename Logo.svg => img/Logo.svg (100%) create mode 100644 img/Logo_White.png diff --git a/README.md b/README.md index a90c63a..7f36844 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Программа для преобразования электронных книг в видео - + Для помощи используйте ключ '-h' \ No newline at end of file diff --git a/Logo.png b/img/Logo.png similarity index 100% rename from Logo.png rename to img/Logo.png diff --git a/Logo.svg b/img/Logo.svg similarity index 100% rename from Logo.svg rename to img/Logo.svg diff --git a/img/Logo_White.png b/img/Logo_White.png new file mode 100644 index 0000000000000000000000000000000000000000..40a58626af656b26e5564de00f88085bdb535918 GIT binary patch literal 24575 zcmeFZWms0*+BSR>qM(F=fI$dI3fy!^r*wD6jdXVl1_-D~BaPA_Ez&BAgaQ%*0t(XI zg2a1G*WSsT)Cd(Jt=m}6XVp67MBBGpyp2?;I}pin46gM#Z-5`3};k`8X>;-w0NkSwp-4qd4{K(1Hvk>|G~p2(@3%JL%^%go>vqjuk3MQ_UJZHE zDxOPYH?n(q`FQ{6#Oj(q+eX^=BO(s{;QQ;T61^?9QgakOA-WvZ+2fO<;?lO|DI`zI zr?!tDEOqy3PbX0vJx$n~4DK2VyxxA8Q95sybayf=ZPKhIaPrl*m#*`?xTw(39{2vt z5uZtr&9>3@&RUwzXA_>{c`nk$L&Jfw3u`XM0={>tO$fERYS%frWa>k%gs|y|vfRVu zQyr$438}q)6y;pM`e-9&n+{yP8!5hH`u9GF%zh>uptOv||0$v?j9RU) zdARLW^r(7d>iTWE8!u9Y3pwvEwamJ>2+FIws#c`!zklfGS8mQjh*1@C-!wCPPuiX{pQVdweRMk__SfX&VXIy!!B1t`mrSPYwB75ofW&4uCSws8M(%o63P+qOB z(&|yerS#k0a;x9Q>$CQL$Wyv8@N6>YKH@)k9%z$hH)~*%?zB6jr@#K8v$*8-=;D}@ zqTPpd?+MKCxVL!xDE{obI90KkfiJ2dpGVnBLk^FkO6v874twG`Zmbzhk84iccg=}= zo)(LC$)TT?Wy#8FaSOchOmU*tX86ny=U$t}Er&PlEk?DMcyl^4n$<(R^BK!V zQse#!uZLXW@2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Tcd1$7Lz;hV0-DzdVV;-K_yWUHlFhW{>kl*wAd2!VnK`i=`IgPiDIGC=xJss zmnaT2)y0lRhg?*<`1)50rC);y9g~Alx?=Fs)+Q8-W-9hE#mC8Bd2B&bGjV^|dOnV| zUahKtNMQif$=g_13~)b~W|P9z<@xF$DDNJ6V8q3{va&Q;s!}!uGeZ$wDcLf5bVzPy zrs$j)hhtycD+>lbSbErTYnD>-=$@vdH`M5sMe*?5liMQpn}@Q4((Ur>VSaJl~6J|DVa*1?4Oe&V{Bd~LH1d@R+y3RT z4erN$j1m4c4j@~I5}c|8r||W=L}4&G!#vvdZ9NjQ6SYZP94^!!-Hc|NMA-ZpLO_}K zuNGDZCGEDDw_KRKdw#9O0))TT9HTO}i$6#%{v8o0Dk?S<)4HSDRm8zFWLRA~fE9P3 zufN~#X~n;rKqcwrX4x=oJ7Z};$U|8js6Z{RU+JxI=FoLd4@FL1aavnL53G$%p}D5YR*tolnZ|M zSyWWmsg3NRemeut`1<*o*dW4M{?1jB-z-tRbqFu5%4)TO!dzh~GMhV8|2T6+wVcTK4{Vi4ydGQ{I1AnXb2&U)A2}{q)4TZC6-sC2H@R`qtNtC4T`N CLkl$k literal 0 HcmV?d00001 diff --git a/pdf2video b/pdf2video index eed54ea..591bad9 100755 --- a/pdf2video +++ b/pdf2video @@ -13,7 +13,7 @@ common_params=( "h|help|Посмотреть помощь.|||ShowHelp; exit;" "v|version|Посмотреть версию программы.|||echo \$version; exit;" "V|verbose|Подробный вывод.|||verbose=true" -# "|||||" + "k|keep_files|Не удалять временные файлы. Может принимать значения 'yes', 'no'. По умолчанию '!DEFAULT!'.|:|'no'|" ) sound_params=( @@ -30,13 +30,15 @@ sound_params=( video_params=( "o|output|Выходной видео файл.|:|''|" - "k|split|Деление страницы пополам. Может быть либо 'yes', либо 'no'. По умолчанию '!DEFAULT!'.|:|'yes'|" + #"t|split|Деление страницы. Может быть либо 'half' (деление пополам), либо 'time' (плавное перемещение), либо 'no' (целиком). По умолчанию '!DEFAULT!'.|:|'half'|" + "t|split|Деление страницы. Может быть либо 'half' (деление пополам), либо 'no' (целиком). По умолчанию '!DEFAULT!'.|:|'half'|" "W|video_width|Размер видео в пикселях по ширине. По умолчанию '!DEFAULT!'.|:|1920|" "H|video_height|Размер видео в пикселях по высоте. По умолчанию '!DEFAULT!'.|:|1080|" "p|ffmpeg_pre_options|Опции ffmpeg в самом начале. По умолчанию '!DEFAULT!'.|:|'-loop 1 -r 2'|" "P|ffmpeg_options|Опции ffmpeg. По умолчанию '!DEFAULT!'.|:|'-c:v libx264 -tune stillimage -preset ultrafast -crf 20 -shortest -pix_fmt yuv420p'|" "r|page_range|Указывает страницы из выходного файла для обработки. Пример '{1..32}', '{2..10..2}', '\$(seq 5 3 30)'|:|''|" "m|minimum_text_on_page|Минимальное количество символов на странице при котором происходит разделение страницы на две. По умолчанию '!DEFAULT!'.|:|1000|" + "M|minimum_time_on_page|Минимальное количество секунд на страницу. По умолчанию '!DEFAULT!'.|:|5|" # "|||:||" ) @@ -103,30 +105,36 @@ function Text2mp3 { local text_file=$1 local mp3_file=$2 verb="" - [ $verbose ] && verb="-V" + [ $verbose ] && verb="-V " - [ $verbose ] && echo "Найден исполняемый файл для преобразования в звук текста $(GetExec txt2mp3)" - eval "$(GetExec "txt2mp3") -i '${text_file}' -o '${mp3_file}' -e '${emotion}' -s '${speaker}' -S '${speed}' -f '${format}' -q '${quality}' -l '${lang}' '${verb}'" + cmd="$(GetExec "txt2mp3") -i '${text_file}' -o '${mp3_file}' -e '${emotion}' -s '${speaker}' -S '${speed}' -f '${format}' -q '${quality}' -l '${lang}' ${verb}" + [ $verbose ] && echo "Команда для преобразования в звук текста '$cmd'" + eval "$cmd" } function MakeVideo { local page_image_file=$1 local page_mp3_file=$2 local page_mp4_file=$3 + local split=$4 - local resized_page_image_file="${page_image_file}_resized.png" + local resized_page_image_file=$(mktemp -t "MakeVideo_resized_page_image_XXXXXXXXXXX.png" +) ffmpeg -y -i "${page_image_file}" -vf "scale=${video_width}:${video_height}:force_original_aspect_ratio=decrease,pad=${video_width}:${video_height}:(ow-iw)/2:(oh-ih)/2" "${resized_page_image_file}" + video_filter="" + [ $verbose ] && echo "ffmpeg $?" local time_play=$(mp3info -p "%S\n" "${page_mp3_file}") local time_opt="-c:a copy" - if [ ${minimum_time_on_page} -ge ${time_play} ]; then - local add_time=5 # $(( 5 - ${time_play} )) + if [ ${minimum_time_on_page} -ge $(( ${time_play} )) ]; then + local add_time="$minimum_time_on_page" # $(( 5 - ${time_play} )) time_opt="-c:a mp3 -af adelay=${add_time}s:all=true" # [ $verbose ] && echo "time_opt ${time_opt}" fi - ffmpeg ${ffmpeg_pre_options} -i "${resized_page_image_file}" -i "${page_mp3_file}" ${ffmpeg_options} ${time_opt} "${page_mp4_file}" + ffmpeg -y ${ffmpeg_pre_options} -i "${resized_page_image_file}" -i "${page_mp3_file}" ${ffmpeg_options} ${time_opt} ${video_filter} "${page_mp4_file}" + [ $verbose ] && echo "ffmpeg $?" SAVE_IFS=$IFS IFS="" @@ -136,6 +144,28 @@ function MakeVideo { rm "${resized_page_image_file}" } +function SplitText { + local out_array_name=$1[@] + local source_text=$2 + local split_size=$3 + out_array=("${!out_array_name}") + + local space_char=" " + local cur_text="" + for ((i=1;i<=${#source_text};i++)); do + local cur_char=${source_text:$i-1:1} + cur_text="${cur_text}${cur_char}" + if [ "$cur_char" = "$space_char" ] && [ ${#cur_text} -ge $split_size ] || [ $i = ${#source_text} ]; then + SAVE_IFS=$IFS + IFS="" + split_source_text_array+=(${cur_text}) + IFS=$SAVE_IFS + + cur_text="" + fi + done +} + [ $verbose ] && echo "Всего страниц $page_count" for ((page=1;page<=${page_count};page++)); do @@ -159,76 +189,65 @@ for ((page=1;page<=${page_count};page++)); do [ $verbose ] && echo "------------------------------------------------" [ $verbose ] && echo "Обрабатываем страницу №$page" - page_text_file="${input_file}_${page}.txt" - page_image_file="${input_file}_${page}" + page_text_file=$(mktemp -t "pdf2video_page_text_file_${page}_XXXXXXXXXXX.mp3" +) + page_image_file=$(mktemp -t "pdf2video_page_image_file_${page}_XXXXXXXXXXX.png" +) pdftotext -f $page -l $page "${input_file}" "$page_text_file" - pdftoppm -r 300 -f $page -l $page -png -singlefile "${input_file}" "$page_image_file" - - page_image_file="${page_image_file}.png" + convert -density 300 "${input_file}[$(( $page - 1))]" -quality 90 "$page_image_file" source_text="$(cat "${page_text_file}")" - if [ "$split" = "yes" ] && [ ${#source_text} -ge $minimum_text_on_page ]; then + if [ "$split" = "half" ] && [ ${#source_text} -ge $minimum_text_on_page ]; then - space_char=" " split_size=$(( ${#source_text} / 2 + 2)) # Половина с небольшим запасом - file_index=0 - for ((i=1;i<=${#source_text};i++)); do - cur_char=${source_text:$i-1:1} - cur_text="${cur_text}${cur_char}" - if [ "$cur_char" = "$space_char" ] && [ ${#cur_text} -ge $split_size ] || [ $i = ${#source_text} ]; then - let file_index+=1 + split_source_text_array=() - echo "$cur_text" > "${page_text_file}_half${file_index}" - - cur_text="" - fi - done + SplitText split_source_text_array "$source_text" $split_size - file_txt_half1="${page_text_file}_half1" - file_txt_half2="${page_text_file}_half2" - - page_mp3_file_half1="${file_txt_half1}.mp3" - page_mp3_file_half2="${file_txt_half2}.mp3" + page_mp3_file_half1=$(mktemp -t "pdf2video_page_mp3_file_half1_XXXXXXXXXXX.mp3" +) + page_mp3_file_half2=$(mktemp -t "pdf2video_page_mp3_file_half2_XXXXXXXXXXX.mp3" +) - Text2mp3 "$file_txt_half1" "$page_mp3_file_half1" - Text2mp3 "$file_txt_half2" "$page_mp3_file_half2" + Text2mp3 <( echo "${split_source_text_array[0]}" ) "$page_mp3_file_half1" + Text2mp3 <( echo "${split_source_text_array[1]}" ) "$page_mp3_file_half2" width=$(identify -format "%w" "$page_image_file")> /dev/null height=$(identify -format "%h" "$page_image_file")> /dev/null height_half=$(( $height / 2 + $height / 20 )) - page_image_file_half1="${page_image_file}_half1.png" - page_image_file_half2="${page_image_file}_half2.png" + page_image_file_half1=$(mktemp -t "pdf2video_page_image_file_half1_XXXXXXXXXXX.png" +) + page_image_file_half2=$(mktemp -t "pdf2video_page_image_file_half2_XXXXXXXXXXX.png" +) - # format (widthxheight+left+top / wxh+l+t) - convert "$page_image_file" -crop ${width}x${height_half}+0+0 "$page_image_file_half1" - convert "$page_image_file" -crop ${width}x${height_half}+0+$(( $height - $height_half )) "$page_image_file_half2" + # convert format (widthxheight+left+top / wxh+l+t) + convert "$page_image_file" -crop ${width}x${height_half}+0+0 "${page_image_file_half1}" + convert "$page_image_file" -crop "${width}x${height_half}+0+$(( $height - $height_half ))" "${page_image_file_half2}" page_mp4_file_half1="${input_file}_${page}_half1.mp4" page_mp4_file_half2="${input_file}_${page}_half2.mp4" - MakeVideo "$page_image_file_half1" "$page_mp3_file_half1" "$page_mp4_file_half1" + MakeVideo "${page_image_file_half1}" "$page_mp3_file_half1" "$page_mp4_file_half1" "$split" - MakeVideo "$page_image_file_half2" "$page_mp3_file_half2" "$page_mp4_file_half2" + MakeVideo "${page_image_file_half2}" "$page_mp3_file_half2" "$page_mp4_file_half2" "$split" rm "$page_image_file_half1" rm "$page_image_file_half2" - rm "$file_txt_half1" - rm "$file_txt_half2" rm "$page_mp3_file_half1" rm "$page_mp3_file_half2" else - page_mp3_file="${page_text_file}.mp3" + page_mp3_file=$(mktemp -t "pdf2video_page_mp3_file_XXXXXXXXXXX.mp3") Text2mp3 "$page_text_file" "$page_mp3_file" page_mp4_file="${input_file}_${page}.mp4" - MakeVideo "$page_image_file" "$page_mp3_file" "$page_mp4_file" + MakeVideo "$page_image_file" "$page_mp3_file" "$page_mp4_file" "$split" rm "$page_mp3_file" @@ -242,12 +261,15 @@ done SAVE_IFS=$IFS IFS="" [ $verbose ] && echo "Объединяем файлы ${video_file_names_array[*]} в $out_file" -ffmpeg -f concat -safe 0 -i <(for ((i = 0; i < ${#video_file_names_array[@]}; i++)) do echo "file '$PWD/${video_file_names_array[$i]}'"; done) -acodec copy -vcodec copy "$out_file" +ffmpeg -y -f concat -safe 0 -i <(for ((i = 0; i < ${#video_file_names_array[@]}; i++)) do echo "file '$PWD/${video_file_names_array[$i]}'"; done) -acodec copy -vcodec copy "$out_file" +[ $verbose ] && echo "ffmpeg $?" for ((i = 0; i < ${#video_file_names_array[@]}; i++)) do f="${video_file_names_array[$i]}" - [ $verbose ] && echo "Удаляем файл '$f'" - rm "$f" + [ "$keep_files" = "no" ] && { + rm "$f" + [ $verbose ] && echo "Удаляем файл '$f'" + } done IFS=$SAVE_IFS diff --git a/txt2mp3 b/txt2mp3 index 3ec6ef9..3c07249 100755 --- a/txt2mp3 +++ b/txt2mp3 @@ -132,7 +132,8 @@ for ((i = 0; i < ${#txt_array[@]}; i++)) do #[ $verbose ] && echo $cur_text >> "out.txt" - audio_file_name="${input_file}_${file_index}.mp3" + audio_file_name=$(mktemp -t "txt2mp3_audio_file_name_${file_index}_XXXXXXXXXXX.mp3" +) [ $verbose ] && echo -en "\nЗагрузка аудио в файл '$audio_file_name'...\n" @@ -149,7 +150,8 @@ done [ $verbose ] && echo "Объединяем файлы ${audio_file_names_array[*]} в $out_file" -ffmpeg -f concat -safe 0 -i <(for ((i = 0; i < ${#audio_file_names_array[@]}; i++)) do echo "file '$PWD/${audio_file_names_array[$i]}'"; done) -acodec copy -vcodec copy ${ffmpeg_opt} "$out_file" +ffmpeg -y -f concat -safe 0 -i <(for ((i = 0; i < ${#audio_file_names_array[@]}; i++)) do echo "file '${audio_file_names_array[$i]}'"; done) -acodec copy -vcodec copy ${ffmpeg_opt} "$out_file" +[ $verbose ] && echo "ffmpeg $?" for ((i = 0; i < ${#audio_file_names_array[@]}; i++)) do f="${audio_file_names_array[$i]}"