Scientific Linux Forum.org



  Reply to this topicStart new topicStart Poll

> mp4 Video Editor
kenmorgan
 Posted: Dec 28 2014, 02:31 AM
Quote Post


SLF Member
***

Group: Members
Posts: 60
Member No.: 1782
Joined: 8-August 12









I have a Firefox extension for downloading YouTube videos and usually download them in mp4 format.

I'd like to install an editor that would allow me to simply cut the beginning and ending of a particular video. Is there a simple editor that I could install that would do this for me?

To play videos, I use VLC Media Player that I get from either the epel or elrepo repository (I can't remember which). Is this player capable of doing this? I looked over the various menu items but couldn't see a way of doing it.

Thanks so much.

--------------------
Ken
CentOS 6
PMEmail PosterUsers Website
^
burakkucat
 Posted: Dec 28 2014, 08:24 AM
Quote Post


SLF Administrator
****

Group: Admins
Posts: 205
Member No.: 14
Joined: 10-April 11









QUOTE
To play videos, I use VLC Media Player that I get from either the epel or elrepo repository (I can't remember which).

You must have obtained VLC from EPEL . . . (I leave it to you to figure out how I can make that definite statement. wink.gif )

For trimming off the head and/or tail of a video I make use of ffmpeg, which I obtained from the LinuxTECH repository.

--------------------
user posted image 100% Linux and, previously, Unix. Co-founder of the ELRepo Project.
PMUsers Website
^
kenmorgan
 Posted: Dec 28 2014, 08:29 PM
Quote Post


SLF Member
***

Group: Members
Posts: 60
Member No.: 1782
Joined: 8-August 12









Thanks, burakkucat, for the reply.

QUOTE
I leave it to you to figure out how I can make that definite statement.


QUOTE
Co-founder of the ELRepo Project.


After much painstaking research, wading through numerous technical journals, and writing several specialized computer programs, I have constructed a tentative theory as to how you could make such a definite statement that the VLC player did not come from the ELRepo repository: you are its co-founder. smile.gif

Now to the issue in question. To check whether I even had ffmpeg installed, I did this:

CODE

[root@localhost1 kmorgan]# rpm -qa | grep ffmpeg
gstreamer-ffmpeg-0.10.11-5.el6.i686
ffmpeg-libs_1.1-1.1.5-2.el6.i686
ffmpeg-libs_0.6-0.6.6-3.el6.i686


It looks like it's there. So then just to see what would happen, I did this:

CODE

[root@localhost1 kmorgan]# ffmpeg
bash: ffmpeg: command not found


So...could you perhaps give me some additional help?

I believe that ffmpeg is a command-line program. But as a complete novice when it comes to videos, I was hoping to be able to watch the video and then just hit a key at the instant to cut what has already been played or what remains to be played. Is there some way to do this?

Thanks again.

--------------------
Ken
CentOS 6
PMEmail PosterUsers Website
^
+X^N
 Posted: Dec 28 2014, 10:48 PM
Quote Post


SLF Member
***

Group: Members
Posts: 130
Member No.: 2581
Joined: 27-June 13









Ken ,
it appears (to this NON-expert) that you only have the libraries for play-back installed.
.
My installation :
CODE
$ rpm -qa | grep ffmpeg
chromium-ffmpeg-18.0.972.0-1.el6.R.x86_64
ffmpeg-0.8.5-2.1.puias6.x86_64
gstreamer-ffmpeg-0.10.11-5.el6.x86_64
ffmpeg-devel-0.8.5-2.1.puias6.x86_64
ffmpeg-libs-0.8.5-2.1.puias6.x86_64
$

When I did
ffmpef --help
I got info. about how to use the command.
The actuall ffmpeg on my system is 'ffmpeg-0.8.5-2.1.puias6.x86_64'.
..
So, it looks like I installed the ffmpeg itself from PUIAS.
While I have never used it ;
I would (today , if I had to do it again) install it from ttux99 's LinuxTech repo for SL 6 :
http://pkgrepo.linuxtech.net/el6/release/linuxtech.repo
...
He is active here on this forum , as well as ElRepo , and else where in the linux community.
However, he has chosen to stick with SL 6.
.
If you are looking for SL 7 multimedia packages , maybe Nux 's is a good fit : http://li.nux.ro/repos.html ;
he does Stella ( a multimedia respin of SL).
..
Best regards.

--------------------
DELL Precision 470 Workstation Xeon 3.2GHz (x2) , 2GB ECC ram ;
DELL UltraSharp 2007WFPb (L) ips monitor
Dual boot :1st installed: WinXPPro & then SL6.4 x86_64 - via 2 'everything' DVD s { GRUB going into the SL6.4 partition } ;
Updated to 6.5 via DVD s

& Steelcase vintage / old-school stenographers seat (made in Grand Rapids , MI , USA)
PMUsers Website
^
burakkucat
 Posted: Dec 29 2014, 12:50 AM
Quote Post


SLF Administrator
****

Group: Admins
Posts: 205
Member No.: 14
Joined: 10-April 11









Hmm . . . It is possible to trim both the head and/or tail of a mp4 file (for example) with ffmpeg but it may not be as straightforward as you would like.

Quick example -- You have a video file zxc.mp4 which, after viewing it, you decide to remove the last 18 seconds and wish to skip the beginning 73 seconds. ffmpeg will display the total elapsed time of the video on the stdout, so we take a note of it. Create two new directories Y & Z and move to directory Y. Issue the command --

ffmpeg -i ../zxc.mp4 -t total_elapsed_time_less_18 zxc.mp4

You should now have a copy of zxc.mp4 with the last 18 seconds removed from it. Now move to directory Z. Issue the command --

ffmpeg -ss 73 -i ../Y/zxc.mp4 zxc.mp4

You now will have three copies of the video, zxc.mp4 (the original, untrimmed), ./Y/zxc.mp4 (with 18 seconds removed from the end) and ./Z/zxc.mp4 (with 18 seconds removed from the end and 73 seconds removed from the beginning).

A bit cumbersome but it works. I'm sure there are better tools for the job but as I have ffmpeg to hand^Wpaw, I can make do with using it for simple "trimming". (It is also possible to perform similar "trimming" for a plain audio file, etc.)

--------------------
user posted image 100% Linux and, previously, Unix. Co-founder of the ELRepo Project.
PMUsers Website
^
kenmorgan
 Posted: Dec 29 2014, 01:55 AM
Quote Post


SLF Member
***

Group: Members
Posts: 60
Member No.: 1782
Joined: 8-August 12









Thanks for the suggestion, +X^N. (x to the nth power--interesting username!)

I already have tux99's repos in /etc/yum.repos.d because I installed VLC from them. So should I first uninstall the ffmpeg packages I currently have installed (from who knows what repo)? But then how do I get yum to install ffmpeg from tux99's LinuxTech repo?

Also, thanks burakkucat for the commands to get the job done. However, before I can use them, I will have to install tux99's version of ffmpeg. Is this correct? As I stated in the previous paragraph, I'm not quite sure how to do that.


--------------------
Ken
CentOS 6
PMEmail PosterUsers Website
^
+X^N
 Posted: Dec 29 2014, 03:24 AM
Quote Post


SLF Member
***

Group: Members
Posts: 130
Member No.: 2581
Joined: 27-June 13









Ken,
I personally need to reinstall my SL system , because a year ago ,
when I first installed it , I was not connected to the internet.
So I installed everything 'manually' , and did not know about tux99 's good work in packaging
multimedia software. The result was I have a mish-mash of multimedia libs installed --
mainly from PUIAS / Springdale Linux (another RHEL clone).
So I am NO expert.
.
That being said -- as a general direction --
yes un-install the ffmpeg libs & any other multimedia
in order to have 'clean slate' for LinuxTech.
...
Personally I have not learned yum & use the GUI YumExtender.
..
It seems , for RHEL & clones --
EPEL (maintained by the Fedora group) is THE repo for 'exrta' packages wink.gif
& ElRepo is for hardware 'drivers' ;
& then choose ONE other repo for multimedia.
...
On a side note my forum handle arises from reggae 's emphasis of the positive :
Bob Marley - Positive Vibrations
Black Uhuru - Positive
&
Nasio Fontaine - Living in the Positive
etc
X was a mysterious quantity as in Planet X
X is a general unknown
Also , I am a CAD designer , so i wanted to say
stay in the positive X axis direction
to the N th degree
so it ended up : positive X to the N th degree , or
+X^N

...
Best regards

--------------------
DELL Precision 470 Workstation Xeon 3.2GHz (x2) , 2GB ECC ram ;
DELL UltraSharp 2007WFPb (L) ips monitor
Dual boot :1st installed: WinXPPro & then SL6.4 x86_64 - via 2 'everything' DVD s { GRUB going into the SL6.4 partition } ;
Updated to 6.5 via DVD s

& Steelcase vintage / old-school stenographers seat (made in Grand Rapids , MI , USA)
PMUsers Website
^
burakkucat
 Posted: Dec 29 2014, 03:11 PM
Quote Post


SLF Administrator
****

Group: Admins
Posts: 205
Member No.: 14
Joined: 10-April 11









Let's have a play with a few command lines based on rpm --
CODE
[Duo2 ~]$ rpm -qa | wc -l
1169
[Duo2 ~]

CODE
[Duo2 ~]$ rpm -qa --qf "%{N}-%{V}-%{R}\t%{VENDOR}\n" | sort
a52dec-0.7.4-10.el6 LinuxTECH.NET
abrt-libs-2.0.8-26.el6 Red Hat, Inc.
abyssinica-fonts-1.0-5.1.el6 Red Hat, Inc.
acl-2.2.49-6.el6 Red Hat, Inc.
acpid-1.0.10-2.1.el6 Red Hat, Inc.
adobe-release-x86_64-1.0-1 Adobe Systems Inc.
aic94xx-firmware-30-2.el6 Red Hat, Inc.
alsa-lib-1.0.22-3.el6 Red Hat, Inc.
alsa-plugins-pulseaudio-1.0.21-3.el6 Red Hat, Inc.
alsa-utils-1.0.22-7.el6 Red Hat, Inc.
<snip>
yum-3.2.29-60.el6 Red Hat, Inc.
yum-metadata-parser-1.1.2-16.el6 Red Hat, Inc.
yum-plugin-fastestmirror-1.1.30-30.el6 Red Hat, Inc.
yum-rhn-plugin-0.9.1-52.el6_6 Red Hat, Inc.
yum-utils-1.1.30-30.el6 Red Hat, Inc.
zd1211-firmware-1.4-4.el6 Red Hat, Inc.
zenity-2.28.0-1.el6 Red Hat, Inc.
zip-3.0-1.el6 Red Hat, Inc.
zlib-1.2.3-29.el6 Red Hat, Inc.
zlib-devel-1.2.3-29.el6 Red Hat, Inc.
[Duo2 ~]

CODE
[Duo2 ~]$ rpm -qa --qf "%{N}-%{V}-%{R}\t%{VENDOR}\n" | sort | grep -v 'Red Hat'
a52dec-0.7.4-10.el6 LinuxTECH.NET
adobe-release-x86_64-1.0-1 Adobe Systems Inc.
ddrescue-1.16-1.el6 Fedora Project
dvdauthor-0.7.0-1.el6 LinuxTECH.NET
elrepo-release-6-6.el6.elrepo The ELRepo Project (http://elrepo.org)
enca-1.13-3.el6 LinuxTECH.NET
epel-release-6-8 Fedora Project
faad2-2.7-5.el6 LinuxTECH.NET
ffmpeg-1.1.5-2.el6 LinuxTECH.NET
ffmpeg-libs_0.6-0.6.6-3.el6 LinuxTECH.NET
<snip>
libxvidcore-1.3.2-1.el6 LinuxTECH.NET
lirc-libs-0.9.0-100.el6 LinuxTECH.NET
live555-0-0.34.2012.01.25.el6 LinuxTECH.NET
mencoder-1.0.4-3.el6 LinuxTECH.NET
mjpegtools-libs-2.0.0-4.el6 LinuxTECH.NET
mplayer-1.0.4-3.el6 LinuxTECH.NET
orc-0.4.14-1.el6 LinuxTECH.NET
unrar-4.2.3-1.el6.rf Dag Apt Repository, http://dag.wieers.com/apt/
vcdimager-0.7.24-3.el6 LinuxTECH.NET
x264-0.130-0.20130531.1.el6 LinuxTECH.NET
[Duo2 ~]

CODE
[Duo2 ~]$ rpm -qa --qf "%{N}-%{V}-%{R}\t%{VENDOR}\n" | sort | grep 'LinuxTECH'
a52dec-0.7.4-10.el6 LinuxTECH.NET
dvdauthor-0.7.0-1.el6 LinuxTECH.NET
enca-1.13-3.el6 LinuxTECH.NET
faad2-2.7-5.el6 LinuxTECH.NET
ffmpeg-1.1.5-2.el6 LinuxTECH.NET
ffmpeg-libs_0.6-0.6.6-3.el6 LinuxTECH.NET
ffmpeg-libs_1.1-1.1.5-2.el6 LinuxTECH.NET
fribidi-0.19.2-3.el6 LinuxTECH.NET
gstreamer-ffmpeg-0.10.11-5.el6 LinuxTECH.NET
gstreamer-plugins-bad-0.10.19-9.el6 LinuxTECH.NET
gstreamer-plugins-ugly-0.10.18-2.el6 LinuxTECH.NET
jack-audio-connection-kit-0.121.3-1.el6 LinuxTECH.NET
liba52-0.7.4-10.el6 LinuxTECH.NET
libamrwb-7.0.0.4-3.el6 LinuxTECH.NET
libass-0.10.0-3.el6 LinuxTECH.NET
libbluray-0.2.2-0.git20120222.1.el6 LinuxTECH.NET
libbs2b-3.1.0-2.el6 LinuxTECH.NET
libcdaudio-0.99.12p2-14.el6 LinuxTECH.NET
libcelt-0.11.1-4.el6 LinuxTECH.NET
libcrystalhd-20110917-1.el6 LinuxTECH.NET
libdca-0.0.5-3.el6 LinuxTECH.NET
libdirac-1.0.2-4.el6 LinuxTECH.NET
libdvdcss-1.2.12-1.el6 LinuxTECH.NET
libdvdnav-4.2.0-3.el6 LinuxTECH.NET
libenca-1.13-3.el6 LinuxTECH.NET
libfaac-1.28-3.el6 LinuxTECH.NET
libfaad2-2.7-5.el6 LinuxTECH.NET
libffado-2.1.0-0.8.20120325.svn2088.el6 LinuxTECH.NET
libfribidi-0.19.2-3.el6 LinuxTECH.NET
libftdi-0.20-2.el6 LinuxTECH.NET
libkate-0.3.8-3.el6 LinuxTECH.NET
liblrdf-0.5.0-2.el6 LinuxTECH.NET
libmad-0.15.1b-6.el6 LinuxTECH.NET
libmms-0.6.2-1.el6 LinuxTECH.NET
libmodplug-0.8.8.4-1.el6 LinuxTECH.NET
libmp3lame-3.98.4-4.el6 LinuxTECH.NET
libmpeg2-0.5.1-5.el6 LinuxTECH.NET
libmpg123-1.14.4-1.el6 LinuxTECH.NET
libnemesi-0.7.0-0.2.20110215git.el6 LinuxTECH.NET
libnetembryo-0.1.1-4.el6 LinuxTECH.NET
libopencore-amr-0.1.2-3.el6 LinuxTECH.NET
libopus-1.1-1.el6 LinuxTECH.NET
liborc-0.4.14-1.el6 LinuxTECH.NET
libquicktime-1.2.4-5.el6 LinuxTECH.NET
libraptor2-2.0.7-3.el6 LinuxTECH.NET
librtmp-2.3-3.el6 LinuxTECH.NET
libschroedinger-1.0.10-3.el6 LinuxTECH.NET
libsidplay-1.36.60-3.el6 LinuxTECH.NET
libtwolame-0.3.13-3.el6 LinuxTECH.NET
libva-1.0.16-3.el6 LinuxTECH.NET
libvcdinfo-0.7.24-3.el6 LinuxTECH.NET
libvdpau-0.5-2.el6 LinuxTECH.NET
libx264_115-0.115-0.20110722.2.el6 LinuxTECH.NET
libx264_130-0.130-0.20130531.1.el6 LinuxTECH.NET
libxml++-2.35.2-1.el6 LinuxTECH.NET
libxvidcore-1.3.2-1.el6 LinuxTECH.NET
lirc-libs-0.9.0-100.el6 LinuxTECH.NET
live555-0-0.34.2012.01.25.el6 LinuxTECH.NET
mencoder-1.0.4-3.el6 LinuxTECH.NET
mjpegtools-libs-2.0.0-4.el6 LinuxTECH.NET
mplayer-1.0.4-3.el6 LinuxTECH.NET
orc-0.4.14-1.el6 LinuxTECH.NET
vcdimager-0.7.24-3.el6 LinuxTECH.NET
x264-0.130-0.20130531.1.el6 LinuxTECH.NET
[Duo2 ~]

CODE
[Duo2 ~]$ rpm -qa --qf "%{N}-%{V}-%{R}\t%{VENDOR}\n" | sort | grep 'ffmpeg'
ffmpeg-1.1.5-2.el6 LinuxTECH.NET
ffmpeg-libs_0.6-0.6.6-3.el6 LinuxTECH.NET
ffmpeg-libs_1.1-1.1.5-2.el6 LinuxTECH.NET
gstreamer-ffmpeg-0.10.11-5.el6 LinuxTECH.NET
[Duo2 ~]$

From the above, you should be able to see a method to identify from which repository a package originates. (And it can be seen that all of the above examples were generated on a RHEL 6 system.)

--------------------
user posted image 100% Linux and, previously, Unix. Co-founder of the ELRepo Project.
PMUsers Website
^
kenmorgan
 Posted: Dec 29 2014, 04:49 PM
Quote Post


SLF Member
***

Group: Members
Posts: 60
Member No.: 1782
Joined: 8-August 12









burakkucat:

Executing the rpm command from your fourth box of code, the ffmpeg packages that were already installed on my system, as displayed in my second post, were from LinuxTech. So I simply went ahead and installed ffmpeg to get the main program:

yum install ffmpeg

Then I followed your procedure. However, the first step produced an error message:

Invalid duration specification for t: total_elapsed_time_less_3

Any ideas?



--------------------
Ken
CentOS 6
PMEmail PosterUsers Website
^
burakkucat
 Posted: Dec 29 2014, 05:43 PM
Quote Post


SLF Administrator
****

Group: Admins
Posts: 205
Member No.: 14
Joined: 10-April 11









QUOTE (kenmorgan @ Dec 29 2014, 04:49 PM)
burakkucat:

Executing the rpm command from your fourth box of code, the ffmpeg packages that were already installed on my system, as displayed in my second post, were from LinuxTech. So I simply went ahead and installed ffmpeg to get the main program:

yum install ffmpeg

Good. smile.gif

QUOTE

Then I followed your procedure. However, the first step produced an error message:

Invalid duration specification for t: total_elapsed_time_less_3

Any ideas?

Did you follow my example literally? If yes, that is source of the error. wink.gif

You need to know the total elapsed time for the video that you are trimming (at its end). Let's say, for example, it is 157 seconds and you wish to trim off the last 3 seconds.

157 - 3 = 154

So your command line would be something like --

ffmpeg -i ../zxc.mpg4 -t 154 zxc.mpg4

--------------------
user posted image 100% Linux and, previously, Unix. Co-founder of the ELRepo Project.
PMUsers Website
^
kenmorgan
 Posted: Dec 29 2014, 07:00 PM
Quote Post


SLF Member
***

Group: Members
Posts: 60
Member No.: 1782
Joined: 8-August 12









That was it!

Complete success has now been achieved! http://dl.dropbox.com/u/2835777/egyptian.gif

--------------------
Ken
CentOS 6
PMEmail PosterUsers Website
^
burakkucat
 Posted: Dec 29 2014, 09:20 PM
Quote Post


SLF Administrator
****

Group: Admins
Posts: 205
Member No.: 14
Joined: 10-April 11









QUOTE (kenmorgan @ Dec 29 2014, 07:00 PM)
That was it!

Complete success has now been achieved!  http://dl.dropbox.com/u/2835777/egyptian.gif

Excellent news! biggrin.gif

--------------------
user posted image 100% Linux and, previously, Unix. Co-founder of the ELRepo Project.
PMUsers Website
^
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll