Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Need App To Splice/Cut MPEG4
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
dman777
l33t
l33t


Joined: 10 Jan 2007
Posts: 737

PostPosted: Wed Oct 02, 2013 1:04 pm    Post subject: Need App To Splice/Cut MPEG4 Reply with quote

I have a MPEG4 movie that I want to cut a clip out of and use as my screen saver. What utility could I use to cut out the segment of the MPEG4?
Back to top
View user's profile Send private message
Clad in Sky
l33t
l33t


Joined: 04 May 2007
Posts: 756
Location: Germany

PostPosted: Wed Oct 02, 2013 5:21 pm    Post subject: Reply with quote

You could try lives. Might be a bit more than you're asking for, though.
I'm sure some of those ffmpeg wizards could tell you how to do it with a single line in the CLI.

Anway, lives lets you do video editing, too.
media-video/lives-1.4.6
_________________
Kali Ma
Now it's autumn of the aeons
Dance with your sword
Now it's time for the harvest
Back to top
View user's profile Send private message
Knute
Guru
Guru


Joined: 28 Jun 2004
Posts: 362
Location: Fargo, ND

PostPosted: Wed Oct 02, 2013 9:48 pm    Post subject: Reply with quote

Code:
ffmpeg -ss time.to.start.from -i mp4.you.want.to.cut.from -t duration save.file.to.this.name

The manpage for ffmpeg is fairly detailed but this should get you started. Also the -ss option performs differently depending upon where it is put in the command.

HTH
_________________
Knute
----------
The human race has one really effective weapon, and that is laughter.
-- Mark Twain

If you want proof of that, take a look at windows sometime. :)
Back to top
View user's profile Send private message
dman777
l33t
l33t


Joined: 10 Jan 2007
Posts: 737

PostPosted: Sun Oct 06, 2013 2:10 am    Post subject: Reply with quote

Knute wrote:
Code:
ffmpeg -ss time.to.start.from -i mp4.you.want.to.cut.from -t duration save.file.to.this.name

The manpage for ffmpeg is fairly detailed but this should get you started. Also the -ss option performs differently depending upon where it is put in the command.

HTH


Thanks. I am trying ffmpeg -s 01:20:12 -i movie.mpg4 -t 7s new_file.mpg4 but it complains of "option video_size not found". Trying to get around this but haven't figure out how. I don't want to specify size because I don't know what the default size is since I don't want to change the size...just take a clip out for my screen saver.
Back to top
View user's profile Send private message
Jaglover
Advocate
Advocate


Joined: 29 May 2005
Posts: 4564
Location: Saint Amant, Acadiana

PostPosted: Sun Oct 06, 2013 2:13 am    Post subject: Reply with quote

Avidemux can do it.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Knute
Guru
Guru


Joined: 28 Jun 2004
Posts: 362
Location: Fargo, ND

PostPosted: Sun Oct 06, 2013 2:50 am    Post subject: Reply with quote

dman777 wrote:


Thanks. I am trying ffmpeg -s 01:20:12 -i movie.mpg4 -t 7s new_file.mpg4 but it complains of .


The option that you want is -ss not -s; as they do two different things.
_________________
Knute
----------
The human race has one really effective weapon, and that is laughter.
-- Mark Twain

If you want proof of that, take a look at windows sometime. :)
Back to top
View user's profile Send private message
dman777
l33t
l33t


Joined: 10 Jan 2007
Posts: 737

PostPosted: Sun Oct 06, 2013 1:44 pm    Post subject: Reply with quote

Knute wrote:
dman777 wrote:


Thanks. I am trying ffmpeg -s 01:20:12 -i movie.mpg4 -t 7s new_file.mpg4 but it complains of .


The option that you want is -ss not -s; as they do two different things.


My bad, thanks! I seem to have a new issue:

Code:
localhost movies # ffmpeg -ss 01:14:10 -i grandmasboy.mp4 -t 7 try.mpg4
ffmpeg version 1.0.7 Copyright (c) 2000-2013 the FFmpeg developers
  built on Oct  5 2013 14:13:46 with gcc 4.6.3 (Gentoo 4.6.3 p1.13, pie-0.5.2)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-O2 -pipe' --extra-cflags='-O2 -pipe' --extra-cxxflags='-O2 -pipe' --disable-static --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --disable-stripping --disable-debug --disable-doc --disable-network --disable-vaapi --disable-vdpau --disable-ffplay --disable-runtime-cpudetect --enable-gnutls --enable-libmp3lame --disable-indev=v4l2 --disable-indev=oss --disable-indev=jack --enable-x11grab --disable-outdev=oss --disable-outdev=sdl --enable-libfreetype --disable-amd3dnow --disable-amd3dnowext --disable-altivec --disable-avx --disable-mmxext --disable-ssse3 --disable-vis --disable-neon --enable-hardcoded-tables
  libavutil      51. 73.101 / 51. 73.101
  libavcodec     54. 59.100 / 54. 59.100
  libavformat    54. 29.104 / 54. 29.104
  libavdevice    54.  2.101 / 54.  2.101
  libavfilter     3. 17.100 /  3. 17.100
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'grandmasboy.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2013-09-29 21:09:33
    encoder         : HandBrake 0.9.9 2013051800
  Duration: 01:34:08.93, start: 0.000000, bitrate: 15350 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 720x364 [SAR 32:27 DAR 640:273], 15185 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
    Metadata:
      creation_time   : 2013-09-29 21:09:33
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 159 kb/s
    Metadata:
      creation_time   : 2013-09-29 21:09:33
[NULL @ 0x2382b10] Unable to find a suitable output format for 'try.mpg4'
try.mpg4: Invalid argument
localhost movies #



Here's how I have it compiled:
Code:
[ebuild   R    ] media-video/ffmpeg-1.0.7  USE="X alsa bindist bzip2 encode gnutls hardcoded-tables mmx mp3 truetype zlib -3dnow -3dnowext -aac -aacplus (-altivec) -amr -avx -bluray -cdio (-celt) -cpudetection -debug -doc -examples -faac -fdk -flite -fontconfig -frei0r -gsm -iec61883 -ieee1394 -jack -jpeg2k -libass -libcaca -libv4l -mmxext -modplug (-neon) -network -openal -openssl -opus -oss -pic -pulseaudio -rtmp -schroedinger -sdl -speex -ssse3 -static-libs {-test} -theora -threads -twolame -v4l -vaapi -vdpau (-vis) -vorbis -vpx -x264 -xvid" FFTOOLS="aviocat cws2fws ffeval fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart trasher" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

 * IMPORTANT: 6 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.

localhost movies #


I don't see a flag for a mpg4...am I still missing a use flag? Or is the issue something else I am doing wrong?
Back to top
View user's profile Send private message
Knute
Guru
Guru


Joined: 28 Jun 2004
Posts: 362
Location: Fargo, ND

PostPosted: Sun Oct 06, 2013 4:24 pm    Post subject: Reply with quote

In looking at the use descriptions it looks like you need the xvid flag enabled for mpeg-4,
_________________
Knute
----------
The human race has one really effective weapon, and that is laughter.
-- Mark Twain

If you want proof of that, take a look at windows sometime. :)
Back to top
View user's profile Send private message
dman777
l33t
l33t


Joined: 10 Jan 2007
Posts: 737

PostPosted: Wed Oct 16, 2013 10:10 pm    Post subject: Reply with quote

Knute wrote:
In looking at the use descriptions it looks like you need the xvid flag enabled for mpeg-4,


Thanks! That worked. However, the quality of the cut version is kinda low and blocky. Is there a way I can keep the quality to the source?
Back to top
View user's profile Send private message
Knute
Guru
Guru


Joined: 28 Jun 2004
Posts: 362
Location: Fargo, ND

PostPosted: Wed Oct 16, 2013 11:01 pm    Post subject: Reply with quote

There should be options for those things. The ffmpeg man page is very good about those options.

Sorry to say RTFM, but that's where it comes to. If the pager that you are using has a search function, it makes it easier to find what you are looking for.

That being said, you may want to look at both bitrate and bufsize; it also looks like you can specify FPS as well.
_________________
Knute
----------
The human race has one really effective weapon, and that is laughter.
-- Mark Twain

If you want proof of that, take a look at windows sometime. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum