Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
FFmpeg/Libav LZW compression
1er avril 2016, par Sir DrinksCoffeeALotI'm trying to implement libav's LZW compression and decompression methods into my own project since the code is already there and i don't have to invent anything new (i'm using LZW just to test how much can i compress video before sending it through LAN).
I'm not quite sure if i'm doing something wrong since their code is quite complex (at some point they are shifting bits and such), and some parts i can't really understand. But anyways, here is what i have tried so far.
I've allocated/initialized few buffers (input/output),
LZWEncodeState
andLZWState
structures. After that i've called function that fills upLZWEncodeState
structure with some default values (ff_lzw_encode_init
), and after that i calledff_lzw_encode
and passedLZWEncodeState
reference together with input buffer and it's size. That's what iv'e done encoding-part wise.For the decode part, we have to call
ff_lzw_encode_open
which basicly allocatesLZWState
structure memory,ff_lzw_decode_init
(fillsLZWState
with default/passed valued) and after that, we useff_lzw_decode
to decode buffer back into original one (since LZW should be lossless).The thing is that after encoding/decoding, in output buffer only first 2 values are same as those in input buffer. I have no idea why is that happening. I've tried different values, but nothing has changed. So if anyone else experienced these kind of problems, and figured how to solve them, please let me know or try to explain why is that happening.
-
why is this intel hardware accellerated transcoding in ffmpeg not working ?
1er avril 2016, par JabbI compiled ffmpeg with intel hardware accelleration, but I cannot transcode the simpsons 720p video from http://www.h264info.com/clips.html with success.
this is the error I get:
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
and this is the full output from ffmpeg. What could be wrong?
root@ubuntu:/tmp# ffmpeg -i test.mp4 -vcodec h264_qsv out1.yuv ffmpeg version N-79177-ga677121 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.1) configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-libmfx libavutil 55. 19.100 / 55. 19.100 libavcodec 57. 32.100 / 57. 32.100 libavformat 57. 29.101 / 57. 29.101 libavdevice 57. 0.101 / 57. 0.101 libavfilter 6. 40.102 / 6. 40.102 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.101 / 2. 0.101 libpostproc 54. 0.100 / 54. 0.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4': Metadata: major_brand : isom minor_version : 1 compatible_brands: isomavc1 creation_time : 2007-02-19 05:03:04 Duration: 00:02:17.30, start: 0.000000, bitrate: 4283 kb/s Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x544, 4221 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default) Metadata: creation_time : 2007-02-19 05:03:04 handler_name : GPAC ISO Video Handler Stream #0:1(und): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 64 kb/s (default) Metadata: creation_time : 2007-02-19 05:03:08 handler_name : GPAC ISO Audio Handler [h264_qsv @ 0x2f626a0] Error initializing an internal MFX session Output #0, rawvideo, to 'out1.yuv': Metadata: major_brand : isom minor_version : 1 compatible_brands: isomavc1 Stream #0:0(und): Video: h264, none, q=2-31, 128 kb/s, 23.98 fps (default) Metadata: creation_time : 2007-02-19 05:03:04 handler_name : GPAC ISO Video Handler encoder : Lavc57.32.100 h264_qsv Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_qsv)) Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
-
Rotate image with ffmpeg
1er avril 2016, par PrateekI just figure out how to rotate image with FFmpeg. But issue is when Filename contain "%" sign. Then that command not work.
ffmpeg -y -i '/mypath/Prat%eek.jpg' -vf transpose=2 '/mypath/Prat%eek.jpg'
-
How does subtitle hardcoding works in ffmpeg ?
1er avril 2016, par Ketan KulkarniThe manual for the same is available on: http://superuser.com/questions/838072/ffmpeg-hardcoding-burning-filename-in-video https://trac.ffmpeg.org/wiki/HowToBurnSubtitlesIntoVideo
Sample command is: ffmpeg -i video.avi -vf subtitles=subtitle.srt out.avi
-
How does subtitle hardcoding work in ffmpeg ?
1er avril 2016, par Ketan KulkarniThe manual for the same is available on: http://superuser.com/questions/838072/ffmpeg-hardcoding-burning-filename-in-video https://trac.ffmpeg.org/wiki/HowToBurnSubtitlesIntoVideo
Sample command is: ffmpeg -i video.avi -vf subtitles=subtitle.srt out.avi