[FFmpeg-devel] first experience with ffmpeg
Stefano Sabatini
stefano.sabatini-lala
Fri Feb 15 09:35:21 CET 2008
On date Friday 2008-02-15 02:09:19 -0500, D. Hugh Redelmeier encoded:
> As a developer, I value learning about users first exposure to a
> program. Newbies trip over things that the experienced no longer
> notice. That is why I am trying to describe my initial experiences
> with ffmpeg even if they will turn out to be embarrassing.
>
> This is going to be presented as a narrative. Large parts may be
> uninteresting. I will highlight points that I hope are worth noting
> with "===>".
[...]
> My first (recorded) use of ffmpeg:
>
> $ ffmpeg -v -i 2008.02.11-19.28.wma 2008.02.11-19.28.mp3
> FFmpeg version SVN-r8876, Copyright (c) 2000-2007 Fabrice Bellard, et al.
> configuration: --prefix=/usr --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man!
> libavutil version: 49.4.0
> libavcodec version: 51.40.4
> libavformat version: 51.12.1
> built on May 3 2007 12:41:19, gcc: 4.1.2 20070424 (Red Hat 4.1.2-11)
> File '2008.02.11-19.28.wma' already exists. Overwrite ? [y/N] n
> Not overwriting - exiting
>
> The problem is that -v takes an argument, so it "ate" the -i, leaving
> what I thought of as in input file to be treated as an output file.
> Thank goodness for the overwrite warning!
>
> ===> the ffmpeg program should diagnose malformed arguments to -v.
>
> I more carefully read the manual and tried "-v verbose" which made
> ffmpeg quiet -- pretty counterintuitive!
This happens everytime we use atoi() in ffmpeg.c. When the string is
unparsable as a string ffmpeg uses the value 0 without to warn the
user a blink.
What about the attached patch (I think there could be some trouble
from the conversion from long int to int)?
Suggested log: replace atoi() in ffmpeg.c with the parse_int_or_die()
function.
> ===> the ffmpeg manpage's description of the -v flag should explain
> that "verbose" is not a literal string but (I imagine) an integer.
> It should explain what possible values are.
Agree.
> Eventually, I converted the file to .mp3.
>
>
> I had captured an hour of radio. I wanted to extract a few minutes
> from it. I played the mp3 with xmms and wrote down the start time and
> duration of the part I wished to capture.
>
> I then used this the do the extraction
>
> $ ffmpeg -ss 00:23:44 -t 00:09:15 -i 2008.02.11-19.28.wma don.mp3
>
> This did not work. It seemed as if ffmpeg ignored the -ss and just
> started extracting from the beginning. I don't know why. Perhaps you
> can tell me from the verbose output.
>
> $ ffmpeg -v 9 -ss 00:23:44 -t 00:09:15 -i 2008.02.11-19.28.wma don.mp3
> FFmpeg version SVN-r8876, Copyright (c) 2000-2007 Fabrice Bellard, et al.
^^^^^^^^^
> configuration: --prefix=/usr --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --extra-cflags=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic --enable-libmp3lame --enable-libogg --enable-libtheora --enable-libvorbis --enable-libfaad --enable-libfaac --enable-libgsm --enable-xvid --enable-x264 --enable-liba52 --enable-liba52bin --enable-libdts --enable-pp --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-opts --disable-strip
> libavutil version: 49.4.0
> libavcodec version: 51.40.4
> libavformat version: 51.12.1
> built on May 3 2007 12:41:19, gcc: 4.1.2 20070424 (Red Hat 4.1.2-11)
Really ancient version acccording to the ffmpeg standards. Retry with
the newest and greatest, maybe that has been fixed.
Regards.
--
Stefano Sabatini
Linux user number 337176 (see http://counter.li.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: replace-atoi-usage-in-ffmpeg-with-something-better-00.patch
Type: text/x-diff
Size: 4553 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080215/22a5fab8/attachment.patch>
More information about the ffmpeg-devel
mailing list