Find the answer to your Linux question:
Results 1 to 5 of 5
Hey All, My girl has some issues on her box with Windows Movie Maker. Thus I, Linux. Python and FFMPEG where in the help. I managed to extract the clips ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,429

    Require some FFMPEG Assistance


    Hey All,

    My girl has some issues on her box with Windows Movie Maker.
    Thus I, Linux. Python and FFMPEG where in the help.

    I managed to extract the clips she made for moviemaker from the project file.
    I managed to get the right info from this horrid file type.
    I managed to write this script:
    Code:
    #!/bin/zsh
    INPUT=meangirl.avi
    
    ffmpeg -i $INPUT -ss 87.0981898 -t 7.5569062 Jos_Bike.avi
    ffmpeg -i $INPUT -ss 170.7344429 -t 15.595673699999992 The_Plastics.avi
    ffmpeg -i $INPUT -ss 353.8754295 -t 5.759530400000017 Captured.avi
    ffmpeg -i $INPUT -ss 483.8774846 -t 3.670384599999977 Nick_Mandi_Peck.avi
    ffmpeg -i $INPUT -ss 599.6503548 -t 2.8733493000000863 Stay_Down.avi
    ffmpeg -i $INPUT -ss 760.9551191 -t 3.6800053999999136 Mandi.avi
    ffmpeg -i $INPUT -ss 837.6331127 -t 2.4046352999999954 This_is War.avi
    ffmpeg -i $INPUT -ss 843.390413 -t 2.4514394000000266 This_is_War_2.avi
    ffmpeg -i $INPUT -ss 1181.543292 -t 13.081458399999974 What_the_Guys_Think.avi
    ffmpeg -i $INPUT -ss 1278.8484595 -t 8.432500599999912 Turn_Down.avi
    ffmpeg -i $INPUT -ss 1453.2464005 -t 6.84864430000016 Milkshake_Burst.avi
    ffmpeg -i $INPUT -ss 1654.5384836 -t 7.72195929999998 Coming_Through.avi
    ffmpeg -i $INPUT -ss 1831.8371518 -t 14.222563700000137 Tyler_Blow_Kiss.avi
    ffmpeg -i $INPUT -ss 1850.2197221 -t 17.773702000000185 Soccer.avi
    ffmpeg -i $INPUT -ss 1966.2241387 -t 18.79420200000004 Date_Tomorrow.avi
    ffmpeg -i $INPUT -ss 2019.3975742 -t 20.534288500000002 Photo_Session.avi
    etc..
    But, when I try this with my movies and my shows it all just works.
    Although these files generate output I just dont understand.

    And I hope someone can point me at the right direction:
    Code:
    robin% ffmpeg -i meangirl.avi -ss 4909.2317209 -t 4.811771199999384 Tyler_root_for_Jo.avi      
    FFmpeg version git-N-28713-g65daa94, Copyright (c) 2000-2011 the FFmpeg developers
      built on May  7 2011 11:44:51 with gcc 4.6.0 20110429 (prerelease)
      configuration: --prefix=/usr --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-libx264 --enable-libvpx --enable-libtheora --enable-postproc --enable-shared --enable-x11grab --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libschroedinger --enable-libopenjpeg --enable-gpl --enable-version3 --enable-runtime-cpudetect --disable-debug
      libavutil    50. 40. 0 / 50. 40. 0
      libavcodec   52.116. 0 / 52.116. 0
      libavformat  52.104. 0 / 52.104. 0
      libavdevice  52.  4. 0 / 52.  4. 0
      libavfilter   1. 76. 0 /  1. 76. 0
      libswscale    0. 13. 0 /  0. 13. 0
      libpostproc  51.  2. 0 / 51.  2. 0
    
    Seems stream 0 codec frame rate differs from container frame rate: 23.98 (65535/2733) -> 23.98 (2500000/104271)
    Input #0, avi, from 'meangirl.avi':
      Metadata:
        encoder         : VirtualDubMod 1.5.10.2 (build 2540/release)
      Duration: 01:36:46.43, start: 0.000000, bitrate: 1010 kb/s
        Stream #0.0: Video: mpeg4, yuv420p, 720x400 [PAR 1:1 DAR 9:5], 23.98 tbr, 23.98 tbn, 23.98 tbc
        Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 128 kb/s
    [buffer @ 0x1c161b0] w:720 h:400 pixfmt:yuv420p
    [setdar @ 0x1c3b0c0] a:9/5
    [setdar @ 0x1c3b0c0] w:720 h:400 -> dar:9/5 sar:1/1
    [mpeg4 @ 0x1c26510] timebase 104271/2500000 not supported by MPEG 4 standard, the maximum admitted value for the timebase denominator is 65535
    Output #0, avi, to 'Tyler_root_for_Jo.avi':
        Stream #0.0: Video: mpeg4, yuv420p, 720x400 [PAR 1:1 DAR 9:5], q=2-31, 200 kb/s, 90k tbn, 23.98 tbc
        Stream #0.1: Audio: mp2, 48000 Hz, stereo, s16, 64 kb/s
    Stream mapping:
      Stream #0.0 -> #0.0
      Stream #0.1 -> #0.1
    Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
    Besides that I will supply that I use Arch and have the following uname -a output although this looks rather unrelated for this topic:
    Code:
    Linux cocytus 2.6.38-ARCH #1 SMP PREEMPT Tue May 3 07:40:34 CEST 2011 x86_64 Pentium(R) Dual-Core CPU T4400 @ 2.20GHz GenuineIntel GNU/Linux
    Thanks,

    Cheers,
    Robin
    New Users, please read this..
    Google first, then ask..

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,596
    Ok. You don't indicate what the problem is with converting your girlfriend's videos. Please explain.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,429
    Woops, I thought that was in there.
    I must have been very tired yesterday

    The error is:
    Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

    And as I don't set one of those parameters at all I dont get it.

    Hope the question is more clear now. Since with this error it won't make a file at all.
    New Users, please read this..
    Google first, then ask..

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,596
    AVI is just a wrapper for other formats, so you need to specify an output type for the AVI target file using an options such as -target <output type>
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,429
    Thanks that did point me at the right direction:
    I tried the following:
    Code:
    robin% ffmpeg -i meangirl.avi -ss 5207 -t 9 -r 24  -target ntsc-dvd Prom.avi
    FFmpeg version git-N-28713-g65daa94, Copyright (c) 2000-2011 the FFmpeg developers
      built on May  7 2011 11:44:51 with gcc 4.6.0 20110429 (prerelease)
      configuration: --prefix=/usr --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-libx264 --enable-libvpx --enable-libtheora --enable-postproc --enable-shared --enable-x11grab --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libschroedinger --enable-libopenjpeg --enable-gpl --enable-version3 --enable-runtime-cpudetect --disable-debug
      libavutil    50. 40. 0 / 50. 40. 0
      libavcodec   52.116. 0 / 52.116. 0
      libavformat  52.104. 0 / 52.104. 0
      libavdevice  52.  4. 0 / 52.  4. 0
      libavfilter   1. 76. 0 /  1. 76. 0
      libswscale    0. 13. 0 /  0. 13. 0
      libpostproc  51.  2. 0 / 51.  2. 0
    
    Seems stream 0 codec frame rate differs from container frame rate: 23.98 (65535/2733) -> 23.98 (2500000/104271)
    Input #0, avi, from 'meangirl.avi':
      Metadata:
        encoder         : VirtualDubMod 1.5.10.2 (build 2540/release)
      Duration: 01:36:46.43, start: 0.000000, bitrate: 1010 kb/s
        Stream #0.0: Video: mpeg4, yuv420p, 720x400 [PAR 1:1 DAR 9:5], 23.98 tbr, 23.98 tbn, 23.98 tbc
        Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 128 kb/s
    Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt'
    [buffer @ 0xa4e3b0] w:720 h:400 pixfmt:yuv420p
    [setdar @ 0xa4eab0] a:9/5
    [scale @ 0xa4e790] w:720 h:400 fmt:yuv420p -> w:720 h:480 fmt:yuv420p flags:0x4
    [setdar @ 0xa4eab0] w:720 h:480 -> dar:9/5 sar:6/5
    Output #0, dvd, to 'Prom.avi':
      Metadata:
        encoder         : Lavf52.104.0
        Stream #0.0: Video: mpeg2video, yuv420p, 720x480 [PAR 6:5 DAR 9:5], q=2-31, 6000 kb/s, 90k tbn, 29.97 tbc
        Stream #0.1: Audio: ac3, 48000 Hz, stereo, flt, 448 kb/s
    Stream mapping:
      Stream #0.0 -> #0.0
      Stream #0.1 -> #0.1
    Press ctrl-c to stop encoding
    [buffer @ 0xa4e3b0] Buffering several frames is not supported. Please consume all available frames before adding a new one.
    ^C    Last message repeated 76812 timeskB time=10000000000.00 bitrate=   0.0kbits/s    
    Buffering several frames is not supported. Please consume all available frames before adding a new one.
    [buffer @ 0xa4e3b0] Buffering several frames is not supported. Please consume all available frames before adding a new one.
    frame=    0 fps=  0 q=0.0 Lsize=       0kB time=10000000000.00 bitrate=   0.0kbits/s    
    video:0kB audio:0kB global headers:0kB muxing overhead -nan%
    Received signal 2: terminating.
    and simuliar command with result:
    Code:
    robin% ffmpeg -i meangirl.avi -ss 5207 -t 9  -target ntsc-dv Prom.avi 
    FFmpeg version git-N-28713-g65daa94, Copyright (c) 2000-2011 the FFmpeg developers
      built on May  7 2011 11:44:51 with gcc 4.6.0 20110429 (prerelease)
      configuration: --prefix=/usr --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-libx264 --enable-libvpx --enable-libtheora --enable-postproc --enable-shared --enable-x11grab --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libschroedinger --enable-libopenjpeg --enable-gpl --enable-version3 --enable-runtime-cpudetect --disable-debug
      libavutil    50. 40. 0 / 50. 40. 0
      libavcodec   52.116. 0 / 52.116. 0
      libavformat  52.104. 0 / 52.104. 0
      libavdevice  52.  4. 0 / 52.  4. 0
      libavfilter   1. 76. 0 /  1. 76. 0
      libswscale    0. 13. 0 /  0. 13. 0
      libpostproc  51.  2. 0 / 51.  2. 0
    
    Seems stream 0 codec frame rate differs from container frame rate: 23.98 (65535/2733) -> 23.98 (2500000/104271)
    Input #0, avi, from 'meangirl.avi':
      Metadata:
        encoder         : VirtualDubMod 1.5.10.2 (build 2540/release)
      Duration: 01:36:46.43, start: 0.000000, bitrate: 1010 kb/s
        Stream #0.0: Video: mpeg4, yuv420p, 720x400 [PAR 1:1 DAR 9:5], 23.98 tbr, 23.98 tbn, 23.98 tbc
        Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 128 kb/s
    File 'Prom.avi' already exists. Overwrite ? [y/N] y
    [buffer @ 0xc9b1b0] w:720 h:400 pixfmt:yuv420p
    [setdar @ 0xcb6230] a:9/5
    [scale @ 0xcb5ee0] w:720 h:400 fmt:yuv420p -> w:720 h:480 fmt:yuv411p flags:0x4
    [setdar @ 0xcb6230] w:720 h:480 -> dar:9/5 sar:6/5
    Output #0, dv, to 'Prom.avi':
      Metadata:
        encoder         : Lavf52.104.0
        Stream #0.0: Video: dvvideo, yuv411p, 720x480 [PAR 6:5 DAR 9:5], q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
        Stream #0.1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
    Stream mapping:
      Stream #0.0 -> #0.0
      Stream #0.1 -> #0.1
    Press ctrl-c to stop encoding
    [buffer @ 0xc9b1b0] Buffering several frames is not supported. Please consume all available frames before adding a new one.
    ^C    Last message repeated 15671 timeskB time=10000000000.00 bitrate=   0.0kbits/s    
    Buffering several frames is not supported. Please consume all available frames before adding a new one.
    [buffer @ 0xc9b1b0] Buffering several frames is not supported. Please consume all available frames before adding a new one.
    frame=    0 fps=  0 q=0.0 Lsize=       0kB time=10000000000.00 bitrate=   0.0kbits/s    
    video:0kB audio:0kB global headers:0kB muxing overhead -nan%
    Received signal 2: terminating.
    But I also tried pal...
    Code:
    robin% ffmpeg -i meangirl.avi -ss 5207 -t 9  -target pal-dvd Prom.avi
    FFmpeg version git-N-28713-g65daa94, Copyright (c) 2000-2011 the FFmpeg developers
      built on May  7 2011 11:44:51 with gcc 4.6.0 20110429 (prerelease)
      configuration: --prefix=/usr --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-libx264 --enable-libvpx --enable-libtheora --enable-postproc --enable-shared --enable-x11grab --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libschroedinger --enable-libopenjpeg --enable-gpl --enable-version3 --enable-runtime-cpudetect --disable-debug
      libavutil    50. 40. 0 / 50. 40. 0
      libavcodec   52.116. 0 / 52.116. 0
      libavformat  52.104. 0 / 52.104. 0
      libavdevice  52.  4. 0 / 52.  4. 0
      libavfilter   1. 76. 0 /  1. 76. 0
      libswscale    0. 13. 0 /  0. 13. 0
      libpostproc  51.  2. 0 / 51.  2. 0
    
    Seems stream 0 codec frame rate differs from container frame rate: 23.98 (65535/2733) -> 23.98 (2500000/104271)
    Input #0, avi, from 'meangirl.avi':
      Metadata:
        encoder         : VirtualDubMod 1.5.10.2 (build 2540/release)
      Duration: 01:36:46.43, start: 0.000000, bitrate: 1010 kb/s
        Stream #0.0: Video: mpeg4, yuv420p, 720x400 [PAR 1:1 DAR 9:5], 23.98 tbr, 23.98 tbn, 23.98 tbc
        Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 128 kb/s
    Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt'
    File 'Prom.avi' already exists. Overwrite ? [y/N] y
    [buffer @ 0x10c83b0] w:720 h:400 pixfmt:yuv420p
    [setdar @ 0x10c8a90] a:9/5
    [scale @ 0x10c8770] w:720 h:400 fmt:yuv420p -> w:720 h:576 fmt:yuv420p flags:0x4
    [setdar @ 0x10c8a90] w:720 h:576 -> dar:9/5 sar:36/25
    Output #0, dvd, to 'Prom.avi':
      Metadata:
        encoder         : Lavf52.104.0
        Stream #0.0: Video: mpeg2video, yuv420p, 720x576 [PAR 36:25 DAR 9:5], q=2-31, 6000 kb/s, 90k tbn, 25 tbc
        Stream #0.1: Audio: ac3, 48000 Hz, stereo, flt, 448 kb/s
    Stream mapping:
      Stream #0.0 -> #0.0
      Stream #0.1 -> #0.1
    Press ctrl-c to stop encoding
    [buffer @ 0x10c83b0] Buffering several frames is not supported. Please consume all available frames before adding a new one.
    ^C    Last message repeated 7354 times0kB time=10000000000.00 bitrate=   0.0kbits/s    
    Buffering several frames is not supported. Please consume all available frames before adding a new one.
    [buffer @ 0x10c83b0] Buffering several frames is not supported. Please consume all available frames before adding a new one.
    frame=    0 fps=  0 q=0.0 Lsize=       0kB time=10000000000.00 bitrate=   0.0kbits/s    
    video:0kB audio:0kB global headers:0kB muxing overhead -nan%
    Received signal 2: terminating.
    Similar results, yet again..
    Any other points.


    I used this topic to get a bit more insights about the issue: How can I video edit in linux? [Archive] - Ubuntu Forums
    New Users, please read this..
    Google first, then ask..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •