Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
09-24-2014, 07:20 AM
|
#1
|
Member
Registered: Apr 2009
Posts: 390
Rep:
|
saving bash script's audio-and-image output as .mov file
2014-09-24
I would like to know a simple command-line method to save a show-and-tell script's audio-and-image output in a .mov file, which I can play back on a TV through a CD or DVD player. Any help will be much appreciated.
Julianloui
|
|
|
09-24-2014, 08:18 AM
|
#2
|
Moderator
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,938
|
Bit confusing to me. Scripts don't have audio/video "output", however one can cause an existing media file or stream to be played via the use of a script. Or have a script load and play an online medial stream. Either way, those media streams are already saved somewhere.
Or are you saying that you want to make a video of a show and tell script, so that persons using it can reference the video to understand something further?
|
|
|
09-24-2014, 08:27 AM
|
#3
|
Member
Registered: Apr 2009
Posts: 390
Original Poster
Rep:
|
Quote:
Bit confusing to me. Scripts don't have audio/video "output", however one can cause an existing media file or stream to be played via the use of a script. Or have a script load and play an online medial stream. Either way, those media streams are already saved somewhere.
Or are you saying that you want to make a video of a show and tell script, so that persons using it can reference the video to understand something further?
__________________
|
I think I did'nt state my question clearly. My script currently produces pictures and associated sounds in a number of succesive frames on the computer screen. What I would like to do is to capture the script's output in a .mov file which I can then play back on a TV screen. Thanks very much for your input.
julianloui
(formerly Framingham, MA)
Last edited by julianvb; 09-24-2014 at 08:35 AM.
|
|
|
09-24-2014, 08:43 AM
|
#4
|
Moderator
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,938
|
Quote:
Originally Posted by julianvb
I guess I didn't state my question clearly. My script produces pictures as well as associated sounds in a number of succesive frames on the computer screen. What I would like to do is to capture the script's output in a .mov file which I can then play back on a TV screen. Thanks very much for your input.
julianloui
|
OK, there are two possibilities, I'm guessing the second one. The first one would be: The script totally governs the flow of audio-video, therefore what would be the problem, it's technically already recorded. The second one would be: The script is interactive, therefore due to the actions on the part of the user, different flows of audio-video would occur, and could occur each time a user ran the script; depending what options they selected. So like I say, I "guess" that second option.
And if I'm close, one thing you could do; also providing you can edit the script yourself, is to capture into a record file the choices that the person made to define their flow. That capture could be a complete copy of their session with sufficient data to re-run the flow of audio-video that they did. A further enhancement might be to convert that session record into a singular movie file at the successful end of a script session. I'd break it down into recording the session so that it would be replayed first as a script option, secondly try to make it so that the recorded session file itself becomes a script and when run, would do the replay, and finally design a way to convert that recorded session into a movie file.
Some notes. I long ago did a project where we took images periodically throughout the day to record environment changes and then they wanted it made into a movie. I guess it depends. They wanted full resolution images, fully visible movies, therefore it took a ton of space and resources to create the movies. Ultimately they started complaining about disk space. Gotta love that. We did find that making the movie low resolution cost a lot of visibility, especially if you wanted to blow it up to screen size. This seems similar, the images hardly changed, but there were like 84,000 of them (one photo per second, for a whole day). If you have a fixed image on the screen and then play an audio file in conjunction with that. To make that a movie, you're basically having multiple frames of that fixed image showing and multiplying that by however many times you need to fill the movie space where there are pauses and the audio is also playing. So therefore some 300K JPEG image gets copied at 30 frames per second for 10, 20, 30 (?) seconds. It becomes large. This is why I'm thinking it might be better to "replay" the script session in the same manner; which is to make the replay a script which follows the recorded session and does the same actions; "display one fixed image, and plays an audio file".
A final option might be to research something which can record your screen and then cause it to start and stop recording as part of the script so that the session is bounded in start/stop as you'd prefer it to be.
|
|
1 members found this post helpful.
|
09-24-2014, 09:36 AM
|
#5
|
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326
|
if you have something like a directory of jpg's maybe this will work:
Code:
mencoder mf://*.jpg -mf w=320:h=240:fps=.5:type=jpg -ovc lavc -lavcopts vcodec=mpeg4 -oac copy -o julianvb.avi
supposedly imagemagicks convert program should work but i get an error:
Code:
convert -delay 6 -quality 95 dscf007*.jpg julianvb.mpg
convert: delegate failed `"ffmpeg" -v -1 -mbd rd -flags +4mv+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 -i "%M%%d.jpg" "%u.%m" 2> "%Z"' @ error/delegate.c/InvokeDelegate/1061.
#formerly of somerville
|
|
1 members found this post helpful.
|
09-24-2014, 11:23 AM
|
#6
|
Moderator
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,938
|
I used convert to convert an individual image, to place the day/time timestamp onto the images taken so a day/clock would be shown as part of the movie. However we did try to use avconv and/or ffmpeg to make the actual movie. And that appears to be what convert attempted to use there actually.
|
|
|
09-24-2014, 01:48 PM
|
#7
|
Member
Registered: Apr 2009
Posts: 390
Original Poster
Rep:
|
Hi, rtmister and schneidz,
Thank you very much for your copious generous help. A few days ago I did entertain the idea to makig an interactive start-stop version of my script, but I decided to put it off as I was too busy with other matters.
Essentially my script repeatitive invokes just two applications, namely espeak and shotwell. So it is pretty basic. My present plan is to somehow to save the script's real-time output into a move-like file. I agree that the script should include commands to start and stop 'recording' its output.
Once I get a chance I'll make full use of your great information.
julianvb
|
|
|
09-24-2014, 02:43 PM
|
#8
|
Member
Registered: Apr 2009
Posts: 390
Original Poster
Rep:
|
Hi, schneidz,
I saw the following error when I executed the mencoder line from a short script.
Option lavcopts: Unknown suboption vocder
Error parsing option on the command line: -lavcopts
julianvb
|
|
|
09-24-2014, 06:23 PM
|
#9
|
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326
|
thats weird ? did you copy-pasta ?
(where did it get vocder from ?)
Last edited by schneidz; 09-24-2014 at 06:24 PM.
|
|
|
09-24-2014, 10:27 PM
|
#10
|
Member
Registered: Apr 2009
Posts: 390
Original Poster
Rep:
|
Hi, schneidz,
No, I didn't know anything about copy-pasta. I just entered your 'memcoder' line from the keyboard out of curiosity and saw this error message.
I am wondering if there's a brute-force harware way to capture my script's output via the computer's 15-pin display port.
julianvb
Last edited by julianvb; 09-24-2014 at 10:28 PM.
|
|
|
09-24-2014, 11:25 PM
|
#11
|
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326
|
by copy-pasta I meant typo.
you also typed in memcoder [sic] wrong.
|
|
|
09-25-2014, 01:15 AM
|
#12
|
Member
Registered: Apr 2009
Posts: 390
Original Poster
Rep:
|
Hi, Schneidz,
I meant mencoder. I still have the piece of paper on which I copied 'mencoder mf://*.jpg ....' The 'memcoder' typo was made when I wrote the reply in Post #10. Please see Post # 8, where I wrote 'mencoder'. Had I originally entered 'memcoder', Linux would have ignored the rest of the entire line.
I'm sorry about the misunderstanding. When one reaches my relatively advanced age of 80, typos would not surprise anyone or myself even though I still mow my fair-sized lawn once a week and troubleshoot various computer problems daily, without much difficulty. For some reason, I just can't resist the temptation of poking into new things whenever an idea or urge occurs to me.
julianvb
Last edited by julianvb; 09-25-2014 at 01:17 AM.
|
|
|
All times are GMT -5. The time now is 07:23 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|