log any ffmpeg/mkvmerge errors
This commit is contained in:
@@ -38,10 +38,21 @@ class PixivUgoiraConverter
|
|||||||
end
|
end
|
||||||
|
|
||||||
ext = folder.first.name.match(/\.(\w{,4})$/)[1]
|
ext = folder.first.name.match(/\.(\w{,4})$/)[1]
|
||||||
# system("ffmpeg -loglevel quiet -i #{tmpdir}/images/%06d.#{ext} -codec:v libvpx -crf 4 -b:v 5000k -an #{tmpdir}/tmp.webm")
|
ffmpeg_out, status_ = Open3.capture2e("ffmpeg -i #{tmpdir}/images/%06d.#{ext} -codec:v libvpx -crf 4 -b:v 5000k -an #{tmpdir}/tmp.webm")
|
||||||
# system("mkvmerge -q -o #{write_path} --webm --timecodes 0:#{tmpdir}/timecodes.tc #{tmpdir}/tmp.webm")
|
mkvmerge_out, status = Open3.capture2e("mkvmerge -o #{write_path} --webm --timecodes 0:#{tmpdir}/timecodes.tc #{tmpdir}/tmp.webm")
|
||||||
system("ffmpeg -i #{tmpdir}/images/%06d.#{ext} -codec:v libvpx -crf 4 -b:v 5000k -an #{tmpdir}/tmp.webm")
|
|
||||||
system("mkvmerge -o #{write_path} --webm --timecodes 0:#{tmpdir}/timecodes.tc #{tmpdir}/tmp.webm")
|
if !status.success?
|
||||||
|
Rails.logger.error "[write_webm] ******************************"
|
||||||
|
Rails.logger.error "[write_webm] failed write_path=#{write_path}"
|
||||||
|
Rails.logger.error "[write_webm] ffmepg output:"
|
||||||
|
ffmpeg_out.split(/\n/).each do |line|
|
||||||
|
Rails.logger.error "[write_webm][ffmpeg] #{line}"
|
||||||
|
end
|
||||||
|
Rails.logger.error "[write_webm] mkvmerge output:"
|
||||||
|
mkvmerge_out.split(/\n/).each do |line|
|
||||||
|
Rails.logger.error "[write_webm][mkvmerge] #{line}"
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -2368,7 +2368,8 @@ CREATE TABLE pixiv_ugoira_frame_data (
|
|||||||
id integer NOT NULL,
|
id integer NOT NULL,
|
||||||
post_id integer,
|
post_id integer,
|
||||||
data text NOT NULL,
|
data text NOT NULL,
|
||||||
content_type character varying(255) NOT NULL
|
content_type character varying(255) NOT NULL,
|
||||||
|
console_log text
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@@ -7112,3 +7113,5 @@ INSERT INTO schema_migrations (version) VALUES ('20141009231234');
|
|||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20141017231608');
|
INSERT INTO schema_migrations (version) VALUES ('20141017231608');
|
||||||
|
|
||||||
|
INSERT INTO schema_migrations (version) VALUES ('20141028202032');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user