VideoHelp Forum

+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Hi All,

    I am using ffmpeg to convert my dv video to DVD Video. For the same I
    have used following command:

    ffmpeg -i INPUT/0000.avi -vcodec mpeg2video -r 25 -s 704x576 -b 5000
    -ab 224 -ar 48000 -ac 2 -hq -deinterlace 0000.mpg
    $ ffmpeg -i INPUT/0000.avi -vcodec
    mpeg2video -r 25 -s 704x576 -b 5000 -ab 224 -ar 48000 -ac 2 -hq
    -deinterlace 0000.mpg
    ffmpeg version 0.4.8, build 4717, Copyright (c) 2000-2004 Fabrice Bellard
    built on Jul 8 2004 17:14:40, gcc: 3.3.3 20040412 (Red Hat Linux 3.3.3-7)
    Input #0, avi, from 'INPUT/0000.avi':
    Duration: 00:14:30.4, bitrate: 29829 kb/s
    Stream #0.0: Video: dvvideo, 720x576, 25.00 fps
    Stream #0.1: Audio: pcm_s16le, 32000 Hz, stereo, 1024 kb/s
    Output #0, mpeg, to '0000.mpg':
    Stream #0.0: Video: mpeg2video (hq), 704x576, 25.00 fps, q=2-31, 5000 kb/s
    Stream #0.1: Audio: mp2, 48000 Hz, stereo, 224 kb/s
    Stream mapping:
    Stream #0.0 -> #0.0
    Stream #0.1 -> #0.1
    Press [q] to stop encoding
    AC EOB marker is absent pos=640kB time=127.0 bitrate=5248.1kbits/s
    AC EOB marker is absent pos=68
    AC EOB marker is absent pos=64
    AC EOB marker is absent pos=64
    AC EOB marker is absent pos=64
    AC EOB marker is absent pos=64
    frame= 7172 q=3.4 Lsize= 183604kB time=286.0 bitrate=5259.8kbits/s
    video:175075kB audio:7819kB global headers:0kB muxing overhead 0.388311%

    The problem that is coming up is that I dont have the full length video
    in the output file. The length of input file is 14:30 min, but that of
    output file is around 4:46 mins only. Any clues as what may be happening
    here?

    TIA.
    -McLinux
    Quote Quote  
  2. Member Forum Troll's Avatar
    Join Date
    Oct 2003
    Location
    Right behind you
    Search Comp PM
    You are in breach of the forum rules and are being banned. Do not post false information.
    /Moderator John Q. Publik
    Quote Quote  
  3. Hi Moderator,

    I was myself not sure as to which forum this question be fit into, hence in order to get most probable answers, I posrted on both the posts.

    Thanks for notifying.

    -McLinux
    Quote Quote  
  4. Well this one got fixed thorugh a patch sent by Roman.
    Thanks Roman.
    The same is given below:
    Code:
    --- /home/rs76089/tmp/ffmpeg/libavformat/avidec.c	2004-07-13 17:10:06.000000000 -0700
    +++ libavformat/avidec.c	2004-08-03 18:22:08.000000000 -0700
    @@ -49,6 +49,7 @@
         int64_t  movi_end;
         offset_t movi_list;
         int index_loaded;
    +    int is_odml;
         DVDemuxContext* dv_demux;
     } AVIContext;
     
    @@ -128,6 +129,10 @@
                     goto end_of_header;
                 }
                 break;
    +        case MKTAG('d', 'm', 'l', 'h'):
    +	    avi->is_odml = 1;
    +	    url_fskip(pb, size + (size & 1));
    +	    break;
             case MKTAG('a', 'v', 'i', 'h'):
     	    /* avi header */
                 /* using frame_period is bad idea */
    @@ -363,7 +368,8 @@
     {
         AVIContext *avi = s->priv_data;
         ByteIOContext *pb = &s->pb;
    -    int n, d[8], size, i;
    +    int n, d[8], size;
    +    offset_t i;
         void* dstr;
     
         memset(d, -1, sizeof(int)*8);
    @@ -377,19 +383,12 @@
         for(i=url_ftell(pb); !url_feof(pb); i++) {
             int j;
     
    -	if (i >= avi->movi_end) { /* Let's see if it's an OpenDML AVI */
    -	    uint32_t tag, size, tag2;
    -	    url_fskip(pb, avi->riff_end - url_ftell(pb));
    -	    if (get_riff(avi, pb) < 0)
    -	        return -1;
    -	    
    -	    tag = get_le32(pb);
    -	    size = get_le32(pb);
    -	    tag2 = get_le32(pb);
    -	    if (tag == MKTAG('L','I','S','T') && tag2 == MKTAG('m','o','v','i'))
    -	        avi->movi_end = url_ftell(pb) + size - 4; 
    -	    else
    -	        return -1;
    +	if (i >= avi->movi_end) {
    +	    if (avi->is_odml) {
    +		url_fskip(pb, avi->riff_end - i);
    +	        avi->riff_end = avi->movi_end = url_filesize(url_fileno(pb));
    +	    } else
    +	        break;
     	}
     
             for(j=0; j<7; j++)
    @@ -408,6 +407,13 @@
                 
                 url_fskip(pb, size);
             }
    +
    +	//parse JUNK
    +        if(d[0] == 'J' && d[1] == 'U' && d[2] == 'N' && d[3] == 'K' &&
    +           i + size <= avi->movi_end) {
    +            
    +            url_fskip(pb, size);
    +        }
             
             //parse ##dc/##wb
             n= (d[0] - '0') * 10 + (d[1] - '0');
    Quote Quote