Notices


Reply
Thread Tools
Posts: 561 | Thanked: 75 times | Joined on Jan 2010 @ Spain
#11
Creating final video in the desired format from the result of the union.

ffmpeg -i -sameq video_temp.mpeg video_end.avi
*-> "-sameq" is an option that forces the ffmpeg for the final video has the same quality as the videos of entry, (the same resolution, same bitrate, etc).

Last edited by WhiteWolf; 2010-08-24 at 19:54.
 
Posts: 561 | Thanked: 75 times | Joined on Jan 2010 @ Spain
#12
Example of conversion to another format:

ffmpeg-i-sameq videoA.avi videoA.mpeg
 

The Following User Says Thank You to WhiteWolf For This Useful Post:
Posts: 561 | Thanked: 75 times | Joined on Jan 2010 @ Spain
#13
Main options de ffmpeg
  • `-f fmt' → Force format.
  • `-i filename' → input file name
  • `-y' → Overwrite output files.
  • `-t duration' → Restrict the transcoded/captured video sequence to the duration specified in seconds. hh:mm:ss[.xxx] syntax is also supported.
  • `-fs limit_size' → Set the file size limit.
  • `-ss position' → Seek to given time position in seconds. hh:mm:ss[.xxx] syntax is also supported.
  • `-itsoffset offset' → Set the input time offset in seconds. [-]hh:mm:ss[.xxx] syntax is also supported. This option affects all the input files that follow it. The offset is added to the timestamps of the input files. Specifying a positive offset means that the corresponding streams are delayed by 'offset' seconds.
  • `-timestamp time' → Set the recording timestamp in the container. The syntax for time is: now|([(YYYY-MM-DD|YYYYMMDD)[T|t| ]]((HH[:MM[:SS[.m...]]])|(HH[MM[SS[.m...]]]))[Z|z])

    If the value is "now" it takes the current time. Time is local time unless 'Z' or 'z' is appended, in which case it is interpreted as UTC. If the year-month-day part is not specified it takes the current year-month-day.

  • `-metadata key=value' → Set a metadata key/value pair. For example, for setting the title in the output file: ffmpeg -i in.avi -metadata title="my title" out.flv
  • `-v number' → Set the logging verbosity level.
  • `-target type' → Specify target file type ("vcd", "svcd", "dvd", "dv", "dv50", "pal-vcd", "ntsc-svcd", ... ). All the format options (bitrate, codecs, buffer sizes) are then set automatically. You can just type: ffmpeg -i myfile.avi -target vcd /tmp/vcd.mpg
  • Nevertheless you can specify additional options as long as you know they do not conflict with the standard, as in:
  • ffmpeg -i myfile.avi -target vcd -bf 2 /tmp/vcd.mpg
  • `-dframes number' → Set the number of data frames to record.
  • `-scodec codec' → Force subtitle codec ('copy' to copy stream).
  • `-newsubtitle' → Add a new subtitle stream to the current output stream.
  • `-slang code' → Set the ISO 639 language code (3 letters) of the current subtitle stream.
 

The Following User Says Thank You to WhiteWolf For This Useful Post:
Posts: 561 | Thanked: 75 times | Joined on Jan 2010 @ Spain
#14
Sample is 30 seconds of video from minute one:

ffmpeg -i video_original.avi -ss 60 -t 30 video_end.avi

Last edited by WhiteWolf; 2010-08-24 at 20:21.
 

The Following User Says Thank You to WhiteWolf For This Useful Post:
benny1967's Avatar
Posts: 3,790 | Thanked: 5,718 times | Joined on Mar 2006 @ Vienna, Austria
#15
you should be able to cut videos with ffmpeg, too, shouldn't you? i assume ffmpeg supports some kind of -from mm:ss -to mm:ss switch for the input file(s)?

one could go one step further then and actually re-encode videos if they're not in the desired output format... like if you recorded one video in low quality and another one in high quality and want to append a few seconds of the high quality video to the low quality clip.

and then, of course, you would separate sound and video and re-mix them for the final movie... like using one of your mp3 files as a soundtrack... or using the soundtrack of clip 1 throughout the movie even though some parts of the video are being replaced by other clips...

oh, sorry, i was dreaming. (in fact - i'm already made up a GUI for it in my dreams... ...)
 
Posts: 561 | Thanked: 75 times | Joined on Jan 2010 @ Spain
#16
Your dreams "YES" are possible, I also hope to create a GUI for it.

See the previous post.
 
benny1967's Avatar
Posts: 3,790 | Thanked: 5,718 times | Joined on Mar 2006 @ Vienna, Austria
#17
In fact, the more I think of it: The GUI might even be simple. Old S60 phones have a very simple one, and it could be slightly improved for Maemo.

You have a "list" of thumbnails, one for each clip you want to use. (The list could be a real list or a grid like the thumbnails in the media player or - which I'd prefer - thumbnails laid out horizontally.)

In the application settings, you specify the output format. (fps, resolution, ...)

you click on a thumbnail to enter the start/end values for this clip. (=use from 00:32 to 00:36) Also, there's an option 'use original sound', 'continue using sound from previous scene' or 'select audio file for soundtrack'.

That's it. The GUI generates parameters for ffmpeg. Parameters for video quality may be fixed to the recording options supported by the N900 (or could support one "very low quality" setting as output for email/MMS).
 
benny1967's Avatar
Posts: 3,790 | Thanked: 5,718 times | Joined on Mar 2006 @ Vienna, Austria
#18
Originally Posted by WhiteWolf View Post
Your dreams "YES" are possible, I also hope to create a GUI for it.

See the previous post.
I dreamed too long - you had completed two long posts while I was typing.
 
Posts: 561 | Thanked: 75 times | Joined on Jan 2010 @ Spain
#19
Example of how to remove the audio track of a video:

ffmpeg -i VideoA.avi -an Video_end.avi

*-> "-an" indicates that the final video will have no audio track

Example of how to add the audio track of a video:

ffmpeg -i AudioA.wav -i VideoA.avi Video_end.avi
 
niqbal's Avatar
Posts: 474 | Thanked: 368 times | Joined on Jan 2010
#20
Originally Posted by WhiteWolf View Post
Your dreams "YES" are possible, I also hope to create a GUI for it.

See the previous post.
there was a video/audio editor concept video for n900. it was on these forums now i cant find it, saw it sometime back. it was quite mind blowing, it had a complete GUI

does someone else recall or can find a link?

--------------

EDIT: i did find the link

http://dl.dropbox.com/u/219349/mkp.swf

its creating a video from taking individual images, nonetheless it gives a great interface idea for it.

Last edited by niqbal; 2010-08-25 at 11:03.
 

The Following 3 Users Say Thank You to niqbal For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 07:38.