5

When splitting video, it's not starting from the 0th second. I followed the syntax I read in many posts, e.g.:

ffmpeg -ss 00:00:00 -t 00:00:15 -i 'Wildlife.wmv' '1.wmv'
ffmpeg -i 'Wildlife.wmv' -ss 00:00:00 -t 00:00:15 '1.wmv'
ffmpeg -ss 00:00:00 -i 'Wildlife.wmv'  -t 00:00:15 '1.wmv'

With none of the above commands I'm able to split a video from the beginning to 15 seconds.

ffmpeg-php version string: 0.6.0-svn
ffmpeg-php build date string: Mar  7 2013 16:54:24
libavcodec build number: 3426306
libavcodec version number: 3426306

@mark4o please see below output of console

[root@phpweb ~]# ffmpeg -i Wildlife.wmv -ss 0 -t 15 -acodec copy -vcodec copy  1.wmv 2>&1
FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
  built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.19. 0 /  1.19. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0

Seems stream 1 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 29.97 (30000/1001) Input #0, asf, from 'Wildlife.wmv': Metadata: SfOriginalFPS : 299 WMFSDKVersion : 11.0.6001.7000 WMFSDKNeeded : 0.0.0.0000 IsVBR : 0 title : Wildlife in HD author : copyright : © 2008 Microsoft Corporation comment : Footage: Small World Productions, Inc; Tourism New Zealand | Producer: Gary F. Spradling | Music: Steve Ball Duration: 00:00:30.09, start: 8.000000, bitrate: 6977 kb/s Stream #0.0: Audio: wmav2, 44100 Hz, 2 channels, s16, 192 kb/s Stream #0.1: Video: vc1, yuv420p, 1280x720, 29.97 tbr, 1k tbn, 1k tbc File '1.wmv' already exists. Overwrite ? [y/N] y Output #0, asf, to '1.wmv': Metadata: WM/EncodingSettings: Lavf52.64.2 Stream #0.0: Video: WVC1 / 0x31435657, yuv420p, 1280x720, q=2-31, 1k tbn, 1k tbc Stream #0.1: Audio: wmav2, 44100 Hz, 2 channels, 192 kb/s Stream mapping: Stream #0.1 -> #0.0 Stream #0.0 -> #0.1 Press [q] to stop encoding frame= 901 fps= 0 q=-1.0 Lsize= 25467kB time=15.10 bitrate=13812.4kbits/s
video:24743kB audio:366kB global headers:0kB muxing overhead 1.423340%

4
  • 1
    Please include the complete ffmpeg console output. (Use the {} preformatted text button for commands and output.)
    – mark4o
    Commented Mar 9, 2013 at 17:12
  • It's not clear what the actual problem is. What happens instead? Does the video start from another timestamp? Does it convert at all? Do you get any errors? (If you're really using version 0.6.0, then I suggest you update to a more recent one though, just in case. 0.6.0 was released in June 2010.)
    – slhck
    Commented Mar 9, 2013 at 21:36
  • @slhck above syntax give me full video instead of 15 sec video from beginning.
    – Smit Shah
    Commented Mar 11, 2013 at 5:05
  • From your output it looks like it actually only encoded 15.10 seconds. Please try with a more recent version of FFmpeg. There's no point in trying to troubleshoot software that has had thousands of bugs fixed since then.
    – slhck
    Commented Mar 11, 2013 at 7:06

1 Answer 1

-1

Try this

ffmpeg -i Wildlife.wmv -ss 0 -t 15 -c copy 1.wmv 2>&1
4
  • Care to expand on how this will help? Commented Mar 9, 2013 at 20:22
  • @Ahmet Ka got error Unrecognized option 'c'
    – Smit Shah
    Commented Mar 11, 2013 at 5:03
  • @AhmetKa not working :(
    – Smit Shah
    Commented Mar 11, 2013 at 5:48
  • @AhmetKa which is the working version for splitting video because as far as i know it's not working on 0.6 :) , On which version you are working on??
    – Smit Shah
    Commented Mar 11, 2013 at 6:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .