Jump to content

jdauthre

Members
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

About jdauthre

  • Rank
    Newbie
  1. I want to feed some input files stored in an array to a ffmpeg childprocess , but it needs to be asynchronous because I want to capture std.err live. However I need to feed one input at a time waiting for the previous one to finish. I think I need to use promises or async await but I cannot work out how. my code (simplified) is: var inputArray =['"'+"firstFile"+'"' ,'"'+"secondFile"+'"' ,'"'+"third"+'"' ]; var spawn = require('child_process').spawn; for(i=0;i<inputArray.length;i++){ child = spawn("ffmpeg",["-y", "-i",inputArray[i],+i+".ts"],{ shell: true}); child.stderr.on('data', f
  2. I have a web site that lists students in a database on a server, and can add a students details. It then relists the students pulling the new list off the database. All worked well until I transferred everything to a new webhost. It still works to the point of relisting when I get the old list not the updated one. Checking the database(mysql) directly it has actually put the new student in. and if I log out of the web site and back in the new student's details are there. how do get this to work? relevent code is below: html/javascript: function listStudents(password){ var oR
  3. I am quite new to java, and try as I might, I can't find any examples to help me. I am running ffmpeg as a process and parsing the stderr to get various bits of data - all of which is working fine, but I want to send a "q\n" command to ffmpeg's input from a gui menu item to gracefully quit it whilst it is running when necessary. So all I want to do is send a string programmatically to ffmpeg, the equivalent of sending q return from terminal. A simplified segment of the source code is attached Thanks in advance ffmpeg.txt
  4. I am pretty new to javascript and node.js. I am wanting to display some text using document.getElementById('txt').innerHTML= "some text" followed by a node module : var spawn = require('child_process').spawnSync; child = spawn('ffmpeg',['-y -i ',some_file , result_file ], { shell: true }); (which takes some time) and then document.getElementById('txt').innerHTML= "some other text"; However it only disp[ays the second lot of text after the external program has finished. I had assumed that as I am using the synchronous version of spawn that the fir
  5. Thanks, I will have to move on to plan B
  6. I need to get the raw window handle for a html / javascript window (hwnd in windows 10), using javascript / node.js / nwjs but can't find a way. does anybody have any ideas? I want to embed mpv or mplayer in a window using the -wid option which requires the window handle as an integer. Or does anyone have any ideas how to do this as an alternative? Thanks
×
×
  • Create New...