[Libav-user] Decoding specific formats?

Patrick Zielinski dzeesea at gmail.com
Thu Mar 1 15:40:44 CET 2012


As for decoding the mkv, I am able to do so,

C:\prefix\exec>ffmpeg.exe -i C:\prefix\exec\BBB\mkv\left.mkv test.avi
ffmpeg version N-34549-g13b7781, Copyright (c) 2000-2011 the FFmpeg
developers
  built on Nov  6 2011 22:08:46 with gcc 4.6.1
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-li
bfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg
--enable-librtmp --enable-libschroedinger --enable-libspeex
--enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis
 --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid
--enable-zlib
  libavutil    51. 24. 0 / 51. 24. 0
  libavcodec   53. 28. 0 / 53. 28. 0
  libavformat  53. 19. 0 / 53. 19. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 47. 0 /  2. 47. 0
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0
Input #0, matroska,webm, from 'C:\prefix\exec\BBB\mkv\left.mkv':
  Duration: 00:00:14.40, start: 0.000000, bitrate: 3141 kb/s
    Stream #0:0(eng): Video: h264 (High), yuv420p, 1920x1080, SAR 1:1 DAR
16:9, 25 fps, 25 tbr, 20k tbn, 50 tbc (default)
[buffer @ 00000000043988B0] w:1920 h:1080 pixfmt:yuv420p tb:1/1000000
sar:1/1 sws_param:
Output #0, avi, to 'lol.avi':
  Metadata:
    ISFT            : Lavf53.19.0
    Stream #0:0(eng): Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 1920x1080
[SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 tbn, 25 tbc (default)
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> mpeg4)
Press [q] to stop, [?] for help
frame=  360 fps= 64 q=31.0 Lsize=    3376kB time=00:00:14.40
bitrate=1920.6kbits/s
video:3362kB audio:0kB global headers:0kB muxing overhead 0.423509%

On Thu, Mar 1, 2012 at 9:38 AM, Patrick Zielinski <dzeesea at gmail.com> wrote:

> Sorry for the delay, I kind of lost track of time, here are the commands
> I've used to generate an mkv format video.
>
>   *ffmpeg.exe -i "C:\path\left_%03d.bmp" -pix_fmt yuv420p left.y4m*  *x264.exe
> left.y4m -o left.mkv*
>
>
> I'm still not really able to consistently decode video's of other format
> than .h264, code hasn't changed much, I suppose I'll have to inspire myself
> more to the ffmpeg.c script.
>
>
> On Thu, Feb 23, 2012 at 4:28 PM, Alex Cohn <alexcohn at netvision.net.il>wrote:
>
>> On Thu, Feb 23, 2012 at 02:16, Patrick Zielinski <dzeesea at gmail.com>
>> wrote:
>> > Ok, firstly please bare with me, up until two weeks ago I didn't even
>> know
>> > what codec were and how encoding worked. Also, this code is ported
>> within a
>> > C++ framework so it might not comply with your usual coding standards.
>> >
>> > Essentially here is the code that I have written
>> which resembles closely to
>> > the libav decoding example with minor tweaks due to deprecated
>> functions. I
>> > actually have a different version in our code, but it's mostly just
>> working
>> > with the buffer and the image data to add to our own structure.
>> >
>> > http://pastebin.ca/2120920
>> >
>> > I'd like to have either tips on how I could make this more robust, or
>> what
>> > steps I should take to extract each frame from different formats. I've
>> taken
>> > a look at ffmpeg.c, but not as much as I wanted.
>>
>> Regarding the specific problem decoding an MKV file, you did not write
>> if you succeed to open this particular file with command-line ffmpeg.
>>
>> Regarding your code, you should use the AVCodecContext you get from
>> avformat_open_input() for the chosen stream, no need to create a new
>> one as you do in lines 127 and on.
>>
>> BR,
>> Alex
>> _______________________________________________
>> 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/20120301/03e2da3c/attachment.html>


More information about the Libav-user mailing list