[Libav-user] Q regarding ffmpeg command to change bit rate of wmv file

disha mishra disha.mishra at gmail.com
Mon Aug 8 18:04:58 CEST 2011


Hi Matt,

I can;t attach the sample file but when I do ffmpeg -i on input file I get
the following

Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: mp41mp42
    creation_time   : 2008-03-06 01:26:52
  Duration: 00:01:55.46, start: 0.000000, bitrate: 1465 kb/s
    Stream #0.0(eng): Video: h264 (Baseline), yuv420p, 176x144, 1335 kb/s,
15 fps, 15 tbr, 30k tbn, 60k tbc
    Metadata:
      creation_time   : 2008-03-06 01:26:52
    Stream #0.1(eng): Audio: aac, 44100 Hz, stereo, s16, 128 kb/s
    Metadata:
      creation_time   : 2008-03-06 01:26:52
At least one output file must be specified

Then i use the following command to change bit rate
ffmpeg -i input.mp4 -b 2000k StepOut.mp4


ffmpeg version 0.8.1, Copyright (c) 2000-2011 the FFmpeg developers
  built on Aug  2 2011 03:56:37 with gcc 4.4.3
  configuration:
  libavutil    51.  9. 1 / 51.  9. 1
  libavcodec   53.  7. 0 / 53.  7. 0
  libavformat  53.  4. 0 / 53.  4. 0
  libavdevice  53.  1. 1 / 53.  1. 1
  libavfilter   2. 23. 0 /  2. 23. 0
  libswscale    2.  0. 0 /  2.  0. 0

Seems stream 0 codec frame rate differs from container frame rate: 60000.00
(60000/1) -> 15.00 (15/1)
 Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: mp41mp42
    creation_time   : 2008-03-06 01:26:52
  Duration: 00:01:55.46, start: 0.000000, bitrate: 1465 kb/s
    Stream #0.0(eng): Video: h264 (Baseline), yuv420p, 176x144, 1335 kb/s,
15 fps, 15 tbr, 30k tbn, 60k tbc
    Metadata:
      creation_time   : 2008-03-06 01:26:52
    Stream #0.1(eng): Audio: aac, 44100 Hz, stereo, s16, 128 kb/s
    Metadata:
      creation_time   : 2008-03-06 01:26:52
[buffer @ 0x3314860] w:176 h:144 pixfmt:yuv420p tb:1/1000000 sar:0/1
sws_param:
Output #0, mp4, to 'StepOut.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: mp41mp42
    creation_time   : 2008-03-06 01:26:52
    encoder         : Lavf53.4.0
    Stream #0.0(eng): Video: mpeg4, yuv420p, 176x144, q=2-31, 2000 kb/s, 15
tbn, 15 tbc
    Metadata:
      creation_time   : 2008-03-06 01:26:52
    Stream #0.1(eng): Audio: aac, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
      creation_time   : 2008-03-06 01:26:52
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop, [?] for help
frame=  270 fps=  0 q=2.0 size=     607kB time=00:00:17.48 bitrate=
284.5kbits/sframe=  540 fps=531 q=2.0 size=    1827kB time=00:00:35.03
bitrate= 427.2kbits/sframe=  795 fps=524 q=2.0 size=    3086kB
time=00:00:52.54 bitrate= 481.1kbits/sframe= 1050 fps=520 q=2.0 size=
4409kB time=00:01:09.86 bitrate= 516.9kbits/sframe= 1320 fps=524 q=2.0
size=    5391kB time=00:01:27.51 bitrate= 504.6kbits/sframe= 1574 fps=522
q=2.0 size=    6336kB time=00:01:43.86 bitrate= 499.7kbits/sframe= 1732
fps=522 q=2.0 Lsize=    6812kB time=00:01:55.44 bitrate= 483.4kbits/s
video:5856kB audio:902kB global headers:0kB muxing overhead 0.800882%


When I do ffmpeg -i on the output file, i get the following
Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    creation_time   : 1970-01-01 00:00:00
    encoder         : Lavf53.4.0
  Duration: 00:01:55.46, start: 0.000000, bitrate: 483 kb/s
    Stream #0.0(eng): Video: mpeg4, yuv420p, 176x144 [PAR 1:1 DAR 11:9], 415
kb/s, 15 fps, 15 tbr, 15 tbn, 15 tbc
    Metadata:
      creation_time   : 1970-01-01 00:00:00
    Stream #0.1(eng): Audio: aac, 44100 Hz, stereo, s16, 63 kb/s
    Metadata:
      creation_time   : 1970-01-01 00:00:00
At least one output file must be specified


I would be really grateful if you could help.

Thanks,
Disha


On Thu, Aug 4, 2011 at 9:10 AM, Matthew Einhorn <moiein2000 at gmail.com>wrote:

> On Thu, Aug 4, 2011 at 11:50 AM, disha mishra <disha.mishra at gmail.com>
> wrote:
> > Hi Matt,
> >
> > Actually I tried to do the same thing with H264 files. I took an H264
> file
> > as input file and specifed -b with some bit rate and tried to save it in
> > same container as input file but the output file that I get is an MPEG4-2
> > file.
> >
> > Thanks,
> > Disha
> Can you post the exact command? And possibly the sample video file?
>
> Matt
> >
> > On Thu, Aug 4, 2011 at 1:35 AM, Matthew Einhorn <moiein2000 at gmail.com>
> > wrote:
> >>
> >> Running "ffmpeg -formats" list all the codecs that ffmpeg can
> >> decode/encode. If you look at vc1 you'll see that ffmpeg can only
> >> decode it not encode it. So you cannot save a file in vc1 format (I
> >> think). You'll have to select a different output format.
> >>
> >> Matt
> >>
> >> On Wed, Aug 3, 2011 at 2:33 PM, disha mishra <disha.mishra at gmail.com>
> >> wrote:
> >> > Yes I tried  -vcodec copy but that doesn't work.
> >> >
> >> > Thanks,
> >> >
> >> > On Wed, Aug 3, 2011 at 10:49 AM, Matthew Einhorn <
> moiein2000 at gmail.com>
> >> > wrote:
> >> >>
> >> >> On Wed, Aug 3, 2011 at 1:35 PM, disha mishra <disha.mishra at gmail.com
> >
> >> >> wrote:
> >> >> > Hi
> >> >> > I have a VC-1 file at Simple profile, medium level, bit rate = 236
> >> >> > kbps.
> >> >> > I
> >> >> > use the following command to change bit rate and frame rate of file
> >> >> >
> >> >> > ffmpeg -i input.wmv -b 128k -r 15 output.wmv
> >> >> >
> >> >> > When I check the information of output file, it shows a file with
> >> >> > MPEG-4
> >> >> > Visual format and codec MP43. Is there any way to produce an output
> >> >> > file
> >> >> > with the  same VC1 Simple profile, medium level information as
> input
> >> >> > file
> >> >> > using ffmpeg?
> >> >> >
> >> >> > I tried using -f vc1 switch in the command but thats only for
> having
> >> >> > raw
> >> >> > vc1
> >> >> > video output.
> >> >> >
> >> >> > Thanks,
> >> >> >
> >> >>
> >> >> Have you tried -vcodec copy? It's in the ffmpeg documentation.
> >> >>
> >> >> Matt
> >> >> >
> >> >> > _______________________________________________
> >> >> > Libav-user mailing list
> >> >> > Libav-user at ffmpeg.org
> >> >> > http://ffmpeg.org/mailman/listinfo/libav-user
> >> >> >
> >> >> >
> >> >> _______________________________________________
> >> >> Libav-user mailing list
> >> >> Libav-user at ffmpeg.org
> >> >> http://ffmpeg.org/mailman/listinfo/libav-user
> >> >
> >> >
> >> > _______________________________________________
> >> > Libav-user mailing list
> >> > Libav-user at ffmpeg.org
> >> > http://ffmpeg.org/mailman/listinfo/libav-user
> >> >
> >> >
> >> _______________________________________________
> >> Libav-user mailing list
> >> Libav-user at ffmpeg.org
> >> http://ffmpeg.org/mailman/listinfo/libav-user
> >
> >
> > _______________________________________________
> > Libav-user mailing list
> > Libav-user at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/libav-user
> >
> >
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20110808/6338d0a4/attachment.html>


More information about the Libav-user mailing list