VideoHelp Forum
+ Reply to Thread
Results 1 to 30 of 30
Thread
  1. Member
    Join Date
    May 2014
    Location
    Planet Earth
    Search PM
    Hi folks,

    Following on from my previous thread (here), I am hoping to re-encode 800 video clips which are 3 hours and 4 minutes combined and 11.7 GB in size from my friends camera and fit them onto 2 DVD's (no authoring or menu's required, just pure video footage).

    GSpot gives the following info on the codec of the clips:

    Code:
     Container
    DVD "VOB" format
    MPEG-2 Program Stream << { 1 vid, 1 aud }
    Sys Bitrate: 10080 kb/s VBR
    
    Video
    Codec: MPEG2
    FPS: 25
    WxD: 720 x 576
    Average birate: 8804
    
    Audio
    Codec: AC3
    Info: 0xbd[0x80]:48000Hz 256 kb/s tot , stereo (2/0)
    I have a .txt. file with paths to all the clips and I am using this command in ffmpeg:

    Code:
    ffmpeg -f concat -i d:\video\mylist.txt -c copy d:\video\output.mpg
    The result is 10s of errors every second (see below) and the output video freezing on the first frame and not playing any longer than 7 seconds:

    Code:
    [mpeg @ 00000000055fe720] buffer underflow st=1 bufi=37828 size=66833
    [mpeg @ 00000000055fe720] buffer underflow st=1 bufi=39865 size=66833
    [mpeg @ 00000000055fe720] packet too large, ignoring buffer limits to mux it
    [mpeg @ 00000000055fe720] buffer underflow st=1 bufi=39865 size=66833
    [mpeg @ 00000000055fe720] buffer underflow st=1 bufi=41902 size=66833
    [mpeg @ 00000000055fe720] packet too large, ignoring buffer limits to mux it
    I have no previous experience in video encoding and would appreciate assistance.
    Quote Quote  
  2. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    DVD Authoring should be done in software specifically made for this purpose; ffmpeg is not.

    A "DVD Video" is more than just one movie, most of all it is a logical structure. More than just a concatenated clip sequence. I would not even be certain if ffmpeg knows that all these clips should be treated as DVD Video compatible while remultiplexing.

    By the way, many good DVD authoring tools prefer elementary video and audio streams.
    Quote Quote  
  3. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Try this ...

    Code:
    ffmpeg -f concat -i d:\video\mylist.txt -c:v copy -c:a copy -f vob d:\video\output.mpg
    You now only copy the video stream and FFmpeg re-encodes the audio stream to its default settings. Also FFmpeg always expects -f vob with mpeg2video streams.

    EDIT:

    Wrong!! FFmpeg copies both audio and video with -c copy (never used it that way). Anyways -f vob should be added.
    Weird that a simple copy can cause a buffer underflow error?
    Concatinating vobs from a original dvd works fine. Seems the camera delivers its own mpeg2 format?
    Last edited by Chris K; 15th May 2014 at 14:49. Reason: typo in code c:a should be -c:a
    Quote Quote  
  4. Member
    Join Date
    May 2014
    Location
    Planet Earth
    Search PM
    LigH - the problem is I have 800 clips. I have tried many DVD authoring software which cannot handle all these clips. I've made a .txt file which ffmpeg can parse with paths to all the 800 clips. Taking aside the ethics of a DVD being structured, getting all these clips without major errors would be a big hurdle.

    Chris - Thanks. I've tried your command, unfortunately ffmpeg throws up the same errors

    Code:
    [vob @ 0000000005496900] packet too large, ignoring buffer limits to mux it
    [vob @ 0000000005496900] buffer underflow st=1 bufi=20865 size=32378
    [vob @ 0000000005496900] buffer underflow st=1 bufi=22885 size=32378
    [vob @ 0000000005496900] packet too large, ignoring buffer limits to mux it
    [vob @ 0000000005496900] buffer underflow st=1 bufi=22885 size=32378
    [vob @ 0000000005496900] buffer underflow st=1 bufi=24905 size=32378
    [vob @ 0000000005496900] packet too large, ignoring buffer limits to mux it
    [vob @ 0000000005496900] buffer underflow st=1 bufi=24905 size=32378
    [vob @ 0000000005496900] buffer underflow st=1 bufi=26925 size=32378
    [vob @ 0000000005496900] packet too large, ignoring buffer limits to mux it
    [vob @ 0000000005496900] buffer underflow st=1 bufi=26925 size=32378
    [vob @ 0000000005496900] buffer underflow st=1 bufi=28945 size=32378
    [vob @ 0000000005496900] packet too large, ignoring buffer limits to mux it
    [vob @ 0000000005496900] buffer underflow st=1 bufi=28945 size=32378
    [vob @ 0000000005496900] buffer underflow st=1 bufi=30965 size=32378
    [vob @ 0000000005496900] packet too large, ignoring buffer limits to mux it
    [vob @ 0000000005496900] buffer underflow st=1 bufi=30965 size=32378
    [vob @ 0000000005496900] buffer underflow st=1 bufi=2622 size=96508
    [vob @ 0000000005496900] packet too large, ignoring buffer limits to mux it
    [vob @ 0000000005496900] buffer underflow st=1 bufi=2622 size=96508
    [vob @ 0000000005496900] buffer underflow st=1 bufi=4642 size=96508
    [vob @ 0000000005496900] packet too large, ignoring buffer limits to mux it
    [vob @ 0000000005496900] buffer underflow st=1 bufi=4642 size=96508
    [vob @ 0000000005496900] buffer underflow st=1 bufi=6662 size=96508
    Quote Quote  
  5. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by rookieauthor View Post
    Chris - Thanks. I've tried your command, unfortunately ffmpeg throws up the same errors
    You could try to add -bufsize 1835k which is the common buffer size for vobs. I did a experiment by reducing the buffer size and look what I've got...

    Code:
    [vob @ 02f22d60] buffer underflow st=0 bufi=8065 size=8900
    [vob @ 02f22d60] packet too large, ignoring buffer limits to mux it
    [vob @ 02f22d60] buffer underflow st=0 bufi=8065 size=8900
    [vob @ 02f22d60] buffer underflow st=0 bufi=8312 size=8900
    [vob @ 02f22d60] packet too large, ignoring buffer limits to mux it
    [vob @ 02f22d60] buffer underflow st=0 bufi=8312 size=8900
    If you still got the error, increase (or decrease) the value somewhat. But note that I did the experiment with a regular dvd vob.
    Quote Quote  
  6. Member
    Join Date
    May 2014
    Location
    Planet Earth
    Search PM
    Nope still no dice

    Code:
    [concat @ 0000000002b289a0] Estimating duration from bitrate, this may be inaccurate
    Input #0, concat, from 'd:\video\mylist.txt':
      Duration: 00:00:00.75, start: 0.000000, bitrate: 255 kb/s
        Stream #0:0: Audio: ac3, 48000 Hz, stereo, fltp, 256 kb/s
        Stream #0:1: Video: mpeg2video (Main), yuv420p(tv), 720x576 [SAR 64:45 DAR 1
    6:9], max. 9100 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    File 'd:\video\output.mpg' already exists. Overwrite ? [y/N]
    Quote Quote  
  7. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by rookieauthor View Post
    Nope still no dice

    Code:
    [concat @ 0000000002b289a0] Estimating duration from bitrate, this may be inaccurate
    Input #0, concat, from 'd:\video\mylist.txt':
      Duration: 00:00:00.75, start: 0.000000, bitrate: 255 kb/s
        Stream #0:0: Audio: ac3, 48000 Hz, stereo, fltp, 256 kb/s
        Stream #0:1: Video: mpeg2video (Main), yuv420p(tv), 720x576 [SAR 64:45 DAR 1
    6:9], max. 9100 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    File 'd:\video\output.mpg' already exists. Overwrite ? [y/N]
    I don't know what you exactly want to say with this code but you should add -y to the command line to automatically overwrite old exsiting output files. Then the batch would continue. If it is something else, please give more details.
    Quote Quote  
  8. Member
    Join Date
    May 2014
    Location
    Planet Earth
    Search PM
    Sorry my bad, I pasted the wrong log. The above is before I press Y, after is still bucket loads of errors per second:

    Code:
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=53664 size=95551
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=53664 size=95551
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=55684 size=95551
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=55684 size=95551
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=57704 size=95551
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=57704 size=95551
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=59724 size=95551
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=59724 size=95551
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=61744 size=95551
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=61744 size=95551
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=63764 size=95551
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=63764 size=95551
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=65784 size=95551
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=65784 size=95551
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=67804 size=95551
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=67804 size=95551
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=69824 size=95551
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=69824 size=95551
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=71844 size=95551
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=71844 size=95551
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=73864 size=95551
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=73864 size=95551
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=75884 size=95551
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=75884 size=95551
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=77904 size=95551
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=77904 size=95551
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=79924 size=95551
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=79924 size=95551
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=81944 size=95551
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=81944 size=95551
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=83964 size=95551
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=83964 size=95551
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=85984 size=95551
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=85984 size=95551
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=87986 size=95551
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=87986 size=95551
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=90006 size=95551
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=90006 size=95551
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=92026 size=95551
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=92026 size=95551
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=94046 size=95551
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=94046 size=95551
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=510 size=33057
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=2530 size=33057
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=2530 size=33057
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=4550 size=33057
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=4550 size=33057
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=6570 size=33057
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=6570 size=33057
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=8590 size=33057
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=8590 size=33057
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=10610 size=33057
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=10610 size=33057
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=12630 size=33057
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=12630 size=33057
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=14650 size=33057
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=14650 size=33057
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=16670 size=33057
    [vob @ 000000000562f7a0] packet too large, ignoring buffer limits to mux it
    [vob @ 000000000562f7a0] buffer underflow st=1 bufi=16670 size=33057
    Quote Quote  
  9. Originally Posted by rookieauthor View Post
    I have tried many DVD authoring software which cannot handle all these clips.
    So don't author it. Just join and encode for DVD compliant MPEG-2 video and whatever audio you're making. Take the elementary streams later and author using Muxman or something.
    DVD "VOB" format
    MPEG-2 Program Stream << { 1 vid, 1 aud }
    Sys Bitrate: 10080 kb/s VBR

    Video
    Codec: MPEG2
    FPS: 25
    WxD: 720 x 576
    Average birate: 8804

    Audio
    Codec: AC3
    Info: 0xbd[0x80]:48000Hz 256 kb/s tot , stereo (2/0)
    Is there a max bitrate being set? I suspect the max video bitrates are too high or ffmpeg doesn't keep to what you set and they spike too high.
    Quote Quote  
  10. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    It would be interesting to know the gop size of the source clips since the clips are from a camera, not a dvd. MediaInfo can show that.

    Format settings, GOP : M=3, N=12

    Above the gop size of a original dvd vob. I'm not sure but I thought gop size and buffer size are related in some way.
    Quote Quote  
  11. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Which application or device created these clips, you say? With such an amount of errors, I doubt they have ever been DVD Video compliant. There must be a reason why authoring tools would reject them, and even a barely DVD range checking tool like ffmpeg discovers oddities.
    Quote Quote  
  12. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Yes, could you put aside Gspot (which hasn't been updated in 7 years) and show us a detailed MediaInfo text readout of one or more of those files? I think that would point to the right solution path.

    Scott
    Quote Quote  
  13. Analyze video (one of this you trying to concatenate) with ffprobe - i afraid that something is tricky with mpeg2 max bitrate

    Code:
    @ffprobe -v quiet -pretty -print_format json -show_entries "format=size,bit_rate:frame=coded_picture_number,pkt_pts_time,pkt_pts,pkt_dts_time,pkt_dts,pkt_duration_time,pict_type,interlaced_frame,top_field_first,repeat_pict,width,height,sample_aspect_ratio,display_aspect_ratio,r_frame_rate,avg_frame_rate,time_base,pkt_size" -select_streams v:0 %1 > %1.json
    Quote Quote  
  14. Member
    Join Date
    May 2014
    Location
    Planet Earth
    Search PM
    manono - My idea was to re-encode all the clips first. Having never used ffmpeg before, looks like the command I was given in the previous thread copies the streams and no, I didn't add max bitrate, just -bufsize 1835k as Chris advised.

    Scott - See below buddy, takes from the first 3 clips

    Code:
    General
    Complete name                            : D:\Video\M2U01219.MPG
    Format                                   : MPEG-PS
    File size                                : 5.34 MiB
    Duration                                 : 4s 800ms
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 9 339 Kbps
    
    Video
    ID                                       : 224 (0xE0)
    Format                                   : MPEG Video
    Format version                           : Version 2
    Format profile                           : Main@Main
    Format settings, BVOP                    : Yes
    Format settings, Matrix                  : Custom
    Format settings, GOP                     : M=3, N=12
    Duration                                 : 4s 720ms
    Bit rate mode                            : Variable
    Bit rate                                 : 8 897 Kbps
    Maximum bit rate                         : 9 100 Kbps
    Width                                    : 720 pixels
    Height                                   : 576 pixels
    Display aspect ratio                     : 16:9
    Frame rate                               : 25.000 fps
    Standard                                 : PAL
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Interlaced
    Scan order                               : Top Field First
    Compression mode                         : Lossy
    Bits/(Pixel*Frame)                       : 0.858
    Time code of first frame                 : 00:00:00:00
    Time code source                         : Group of pictures header
    Stream size                              : 5.01 MiB (94%)
    
    Audio
    ID                                       : 189 (0xBD)-128 (0x80)
    Format                                   : AC-3
    Format/Info                              : Audio Coding 3
    Mode extension                           : CM (complete main)
    Format settings, Endianness              : Big
    Muxing mode                              : DVD-Video
    Duration                                 : 4s 800ms
    Bit rate mode                            : Constant
    Bit rate                                 : 256 Kbps
    Channel(s)                               : 2 channels
    Channel positions                        : Front: L R
    Sampling rate                            : 48.0 KHz
    Bit depth                                : 16 bits
    Compression mode                         : Lossy
    Delay relative to video                  : -80ms
    Stream size                              : 150 KiB (3%)
    Code:
    General
    Complete name                            : D:\Video\M2U01220.MPG
    Format                                   : MPEG-PS
    File size                                : 23.6 MiB
    Duration                                 : 21s 120ms
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 9 384 Kbps
    
    Video
    ID                                       : 224 (0xE0)
    Format                                   : MPEG Video
    Format version                           : Version 2
    Format profile                           : Main@Main
    Format settings, BVOP                    : Yes
    Format settings, Matrix                  : Custom
    Format settings, GOP                     : M=3, N=12
    Duration                                 : 21s 40ms
    Bit rate mode                            : Variable
    Bit rate                                 : 8 941 Kbps
    Maximum bit rate                         : 9 100 Kbps
    Width                                    : 720 pixels
    Height                                   : 576 pixels
    Display aspect ratio                     : 16:9
    Frame rate                               : 25.000 fps
    Standard                                 : PAL
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Interlaced
    Scan order                               : Top Field First
    Compression mode                         : Lossy
    Bits/(Pixel*Frame)                       : 0.862
    Time code of first frame                 : 00:00:00:00
    Time code source                         : Group of pictures header
    Stream size                              : 22.4 MiB (95%)
    
    Audio
    ID                                       : 189 (0xBD)-128 (0x80)
    Format                                   : AC-3
    Format/Info                              : Audio Coding 3
    Mode extension                           : CM (complete main)
    Format settings, Endianness              : Big
    Muxing mode                              : DVD-Video
    Duration                                 : 21s 120ms
    Bit rate mode                            : Constant
    Bit rate                                 : 256 Kbps
    Channel(s)                               : 2 channels
    Channel positions                        : Front: L R
    Sampling rate                            : 48.0 KHz
    Bit depth                                : 16 bits
    Compression mode                         : Lossy
    Delay relative to video                  : -80ms
    Stream size                              : 660 KiB (3%)
    Code:
    General
    Complete name                            : D:\Video\M2U01221.MPG
    Format                                   : MPEG-PS
    File size                                : 7.72 MiB
    Duration                                 : 7s 200ms
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 8 993 Kbps
    
    Video
    ID                                       : 224 (0xE0)
    Format                                   : MPEG Video
    Format version                           : Version 2
    Format profile                           : Main@Main
    Format settings, BVOP                    : Yes
    Format settings, Matrix                  : Custom
    Format settings, GOP                     : M=3, N=12
    Duration                                 : 7s 120ms
    Bit rate mode                            : Variable
    Bit rate                                 : 8 558 Kbps
    Maximum bit rate                         : 9 100 Kbps
    Width                                    : 720 pixels
    Height                                   : 576 pixels
    Display aspect ratio                     : 16:9
    Frame rate                               : 25.000 fps
    Standard                                 : PAL
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Interlaced
    Scan order                               : Top Field First
    Compression mode                         : Lossy
    Bits/(Pixel*Frame)                       : 0.825
    Time code of first frame                 : 00:00:00:00
    Time code source                         : Group of pictures header
    Stream size                              : 7.26 MiB (94%)
    
    Audio
    ID                                       : 189 (0xBD)-128 (0x80)
    Format                                   : AC-3
    Format/Info                              : Audio Coding 3
    Mode extension                           : CM (complete main)
    Format settings, Endianness              : Big
    Muxing mode                              : DVD-Video
    Duration                                 : 7s 200ms
    Bit rate mode                            : Constant
    Bit rate                                 : 256 Kbps
    Channel(s)                               : 2 channels
    Channel positions                        : Front: L R
    Sampling rate                            : 48.0 KHz
    Bit depth                                : 16 bits
    Compression mode                         : Lossy
    Delay relative to video                  : -80ms
    Stream size                              : 225 KiB (3%)
    Quote Quote  
  15. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    The clip specs look ok! For re-encoding this should already do...

    Code:
    ffmpeg -f concat -i d:\video\mylist.txt -target pal-dvd -y d:\video\output.mpg
    Quote Quote  
  16. Member
    Join Date
    May 2014
    Location
    Planet Earth
    Search PM
    Seems like these clips are cursed I've given the command a go Chris but again constant errors as below:

    Code:
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    [ac3 @ 0000000002a759e0] frame sync error
    Error while decoding stream #0:0: Invalid data found when processing input
    Quote Quote  
  17. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Yeah, but this is different. It says ac3 frame sync error.

    To check out if it is the audio that causes the problem you could ad -an to the command line.

    BTW; you need to only post a few lines of the error messages.
    Quote Quote  
  18. Member
    Join Date
    May 2014
    Location
    Planet Earth
    Search PM
    Thanks for the continued support Chris. I've added the -an to command line, here is some output

    Code:
    [concat @ 00000000003188e0] DTS 402479280 < 402480000 out of order
    [concat @ 00000000003188e0] DTS 402994080 < 402994800 out of order
    [concat @ 00000000003188e0] DTS 403768080 < 403768800 out of order
    frame=  119 fps=4.4 q=4.3 size=    3560kB time=00:00:04.68 bitrate=6231.5kbits/s
    [concat @ 00000000003188e0] DTS 406958400 < 406959120 out of order
    frame=  119 fps=4.4 q=4.3 size=    3560kB time=00:00:04.68 bitrate=6231.5kbits/s
    [concat @ 00000000003188e0] DTS 409071600 < 409072320 out of order
    [concat @ 00000000003188e0] DTS 409500000 < 409500720 out of order
    The out of order errors appeared 40 times and ffmpeg stopped after the first clip. The output file has no audio when played in VLC
    Quote Quote  
  19. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by rookieauthor View Post
    The out of order errors appeared 40 times and ffmpeg stopped after the first clip. The output file has no audio when played in VLC
    No, -an means "no audio" and was meant for test purpose to see if the errors were only caused by the audio stream. Unfortunately it seems not. I would first try to convert one single clip to see what that does.

    Code:
    ffmpeg -i d:\video\clip_001.mpg -target pal-dvd -y d:\video\output.mpg
    If that already generates errors you'll have to first find a solution for that.

    FFmpeg has three different concat options. What you now use is called the concat demuxer. It also has a concat protocol (forgot about the third). The protocol is used this way...

    -i concat:clip_001.mpg|clip_002.mpg|clip_003.mpg|... ... and so on.

    There is no option to do this with a text file so it would be hard to try this with 800 clips. You could try it with a few. You have to give the full path.

    http://ffmpeg.mplayerhq.hu/ffmpeg-protocols.html#concat
    Quote Quote  
  20. Member
    Join Date
    May 2014
    Location
    Planet Earth
    Search PM
    It seems like we're getting somewhere, the command in your last post converted the first clip without errors.

    Code:
    -i d:\video\clip_001.mpg -target pal-dvd -y d:\video\output.mpg
    I tried this with the second clip and again no errors. Can the above command be tweaked so it gooes through each clip in the .txt file and saves them with the same name into a different folder? If so, they should be easier to concat right?
    Quote Quote  
  21. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by rookieauthor View Post
    I tried this with the second clip and again no errors. Can the above command be tweaked so it gooes through each clip in the .txt file and saves them with the same name into a different folder? If so, they should be easier to concat right?
    Yes I think it can with a dos batch file. Not from the text file but directly from the clips folder. But it's way too long ago since I created batch files.

    There are many batch file wizzards here at vhelp and I'm sure someone can post the script for you.
    Quote Quote  
  22. Member
    Join Date
    May 2014
    Location
    Planet Earth
    Search PM
    I figured it out. Much of the leg work was done in the previous thread. I copied the complete text file with file paths into an excel spreadsheet. Pasted the data again in the next column. Then copied everything back into the .txt file. Used Notepad++ to do some copy/replacing with the above commands.

    Almost 200 files done in the last couple of minutes. Next question, once all files are done, how do I get ffmpeg to join the lot together?
    Quote Quote  
  23. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    In that "successful" script you still aren't concatenating, just "re-forming" the data to (hopefully) more strictly follow PAL DVD standards.

    If the result of all this doesn't work, I would suggest you go back to my original suggestion and demux to elementary streams. Then concatenate those, then mux together.
    Or, try concatenating and outputting a TS file, which by its very nature is more capable of handling timing & packet differences. Then you could re-wrap it to a standard Program Stream.

    Scott
    Quote Quote  
  24. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by rookieauthor View Post
    Almost 200 files done in the last couple of minutes. Next question, once all files are done, how do I get ffmpeg to join the lot together?
    Then I would go back to your first command line...

    Code:
    ffmpeg -f concat -i d:\video\mylist.txt -c copy -fflags genpts d:\video\output.mpg
    First adapt the list to the new folder if it doesn't use relative paths. Only thing I added is the -fflags genpts command which should rewrite the time stamps from zero on up. This because each single clip starts at zero again. This should avoid seeking problems.

    And then lets hope no new issues arise!

    EDIT: sorry but the command should read -fflags genpts
    Last edited by Chris K; 16th May 2014 at 16:11.
    Quote Quote  
  25. Member
    Join Date
    May 2014
    Location
    Planet Earth
    Search PM
    Scott, I was going through my other thread and saw your post from this morning. I'm sorry I overlooked one of your first posts in my other thread, it wasn't intentional. Anyway I used Chris' command from earlier

    Code:
    ffmpeg -f concat -i d:\video\mylist.txt -c:v copy -c:a copy -f vob d:\video\output.mpg
    I split the .txt files into 2 to fit each .mpg onto a DVD and now have 2 perfect files which are ready to burn. ffmpeg threw up more errors along the way

    Code:
    [NULL @ 0000000000338a20] start time for stream 0 is not set in estimate_timings
    _from_pts
    frame=92929 fps=1530 q=-1.0 size= 2966428kB time=01:01:50.55 bitrate=6549.2kbits
    [vob @ 00000000054d66c0] buffer underflow st=1 bufi=721 size=1792
    [NULL @ 0000000000338a20] start time for stream 0 is not set in estimate_timings
    _from_pts
    [vob @ 00000000054d66c0] Non-monotonous DTS in output stream 0:1; previous: 3346
    78319, current: 334678079; changing to 334678320. This may result in incorrect t
    imestamps in the output file.
    [vob @ 00000000054d66c0] buffer underflow st=1 bufi=1112 size=1792
    [NULL @ 0000000000338a20] start time for stream 0 is not set in estimate_timings
    _from_pts
        Last message repeated 1 times
    [vob @ 00000000054d66c0] buffer underflow st=1 bufi=478 size=1792
    [NULL @ 0000000000338a20] start time for stream 0 is not set in estimate_timings
    _from_pts
    [vob @ 00000000054d66c0] buffer underflow st=1 bufi=971 size=1792
    frame=93905 fps=1534 q=-1.0 size= 2997574kB time=01:02:29.43 bitrate=6549.3kbits
    frame=94174 fps=1526 q=-1.0 size= 3006082kB time=01:02:40.19 bitrate=6549.1kbits
    Thanks everyone for all their input

    **Edit**

    Just saw your post Chris, your command above gives the error below

    Code:
    ffmpeg -f concat -i d:\video\fixed\batch2.txt
     -c copy -genpts d:\video\fixed\part1.mpg
    ffmpeg version N-63128-g0aac9b7 Copyright (c) 2000-2014 the FFmpeg developers
      built on May 13 2014 22:08:26 with gcc 4.8.2 (GCC)
      configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
    isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
    le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
    e --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-
    libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libope
    njpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsox
    r --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab -
    -enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
    --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-
    libxvid --enable-decklink --enable-zlib
      libavutil      52. 83.100 / 52. 83.100
      libavcodec     55. 61.101 / 55. 61.101
      libavformat    55. 37.102 / 55. 37.102
      libavdevice    55. 13.101 / 55. 13.101
      libavfilter     4.  5.100 /  4.  5.100
      libswscale      2.  6.100 /  2.  6.100
      libswresample   0. 18.100 /  0. 18.100
      libpostproc    52.  3.100 / 52.  3.100
    Unrecognized option 'genpts'.
    Error splitting the argument list: Option not found
    Last edited by rookieauthor; 16th May 2014 at 16:12.
    Quote Quote  
  26. Member
    Join Date
    May 2014
    Location
    Planet Earth
    Search PM
    double post
    Quote Quote  
  27. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by rookieauthor View Post
    Just saw your post Chris, your command above gives the error below
    I edited the post with a correction on the command. If you encounter seeking issues, consider to redo it with the command.

    EDIT:

    You could try this to get rid of the errors (these still worry me) ...

    Code:
    ffmpeg -f concat -i d:\video\mylist.txt -c:v copy -c:a copy -bufsize 1835k -fflags genpts -f vob d:\video\output.mpg
    Last edited by Chris K; 16th May 2014 at 16:44.
    Quote Quote  
  28. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    A "buffer underflow" is not a big surprise here: The bitrates of all clips are scratching the DVD Video limits, and a VBV checking multiplexer does much more than just comparing the bitrate — it also tests the usage of an assumed decoder buffer, and this can certainly hit a limit at concatenation points, while there is no issue with the single clips.

    I have some experience from a DVD authoring studio in the past. I have seen clips with single GOP peaks at 13 Mbps being accepted by an authoring tool, and clips with single GOP peaks below 10 Mbps being rejected.

    Your consumer DVD player may or may not choke at these points, depending on the real size of its video buffer (it may be bigger for multi-format players than for legacy pure DVD players). Practice matters.
    Quote Quote  
  29. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by LigH.de View Post
    Your consumer DVD player may or may not choke at these points, depending on the real size of its video buffer (it may be bigger for multi-format players than for legacy pure DVD players). Practice matters.
    That's indeed what worried me! Also audio sync. I don't know if the OP checked this but concatinating so many clips of only a few seconds long?
    Quote Quote  
  30. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    As already said: Better let a specific DVD Authoring tool do this job. But be aware that DVD Video has its limits, regarding a number of cells and chapters per titleset.

    If nothing helps, then a reencode with a good MPEG2 encoder (e.g. HC) and slightly more conservative options (max. 8.5 Mbps) may be necessary.
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!