Recherche avancée
Médias (91)
-
999,999
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Demon seed (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
The four of us are dying (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Corona radiata (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Lights in the sky (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Sur d’autres sites (147)
-
Node.js child_process TypeError : Cannot read property '_writableState' of undefined
15 mai 2018, par functorialI am trying to wrap a piece of ffmpeg’s functionality in a Node.js API, using the
child_process
library, but when I attempt to send any data to ffmpeg’s stdin pipe, I get an errorTypeError: Cannot read property '_writableState' of undefined
.import {spawn} from "child_process"
export default frames => {
// Spawn ffmpeg process
const ffmpeg = spawn("ffmpeg", ["-f", "image2pipe", "-i", "-", "output.mkv"])
// Send frames to ffmpeg as stdin
frames.forEach(ffmpeg.stdin.write)
// Listen for output and errors
return new Promise((resolve, reject) => {
const chunks = []
ffmpeg.stdout.on("data", chunks.push)
ffmpeg.stderr.on("data", reject(data))
ffmpeg.on("close", code =>
resolve(Buffer.concat(chunks))
)
})
}Error :
TypeError: Cannot read property '_writableState' of undefined
at Writable.write (_stream_writable.js:270:20)
at Array.forEach (<anonymous>)
at exports.default (/home/fiendfan1/workspace/nodejs/declare/dist/app/common/encodeVideo.js:21:12)
at _callee$ (/home/fiendfan1/workspace/nodejs/declare/dist/app/tests/video.js:34:84)
at tryCatch (/home/fiendfan1/workspace/nodejs/declare/node_modules/regenerator-runtime/runtime.js:65:40)
at Generator.invoke [as _invoke] (/home/fiendfan1/workspace/nodejs/declare/node_modules/regenerator-runtime/runtime.js:303:22)
at Generator.prototype.(anonymous function) [as next] (/home/fiendfan1/workspace/nodejs/declare/node_modules/regenerator-runtime/runtime.js:117:21)
at Generator.tryCatcher (/home/fiendfan1/workspace/nodejs/declare/node_modules/bluebird/js/release/util.js:16:23)
at PromiseSpawn._promiseFulfilled (/home/fiendfan1/workspace/nodejs/declare/node_modules/bluebird/js/release/generators.js:97:49)
at Promise._settlePromise (/home/fiendfan1/workspace/nodejs/declare/node_modules/bluebird/js/release/promise.js:574:26)
at Promise._settlePromise0 (/home/fiendfan1/workspace/nodejs/declare/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/home/fiendfan1/workspace/nodejs/declare/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/home/fiendfan1/workspace/nodejs/declare/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/home/fiendfan1/workspace/nodejs/declare/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues [as _onImmediate] (/home/fiendfan1/workspace/nodejs/declare/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:696:18)
</anonymous> -
ffmpeg generate video starting from startdate.jpg ending enddate.jpg
12 février 2014, par John JHow would I go about using ffmpeg to generator a video from x to y in the directory. I have a startdate image.jpg and an enddate image,jpg which are timestamped. There are thousands of other images in the directory but I just want to create a clip from startimage to endimage with all the images in-between.
Is it possible to cross fade the images on creation to prevent jirkyness
One last thing, is there an easy way to return the file name when its created, or should this be specified before ?
Thanks
-
Handling multiple line subtitles of Right aligned languages(arabic) in Moviepy
24 décembre 2023, par Stanger DangerI am trying to add Arabic subtitles on a video using Moviepy. The issue I'm facing is related to alignment of Arabic text, as it progresses from right to left, instead of left to right in English language.




As text length gets more and more, Moviepy trims the words from both ends, this issue can be resolved if we break the text into multiple lines. This works well for English language but for Arabic, the first line becomes the last line because of the (Right-Left)alignment.




The text on Second line should come first on the first line at the start, while end chuck of first text towards the left corner should render on the second line, but it is getting rendered as English language, Left to right alignment.


Here is my code :


def add_subtitles(address_subtitles, address_video):
 video = VideoFileClip(address_video)
 generator = lambda txt: TextClip(txt, font='Arial', fontsize=22, color='black', stroke_width=2, method='caption', align='south', size=video.size)
 subtitles = SubtitlesClip(address_subtitles, generator)
 #print()

 result = CompositeVideoClip([video, subtitles.set_pos(('center','bottom'))])
 result.write_videofile("arabic_with_hardcoded_subtitles_3.mp4", fps=video.fps, temp_audiofile="temp-audio.m4a", remove_temp=True, codec="libx264"
 , audio_codec="aac")