VideoHelp Forum




+ Reply to Thread
Results 1 to 9 of 9
  1. I will start off by saying I am a noob when it comes to video converting and whatnot. I appreciate any help I can get. BTW, I did a search on "ffmpeg stutter", "ffmpeg choppy", etc. and can't find anything that matches my issue. With that said, here is my dilemma:

    Using Windows 7 Pro

    I have MPEG2 files ranging from 4GB - 10GB. They are 720x480 NTSC, 4000kb, 29.97, Audio @ 48000Hz, MP2 128k. I want to split those MPEG2 files up VIA THE COMMAND-LINE so they can fit on conventional DVD's without re-encoding anything. I know FFMPEG can do this that is why it is so frustrating for me. What I have tried:

    MPGTX - Can't handle large files
    SolveigMM Video Splitter - Works but costs money and I am looking to do this on like 50 computers so I'd rather not pay so much for 1 small feature.
    MPEG Cutter from SPGSoft - This uses a Windows build of ffmpeg and works perfectly, but it has no command line interface. It uses a build from 1/13/2009.
    ffmpeg - I have the latest build for Windows and I can't for the life of me make it produce a video that doesn't stutter every second. I've tried playback in 3 different players and the stutter follows. I have to be missing something in my command to ffmpeg that is causing the video to not process correctly. I know for a fact that the original MPEG2 files are good because I can play them back with no problems.

    Here are the ffmpeg commands I have tried (Just test numbers that guarantee issues):

    ffmpeg -vcodec copy -acodec copy -ss 0 -t 360 -y -i test4.mpg out.mpg
    ffmpeg -vcodec copy -acodec copy -qscale 1 -ss 0 -t 360 -y -i test4.mpg out.mpg
    ffmpeg -vcodec copy -acodec copy -g 15 -ss 0 -t 360 -y -i test4.mpg out.mpg
    etc etc.

    It splits the video just fine, but it stutters every second or so all through the video. VLC makes the stutter even worse than WMP. Any suggestions would be GREATLY appreciated. Thanks.
    Quote Quote  
  2. Member hech54's Avatar
    Join Date
    Jul 2001
    Location
    Yank in Europe
    Search PM
    If you weren't so hung up on command line stuff I'd have several recommendations.
    Quote Quote  
  3. Sorry, pretty set on using ffmpeg via the command line.

    Okay, after digging some more and getting lucky with search terms, I have found a couple things that hopefully are getting me somewhere. Let's just say I am maybe learning some things. Did an ffmpeg -i on the original MPEG2 file, and then the one that ffmpeg creates and this is what I get:

    Original file:
    Code:
    FFmpeg version SVN-r25512, Copyright (c) 2000-2010 the FFmpeg developers
      built on Oct 18 2010 04:06:45 with gcc 4.4.2
      configuration: --enable-gpl --enable-version3 --enable-libgsm --enable-pthread
    s --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libmp3lame --
    enable-libopenjpeg --enable-libschroedinger --enable-libopencore_amrwb --enable-
    libopencore_amrnb --enable-libvpx --arch=x86 --enable-runtime-cpudetect --enable
    -libxvid --enable-libx264 --extra-libs='-lx264 -lpthread' --enable-librtmp --ext
    ra-libs='-lrtmp -lpolarssl -lws2_32 -lwinmm' --target-os=mingw32 --enable-avisyn
    th --cross-prefix=i686-mingw32- --cc='ccache i686-mingw32-gcc' --enable-memalign
    -hack
      libavutil     50.32. 3 / 50.32. 3
      libavcore      0. 9. 1 /  0. 9. 1
      libavcodec    52.92. 0 / 52.92. 0
      libavformat   52.83. 0 / 52.83. 0
      libavdevice   52. 2. 2 / 52. 2. 2
      libavfilter    1.52. 0 /  1.52. 0
      libswscale     0.12. 0 /  0.12. 0
    [mpeg @ 003bc040] Invalid timestamps stream=0, pts=0, dts=8589931589, size=1993
    [mpeg @ 003bc040] max_analyze_duration reached
    Input #0, mpeg, from 'test4.mpg':
      Duration: 34:18:30.41, start: 0.000000, bitrate: 728 kb/s
        Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480 [PAR 32:27 DAR 16:9]
    , 104857 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
        Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, 2 channels, s16, 128 kb/s
    At least one output file must be specified
    ffmpeg created file:
    Code:
    FFmpeg version SVN-r25512, Copyright (c) 2000-2010 the FFmpeg developers
      built on Oct 18 2010 04:06:45 with gcc 4.4.2
      configuration: --enable-gpl --enable-version3 --enable-libgsm --enable-pthread
    s --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libmp3lame --
    enable-libopenjpeg --enable-libschroedinger --enable-libopencore_amrwb --enable-
    libopencore_amrnb --enable-libvpx --arch=x86 --enable-runtime-cpudetect --enable
    -libxvid --enable-libx264 --extra-libs='-lx264 -lpthread' --enable-librtmp --ext
    ra-libs='-lrtmp -lpolarssl -lws2_32 -lwinmm' --target-os=mingw32 --enable-avisyn
    th --cross-prefix=i686-mingw32- --cc='ccache i686-mingw32-gcc' --enable-memalign
    -hack
      libavutil     50.32. 3 / 50.32. 3
      libavcore      0. 9. 1 /  0. 9. 1
      libavcodec    52.92. 0 / 52.92. 0
      libavformat   52.83. 0 / 52.83. 0
      libavdevice   52. 2. 2 / 52. 2. 2
      libavfilter    1.52. 0 /  1.52. 0
      libswscale     0.12. 0 /  0.12. 0
    [mpeg @ 0184c040] max_analyze_duration reached
    
    Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/
    1001) -> 30000.00 (30000/1)
    Input #0, mpeg, from 'out.mpg':
      Duration: 00:05:59.99, start: 1.000000, bitrate: 4483 kb/s
        Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480 [PAR 32:27 DAR 16:9]
    , 104857 kb/s, 29.97 fps, 30k tbr, 90k tbn, 59.94 tbc
        Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, 2 channels, s16, 128 kb/s
    At least one output file must be specified
    In the file created I'm a little curious as to what
    Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/
    1001) -> 30000.00 (30000/1)
    this means. No matter what I set the target frame rate to I get this little info message.

    I found a post with a similar issue but I'm not sure if it applies to what I'm having issues with: https://forum.videohelp.com/threads/311749-Autodesk-Wiretap-Central-(ffmpeg-based)-4-1-issue

    The poster talks about a cadence of 2:3 and 4:1. Not totally sure what that means. Again, I appreciate any help.
    Quote Quote  
  4. Member hech54's Avatar
    Join Date
    Jul 2001
    Location
    Yank in Europe
    Search PM
    https://www.videohelp.com/tools/MPEG-VCR
    1.35MB download - Trialware (fully functional for 30 days) and only $19 after that...and you'd be done my now.
    Quote Quote  
  5. Thanks for the suggestion. You are quite good at finding tools. Unfortunately the command line tool just opens up the main program (GUI) and starts the encoding. I guess I should have been more specific with my request. I am trying to hide any output. So this program needs to run hidden in the background. Tis why ffmpeg is so attractive. Again, thank you for your help. The tool you recommended is actually pretty good at cutting up MPEGs via the GUI interface.
    Quote Quote  
  6. hope your problem might by solved by hech54 suggestion for MPEG-VCR, as Womble products are really good.
    second, it is most difficult to figure out for ffmpeg which particular version is not buggy.
    Quote Quote  
  7. Might have found the bigger problem. Looking like it probably has to do with the way that my MPEG file is encoded. I found an MPEG2 file that splits correctly and without stuttering.

    Media Info of original file that splits correctly using the command "ffmpeg -vcodec copy -acodec copy -ss 0 -t 360 -y -i test3.mpg out.mpg":
    Code:
    General
    Complete name                    : test3.mpg
    Format                           : MPEG-PS
    File size                        : 13.7 GiB
    Duration                         : 4h 16mn
    Overall bit rate                 : 7 633 Kbps
    
    Video
    ID                               : 224 (0xE0)
    Format                           : MPEG Video
    Format version                   : Version 2
    Format profile                   : Main@Main
    Format settings, BVOP            : Yes
    Format settings, Matrix          : Default
    Format settings, GOP             : M=3, N=15
    Duration                         : 4h 16mn
    Bit rate mode                    : Constant
    Bit rate                         : 6 000 Kbps
    Width                            : 720 pixels
    Height                           : 480 pixels
    Display aspect ratio             : 4:3
    Frame rate                       : 29.970 fps
    Standard                         : PAL
    Color space                      : YUV
    Chroma subsampling               : 4:2:0
    Bit depth                        : 8 bits
    Scan type                        : Progressive
    Compression mode                 : Lossy
    Bits/(Pixel*Frame)               : 0.579
    Stream size                      : 10.6 GiB (78%)
    
    Audio
    ID                               : 160 (0xA0)
    Format                           : PCM
    Format settings, Endianness      : Big
    Format settings, Sign            : Signed
    Muxing mode                      : DVD-Video
    Duration                         : 4h 16mn
    Bit rate mode                    : Constant
    Bit rate                         : 1 536 Kbps
    Channel(s)                       : 2 channels
    Channel positions                : Front: L R
    Sampling rate                    : 48.0 KHz
    Bit depth                        : 16 bits
    Delay relative to video          : -22ms
    Stream size                      : 2.75 GiB (20%)
    Media Info of file that is getting stutters when split with "ffmpeg -vcodec copy -acodec copy -ss 0 -t 360 -y -i test4.mpg out.mpg":
    Code:
    General
    Complete name                    : test4.mpg
    Format                           : MPEG-PS
    File size                        : 10.5 GiB
    Overall bit rate                 : 0
    
    Video
    ID                               : 224 (0xE0)
    Format                           : MPEG Video
    Format version                   : Version 2
    Format profile                   : Main@Main
    Format settings, BVOP            : Yes
    Format settings, Matrix          : Default
    Format settings, GOP             : M=3, N=18
    Duration                         : 7h 47mn
    Bit rate mode                    : Variable
    Width                            : 720 pixels
    Height                           : 480 pixels
    Display aspect ratio             : 16:9
    Frame rate                       : 29.970 fps
    Standard                         : NTSC
    Color space                      : YUV
    Chroma subsampling               : 4:2:0
    Bit depth                        : 8 bits
    Scan type                        : Progressive
    Compression mode                 : Lossy
    
    Audio
    ID                               : 192 (0xC0)
    Format                           : MPEG Audio
    Format version                   : Version 1
    Format profile                   : Layer 2
    Duration                         : -18h 42mn
    Bit rate mode                    : Constant
    Bit rate                         : 128 Kbps
    Channel(s)                       : 2 channels
    Sampling rate                    : 48.0 KHz
    Compression mode                 : Lossy
    Delay relative to video          : 26h 30mn
    Stream size                      : 2.05 ?iB
    Unfortunately I don't know how to force a constant bitrate. Using "-b 4000k" has no effect if used in the above ffmpeg command. Grr... Getting somewhere I guess. I can say that audio file associated with the video causing problems looks jacked up. seriously jacked up. Hmm...
    Quote Quote  
  8. I don't think it has anything to do with the vbr.
    You can't set bit rate when copying.

    Read the FFmpeg documentation: http://www.ffmpeg.org/ffmpeg-doc.html#SEC1
    You need to use the command line properly.

    "
    The generic syntax is:
    ffmpeg [[infile options][`-i' infile]]... {[outfile options] outfile}... "

    Your command line should look somethin like this:

    "ffmpeg -ss hh:mms -t hh:mms -i test3.mpg -vcodec copy -acodec copy -f vob -y out.mpg"

    CaptnBlack
    Quote Quote  
  9. I guess what I see as being different between the two files is that the one that splits correctly is a CBR while the one that stutters is a VBR. The audio file definition for the mpeg causing problems is also really whacked. I think the real problem comes down to the MPEG file that I am generating. Doesn't look like an ffmpeg issue per say. While the VBR file plays back fine, ffmpeg doesn't seem like it knows what to do with it. I may have just figured my problem out. Not the answer I wanted, but it's something. Thanks for the help.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!