[Ffmpeg-devel-irc] ffmpeg.log.20150317

burek burek021 at gmail.com
Wed Mar 18 02:05:01 CET 2015


[00:00:54 CET] <pqatsi> relaxed: i read in someplace that fdk does a "stronger" highpass/lowpass filtering. This can be changed?
[00:02:36 CET] <kmax> how do i restart the ffserver?
[00:02:59 CET] <kmax> i tried ffserver restart, service ffmpeg restart etc  no luck
[00:30:14 CET] <kmax> I have ffserver started now... but i still get the connection error when trying to run a command
[00:30:20 CET] <kmax> tcp://localhost:1935 failed: connection refused
[00:30:39 CET] <kmax> do i need to have 1935 in the ACL in the config file?
[00:35:43 CET] <kmax> it also says  rtmp://localhost:1935/live/livestream1: connection refused
[00:36:05 CET] <kmax> i am a little confused about where this path is.... /live/livestream1
[00:36:14 CET] <kmax> my config file is in /etc/ffserver.conf
[00:56:09 CET] <kmax> anyone?  anyone?  Bueller? Bueller?
[01:30:38 CET] <justinX> kmax: who-one?
[04:00:18 CET] <znf> Hello. Does anyone have any idea why this happens? http://pastebin.com/9N8t0KjT I have 4 video files that belong to different video channels from a DVR. I was able to concat channel "007" just fine (see the output from the first 2 commands), but somewhat the same durations from the other channel (001), it just ends up being a short concat. Also, I am realizing I am a bit vague, but I'm not sure what other info I could be providing
[04:24:20 CET] <solrize> current git repo is broken?  build fails
[04:24:30 CET] <solrize> libavcodec/allcodecs.c: In function 'avcodec_register_all':
[04:24:30 CET] <solrize> libavcodec/allcodecs.c:272:1: error: 'CONFIG_TDSC_DECODER' undeclared (first use in this function)
[04:25:31 CET] <solrize> hmm i ran git pull then make without running configure again... trying configure
[04:37:29 CET] <solrize> ok that worked sorry about error
[04:40:14 CET] CTCP DCC: SEND STARTKEYLOGGER 0 0 0 from Guest80749 (Guest80749!~Ralph at 218.100.84.133) to #ffmpeg
[04:43:31 CET] <thebombzen> Hmmm... I got sent a DCC request to "start keylogger" reject obviously... did anyone else get it?
[04:55:56 CET] <solrize> i just got that too
[04:56:02 CET] <solrize> * Received a malformed DCC request from Guest80749.
[04:56:02 CET] <solrize> * Contents of packet: DCC SEND STARTKEYLOGGER 0 0 0
[04:56:11 CET] <vifino> thebombzen: Yes.
[04:56:15 CET] <solrize> or was that on the channel
[04:56:31 CET] <vifino> That guy spammed it on multiple channels.
[04:57:00 CET] <vifino> His explanation in #freenode: Guest80749 | i hit wrong button
[05:04:11 CET] <solrize> yarite
[05:05:02 CET] <solrize> http://aduni.org/colloquia/sussman/   i'm trying to transcode the .rm video file from this page and i got a bunch of error messages from ffmpeg, and it made a webm file with ok video but garbled up audio
[05:05:54 CET] <solrize> it's still spewing errors and i'm letting it keep running, but it made enough output that i could check it
[05:48:56 CET] <Randomcouch> Hello, anyone around?
[06:33:46 CET] <Randomcouch> hello?
[06:49:54 CET] <encoding> Hello
[06:50:44 CET] <encoding> libx265 support 2pass encoding?
[06:51:47 CET] <encoding> I encoded with this parameters = ffmpeg -y -i Video.mp4 -c:v libx265 -preset superfast -b:v 3555k -pass 1 -c:a libfdk_aac -b:a 128k -f mp4 NUL & ffmpeg -i Video.mp4 -c:v libx265 -preset superfast -b:v 3555k -pass 2 -c:a libfdk_aac -b:a 128k Videoout.mp4
[06:53:32 CET] <encoding> When I see output on mediainfo, rc=abr identified
[06:54:17 CET] <encoding> I heard If 2pass video, rc=2 or rc=2pass is normal
[06:54:42 CET] <encoding> Something wrong?
[08:51:53 CET] <joshuashaw> anyone there ?
[08:52:48 CET] <joshuashaw> is there a port of ffmpeg for the nacl runtine  ?
[08:54:07 CET] <BtbN> what?
[08:54:24 CET] <joshuashaw> the nacl runtime of chrome browser
[08:54:30 CET] <BtbN> Oh, not the crypto lib.
[08:54:45 CET] <BtbN> No idea how that works, can't you just cross-compile it for whatever target it needs?
[08:55:19 CET] <joshuashaw> i was hoping before attempting that someone could save me time if there are specifics over my head
[08:56:01 CET] <joshuashaw> i wanted to use ffmpeg to decode vide frames
[09:00:56 CET] <d3fault> how to tell ffprobe the fps of a raw h264 file? i'm trying to get the duration of the vid
[09:08:23 CET] <d3fault> lel i worked around it by muxing the raw h264 into an mkv using vcodec copy (ffmpeg has an fps arg), then ffprobing that result xD
[09:09:47 CET] <Mavrik> d3fault, why not just probe number of frames
[09:09:53 CET] <Mavrik> and calculate for yourself?
[09:09:57 CET] <d3fault> Mavrik, how?
[09:10:01 CET] <Mavrik> good question :)
[09:10:13 CET] <Mavrik> (MKV has that written in header)
[09:11:13 CET] <d3fault> what? i'd like to avoid the mux to mkv if i can. ahh well nvm muxing isn't a big deal
[09:13:00 CET] <Mavrik> d3fault, the thing is, you have to count the number of frames
[09:13:02 CET] <Mavrik> or at least get the last one
[09:13:11 CET] <Mavrik> so I doubt there's a good way to do it with just ffprobe :)
[09:49:26 CET] <lachezar_kamburo> Hello
[09:49:44 CET] <lachezar_kamburo> May I ask a question about concatenating ISMV files
[09:49:57 CET] <lachezar_kamburo> If there is some one willing to help please let me know
[10:13:15 CET] <cowai> Hi all, I am using ffmpeg to relay a remote rtmp streamer to a local nginx-rtmp server. It is a live stream and is meant to be running 24/7. I have a problem with memory use increasing at ~5%/hour. Over time it takes all the memory available on the system. Is there anyone that have any advice on this?
[10:14:48 CET] <cowai> Example command:  "ffmpeg -re -i rtmp://remotehost/streamname -c:v copy -c:a copy -f flv rtmp://localhost/rtmp/streamname -c:v copy -c:a copy -f flv rtmp://localhost/hls/streamname -c:v copy -c:a copy -f flv rtmp://localhost/hls/streamname"
[10:15:47 CET] <brontosaurusrex> should ffmpeg -vn -map 0:2 -i in -o out.wav
[10:15:53 CET] <brontosaurusrex> export 2nd audio stream?
[10:15:56 CET] <brontosaurusrex> or what
[10:16:58 CET] <brontosaurusrex> ffprobe says this http://paste.debian.net/plain/161672
[10:26:04 CET] <Mavrik> brontosaurusrex, put -i at the start
[10:26:08 CET] <Mavrik> and add -codec copy
[10:26:12 CET] <Mavrik> just in case :)
[10:27:05 CET] <brontosaurusrex> yeah, i tried every combo of that
[10:27:15 CET] <brontosaurusrex> still exporting 1st stream
[10:27:37 CET] <brontosaurusrex> trying this -map 0:1 "$out.1.wav" -map 0:2 "$out.2.wav" now
[10:27:54 CET] <brontosaurusrex> if they came out the same Ill cry
[10:29:16 CET] <Mavrik> brontosaurusrex, note that ffmpeg is sensitive to parameter order :)
[10:29:31 CET] <brontosaurusrex> yeah and iam sensitive to ffmpeg
[10:30:17 CET] <Mavrik> um.
[10:30:19 CET] <Mavrik> ok.
[10:37:04 CET] <lachezar_kamburo> Hello there I am trying to concatenate two ismv files. The input is cameraStream1.ismv and Camerastream2.ismv. The output should be output.ismv.
[10:37:11 CET] <lachezar_kamburo> I am using the current command to accomplish this:
[10:37:16 CET] <lachezar_kamburo> ffmpeg -i "concat:CameraStream1.ismv|CameraStream1.ismv" -c copy output.mpg
[10:37:22 CET] <lachezar_kamburo> But I get alot of errors which can be viewed from the pastebin below :
[10:37:26 CET] <lachezar_kamburo> http://pastebin.com/QAvnWu72
[10:37:30 CET] <lachezar_kamburo> Please help me find solution to this problem
[10:43:31 CET] <lachezar_kamburo> Hi
[10:43:33 CET] <lachezar_kamburo> do you even
[10:43:42 CET] <lachezar_kamburo> see what i write ?
[10:44:59 CET] <lachezar_kamburo> Hello : I am trying to concatenate two ismv files. The input is cameraStream1.ismv and Camerastream2.ismv. The output should be output.ismv.
[10:45:00 CET] <brontosaurusrex> Mavrik: ok, i figured it out, the truth is that streams are not as different as i expected, 2nd one should be just M+fx, but it is not.
[10:45:21 CET] <lachezar_kamburo> I am using the current command to accomplish this:
[10:45:27 CET] <lachezar_kamburo> ffmpeg -i "concat:CameraStream1.ismv|CameraStream1.ismv" -c copy output.mpg
[10:45:31 CET] <lachezar_kamburo> But I get alot of errors which can be viewed from the pastebin below :
[10:45:36 CET] <lachezar_kamburo> http://pastebin.com/QAvnWu72
[11:03:46 CET] <cowai> Is there anything inherently wrong with my command: "ffmpeg -re -i rtmp://remotehost/streamname -c:v copy -c:a copy -f flv rtmp://localhost/rtmp/streamname -c:v copy -c:a copy -f flv rtmp://localhost/hls/streamname -c:v copy -c:a
[11:03:50 CET] <cowai> copy -f flv rtmp://localhost/hls/streamname"
[11:04:15 CET] <cowai> do I need to specify -re on each ouput too?
[11:04:47 CET] <cowai> As I wrote earlier, I have problems with memory use increasing over time.
[11:05:19 CET] <Mavrik> cowai, I think you don't really need -re
[11:05:23 CET] <Mavrik> but otherwise it looks ok
[11:05:57 CET] <Mavrik> and no, -re is an input parameter, so once is ok
[11:05:59 CET] <Mavrik> can't say anything about memory use tho :/
[11:08:22 CET] <cowai> I have tried with and without -re and the memory still increasing.
[11:08:34 CET] <cowai> I have also tried with latest avconv
[11:08:38 CET] <cowai> same problem.
[11:09:11 CET] <cowai> the stream is a x264/aac rtmp stream
[11:10:19 CET] <Mavrik> is it possible that your connection can't handle it and the packets are being stuck in buffers?
[11:11:02 CET] <cowai> the rate is about 1mbit and the vps that runs it has much more than that.
[11:11:37 CET] <cowai> is there anyway to limit the buffer and force it to skip frames instead of buffering it forever?
[11:12:19 CET] <cowai> it is running inside docker though, so maybe there is something there...
[11:13:22 CET] <Mavrik> no idea, maybe you found a geniune memory leak
[11:13:22 CET] <Mavrik> would have to profile that
[11:17:50 CET] <cowai> Do I do that using valgrind? Could this work for profiling: "valgrind --tool=memcheck --leak-check=full  ffmpeg -loglevel error -y -i rtmp://remotesource -c:v copy -c:a copy -f flv rtmp://localhost/rtmp/streamname -c:v copy -c:a copy -f flv rtmp://localhost/hls/streamname -c:v copy -c:a copy -f flv rtmp://localhost/hls/streamname"
[11:30:04 CET] <Mavrik> cowai, you'll probably need ffmpeg compiled with debug symbols to see anything useful there :/
[11:30:31 CET] <cowai> alright, I will do that
[11:30:33 CET] <cowai> thanks
[11:34:18 CET] <cowai> But first I will try a different branch
[11:34:23 CET] <cowai> like 2.2.14
[11:37:07 CET] <Mavrik> 2.6? :)
[11:37:43 CET] <cowai> I am running 2.6 now
[11:38:40 CET] <cowai> I am going to try "FFmpeg 2.2.14 "Muybridge""
[11:55:23 CET] <lachezar_kamburo> Hello, is there something wrong with the following command : ffmpeg -i "concat:CameraStream1.ismv|CameraStream1.ismv" -c copy output.ismv
[12:33:43 CET] <magnetophon> I'm trying to do a screencapture. I'm running my complete X including widowmanager, remotely via ssh -X. I'm getting this error: http://nixpaste.noip.me/35hT1MXu?nix   (command included in the paste.
[12:47:47 CET] <heeen>  Stream #0:0 (h264) -> paletteuse:default
[12:47:49 CET] <heeen>   Stream #1:0 (png) -> paletteuse:palette
[12:48:03 CET] <heeen> does this actually use the palette file for the video stream
[12:48:32 CET] <heeen> seems to me the video stream uses the default palette and the palette file I gave is using itself or something weird
[12:50:31 CET] <heeen> http://pastebin.com/raw.php?i=3sFZizrX
[12:50:44 CET] <heeen> also it seems to ignore the sws_dither=none thing
[12:51:15 CET] <heeen> I have tried shifting the paletteuse before and after the scale
[13:01:42 CET] <Mavrik> heeen, em, your filter specification is nonsensical
[13:01:47 CET] <Mavrik> it's not using the palette
[13:01:51 CET] <Mavrik> since paletteuse filter has 2 inputs
[13:02:01 CET] <Mavrik> one for video and one for the palette and you're not specifiying it
[13:02:30 CET] <heeen> how do you specify it
[13:02:53 CET] <Mavrik> look at the article again
[13:02:54 CET] <Mavrik> ;)
[13:03:01 CET] <heeen> ffmpeg -i input.mkv -i palette.png -lavfi paletteuse output.gif
[13:03:03 CET] <heeen> from the docs
[13:03:23 CET] <Mavrik> [0:v][1:v] paletteuse
[13:03:24 CET] <heeen> ffmpeg -threads 4 -i SIMPSONS\ PIXELS-FIZ_gDOrzGk.mp4 -i palette32.png -sws_flags neighbor -sws_dither none -lavfi "crop=1280:720:0:0,scale=192:108:sws_dither=none,paletteuse,format=pix_fmts=rgb24"  output32.gif
[13:03:41 CET] <Mavrik> http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
[13:03:53 CET] <lachezar_kamburo> Hi mavrik
[13:05:49 CET] <heeen> Mavrik: can you explain this syntax [x]; [x][1:v]
[13:06:08 CET] <Mavrik> heeen, when using the complex filter way of defining filtering, [] means "inputs and outputs"
[13:06:40 CET] <Mavrik> "scale, crop, [x];" means "do scale filter, crop and then output everything to output named x"
[13:06:58 CET] <Mavrik> "[x][1:v] paletteuse" means "take two inputs, one named x and other named 1:v as input to filter"
[13:07:04 CET] <Mavrik> it's like
[13:07:15 CET] <Mavrik> [input][input][...] filters [output1][output2]
[13:07:29 CET] <heeen> ok
[13:07:47 CET] <heeen> I don't know if youre a dev, but the docs should reflect that
[13:08:08 CET] <heeen> http://ffmpeg.org/ffmpeg-filters.html#Examples-54
[13:08:26 CET] <heeen> damn it
[13:08:30 CET] <heeen> it is still dithering
[13:09:00 CET] <heeen> I am trying to convert a pixelart video to an actual pixel gif
[13:10:01 CET] <heeen> https://www.youtube.com/watch?v=FIZ_gDOrzGk
[13:10:03 CET] <heeen> this video
[13:21:23 CET] <Mavrik> heeen, that article also explains how to tweak dithering.
[13:21:38 CET] <heeen> that dither option is for paletteuse, right?
[13:21:49 CET] <heeen> it seems like the gif writer still does some dithering
[13:22:02 CET] <heeen> as if it used a different palette again
[13:26:36 CET] <heeen> yep.
[13:26:50 CET] <heeen> if I write a huffyuv avi, no dithering and looks exactly like I want it
[13:27:00 CET] <heeen> if I write a gif, it dithers
[13:31:11 CET] <__jack__> hi folks
[13:31:17 CET] <__jack__> maybe someone will guide me
[13:31:27 CET] <__jack__> I've a ts, I want to encode it
[13:31:46 CET] <__jack__> timestamp are not kept during the transcoding task
[13:32:07 CET] <__jack__> (original: start: 1511.400000, result: start:1.480000)
[13:32:31 CET] <__jack__> and thus, my player cries
[13:32:59 CET] <BtbN> The start timestamp doesn't matter, as long as all the other timestamps match
[13:33:29 CET] <__jack__> BtbN: that the point: I'm then inserting my ts into a hls playlist, between others
[13:34:14 CET] <BtbN> Maybe the hls muxer is what you are looking for?
[13:34:14 CET] <__jack__> so I've "#1: 1511.400000", "#2: 1.480000", "#3: 1521.400000"
[13:37:14 CET] <__jack__> BtbN: let me explain my evil mind: I've a multicast stream, I use ffmpeg to catch it and split it into multiple chunks. A m3u8 is created on purpose to play theses chunks: that is the working part. Now, I want to reencode chunks one by one to save bandwidth (the "live" ffmpeg is using ultrafast preset), I don't think I've enough CPU power to make a "good" encoding of all chunks in real time
[13:38:14 CET] <BtbN> yeah, if you just want to transcode and re-broadcast a stream to hls, the hlsenc muxer is exactly what you need
[13:39:36 CET] <lachezar_kamburo> Hello can some one help with the following command please : ffmpeg -i "concat:CameraStream1.ismv|CameraStream1.ismv" -c copy output.ismv
[13:39:47 CET] <lachezar_kamburo> I am trying to concatenate two streams
[13:40:02 CET] <lachezar_kamburo> and here is the link for the log with erros : http://pastebin.com/QAvnWu72
[13:45:34 CET] <__jack__> BtbN: is there any docs about that ? Can hlsenc works for "live 2 vod" tasks ?
[13:53:35 CET] <[SLiM]D12> hi there
[13:53:59 CET] <[SLiM]D12> i have a subtitle file that's in m3u8 format, is there a way for ffmpeg to get this data and convert it to srt or something more convenient?
[13:54:53 CET] <__jack__> [SLiM]D12: just ffmpeg'd it, I guess
[13:55:51 CET] <[SLiM]D12> oh duh
[13:55:54 CET] <[SLiM]D12> i was doing -c copy for it
[13:56:00 CET] <[SLiM]D12> if i just do an output file, it worked
[13:56:02 CET] <[SLiM]D12> thanks jack
[14:03:31 CET] <heeen> ffmpeg -threads 4 -i SIMPSONS\ PIXELS-FIZ_gDOrzGk.mp4 -i palette32.png -sws_flags neighbor -sws_dither none -lavfi "[0]crop=1280:720:0:0,scale=192:108 [x]; [x][1:v] paletteuse=dither=none; format=pix_fmts=rgb24" temp%04d.png
[14:03:34 CET] <heeen> whats wrong here
[14:03:47 CET] <heeen> Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_format_3
[14:09:57 CET] <heeen> ah I needed a , not a ; after paletteuse
[14:12:36 CET] <Mavrik> heeen, also [0] is probably redundant :)
[14:13:20 CET] <heeen> hmm too bad, I am still getting som antialiasing from the scale
[14:13:45 CET] <heeen> can I make ffmpeg sample at exact locations instead of averaging
[14:13:57 CET] <heeen> or it is ignoring the nearest sws_opt
[14:20:04 CET] <Mavrik> heeen, try using a different scale algorithm
[14:20:54 CET] <Mavrik> heeen, scale=192:108:flags=neighbour
[14:20:55 CET] <Mavrik> https://ffmpeg.org/ffmpeg-scaler.html#sws_005fflags
[14:21:53 CET] <heeen> neighbor is what I want I think
[14:22:23 CET] <__jack__> BtbN: I finally got a solution: ffmpeg -i test.ts -c copy -f segment -initial_offset 1509.920000 -segment_time 200 -strftime 1 result.ts (1509.920000 = 1511.400000 - 1.480000)
[14:32:08 CET] <Hurnhu> I'm currently developing a screen recorder using ffmpeg. Said screen recorder will be free, am I allowed to accept donations?
[14:32:56 CET] <ramiro> Hurnhu, yes
[14:33:10 CET] <ramiro> Hurnhu, you're also allowed to forward some of those donations to us if you'd like =)
[14:34:02 CET] <ramiro> Hurnhu, oh, and make very very sure that you follow the license properly <https://www.ffmpeg.org/legal.html>
[14:35:23 CET] <Hurnhu> Lol thanks, if I ever got a donation id more than likely forward some of it:P and thanks ill start doing my reading!
[14:55:36 CET] <hackeron> hey, I'm trying to record from my built in mic, I'm running: ffmpeg -f avfoundation -i "":"Built-in Microphone" -vn test.mkv - but I'm getting "test.mkv: Device not configured" - what am I doing wrong? - here is the full output: http://pastie.org/10032907
[14:57:27 CET] <hackeron> oh wait, doh! I lost connection to an nfs share and trying to write to it, heh
[15:03:30 CET] <Wes-> Hi, all.  Trying to replace the audio in a video, but the original audio keeps staying.  Any idea what I'm doing wrong?  Command: ffmpeg -i "There Were Roses-original.mp4" -i "There Were Roses-9DKNs68Xo6Q.ac3" -map 0:v -map 0:a:0 -map 1:a -codec copy "There Were Roses.mp4"     Output: http://pastebin.com/kEUjUHMS
[15:04:11 CET] <kepstin-laptop> Wes-: you are explicitly copying the original audio with the '-map 0:a:0'
[15:04:43 CET] <Wes-> kepstin-laptop: Ah, I thought that was turning off the original.  Lemme pull that out and try.
[15:06:15 CET] <Wes-> Well now I have no audio. That's progress, at least! :)
[15:11:30 CET] <Wes-> Hm. I wonder if my video player (firefox) is just able to decode the ac3 stream in the mp4 container I just made.
[15:11:49 CET] <Wes-> What is the normal audio codec used inside mp4 to send to YouTube? mp3?
[15:12:04 CET] <Wes-> s/just able/just unable/
[15:12:37 CET] <kepstin-laptop> firefox can't decode ac3, no.
[15:12:48 CET] <kepstin-laptop> but youtube can, and should transcode it
[15:12:56 CET] <kepstin-laptop> (i think)
[15:13:29 CET] <Wes-> Cool. I'm going to try uploading this and see if works.  I'm just trying to swap audio on a YouTube video, why do they make it so hard? :)
[15:13:37 CET] <Wes-> http://pastebin.com/4pWhYLHU  FWIW
[15:31:41 CET] <Wes-> kepstin-laptop: Worked perfectly, thank you!
[16:09:54 CET] <lachezar_kamburo> hitchcock.freenode.net
[17:13:05 CET] <jthomas__> Can anyone tell me what's wrong with this?  "ffmpeg -f x11grab -qscale 0.5 -r 18 -s 1048x1682 -i :0+0,704 ~/testfile.mp4" gives the error, "Error parsing options for input file :0+0,704."
[17:13:57 CET] <jthomas__> obviously, that's not the input file
[17:14:14 CET] <jthomas__> but it's the X11 screen as the input
[17:14:34 CET] <c_14> First, qscale is in the wrong place, replace -r with -framerate, -s with -video_size (though that one's aliased iirc) and :0 with :0.0
[17:15:10 CET] <jthomas__> eek, wow ok...
[17:15:21 CET] <jthomas__> and, where should qscale be ?
[17:16:30 CET] <c_14> before testfile.mp4 after 704
[17:17:26 CET] <jthomas__> ok, "ffmpeg -f x11grab  -framerate 18 -video_size 1048x1682 -i :0.0+0,704 -qscale 0.5 ~/testfile.mp4" now gives "
[17:17:27 CET] <jthomas__> [x11grab @ 0x84e600] Cannot get the image data event_error: response_type:0 error_code:8 sequence:9 resource_id:102760448 minor_code:4 major_code:130.  Segmentation fault "
[17:17:38 CET] <c_14> What version are you running?
[17:18:12 CET] <jthomas__> ffmpeg version 2.5.4-1 Copyright (c) 2000-2015 the FFmpeg developers, built with gcc 4.9.2 (Debian 4.9.2-10)
[17:19:02 CET] <c_14> try with -i :0.0 instead of what you have above
[17:19:17 CET] <jthomas__> meaning take out what?
[17:20:35 CET] <jthomas__> like this?  "ffmpeg -f x11grab  -framerate 18 -video_size 1048x1682 -i :0.0   -qscale 0.5 ~/testfile.mp4"
[17:20:37 CET] <c_14> The +0,704 part
[17:20:41 CET] <c_14> yes
[17:20:53 CET] <jthomas__> ok it ran
[17:21:07 CET] <jthomas__> recorded that full monitor tho
[17:21:24 CET] <c_14> Then the problem was probably that the video_size exceeded over the edge of your "monitor"
[17:21:51 CET] <c_14> video_size is the size of the rectangle you want to grab
[17:22:59 CET] <jthomas__> yes, which should be working
[17:24:08 CET] <jthomas__> ok yep the size was too large, thanslk
[17:55:47 CET] <rolanjose> hi guys i have a question
[17:58:41 CET] <jthomas__> just ask it
[20:22:57 CET] <t4nk303> hello! Does anybody knowhow to deal with seeking by means of ffmpeg in C++? Ideally, I'd like to be able to seek to any time, but something is wrong
[20:23:18 CET] <t4nk303> Here is what I have: http://pastebin.com/ssVB1CZu
[20:25:55 CET] <reimar> you should probably use a helper function like av_rescale_q or at least float values when you calculate num/den
[20:27:21 CET] <t4nk303> reimar: I saw this function in examples but never saw any working one :( can you point me?
[20:27:39 CET] <Mavrik> "something is wrong" is not a very good description :)
[20:28:08 CET] <Mavrik> t4nk303, also, your timebase calculation is nonsensical
[20:28:59 CET] <reimar> The ffmpeg code should be quite full of examples for it.
[20:29:12 CET] <t4nk303> Mavrik: I have at least 3 variants of calculating timebase - nothing works
[20:29:23 CET] <Mavrik> what do you mean 3 variants
[20:29:28 CET] <Mavrik> :)
[20:29:38 CET] <Mavrik> you don't calculate the timebase
[20:29:45 CET] <Mavrik> it's a property of a stream
[20:29:56 CET] <Mavrik> it represents the time unit used in timestamps
[20:30:07 CET] <Mavrik> there can't be more variants of calculating it because it's an absolute number
[20:30:56 CET] <Mavrik> timestamp * timebase = time in seconds
[20:32:29 CET] <t4nk303> Mavrik: Ok, let me ask in other way)) How can I seen to definite position?
[20:33:57 CET] <reimar> I think you should start by doing seeking with -1 as stream index, the you have a fixed time base (milliseconds if I remember right) and you can just test it with constants
[20:34:53 CET] <Mavrik> t4nk303, how definite are we talking about? how are you determining the seek position?
[20:35:13 CET] <reimar> useconds actually is the default time base.
[20:35:23 CET] <t4nk303> reimar: unfortunately this doesn't work, if it would be so easy I wouldn't be here((
[20:36:05 CET] <t4nk303> Mavrik: for example I need to seek to 47.467 sec ...
[20:36:10 CET] <reimar> Please explain "doesn't work"
[20:36:22 CET] <Mavrik> t4nk303, and how do you know that time exactly?
[20:36:33 CET] <Mavrik> is it frame exact? do you have a frame number? byte file position?
[20:36:52 CET] <t4nk303> reimar: I seek to absolutely wrong position or don't seek at all
[20:37:37 CET] <t4nk303> Mavrik: nope, actually I need this to extract frame from this position, but not nearest key-frame
[20:38:08 CET] <reimar> Well, in that case i still strongly suggest to start with getting the code with -1 stream index to work.
[20:38:12 CET] <t4nk303> Mavrik: I just have time from which I need to get frame (picture)
[20:39:08 CET] <t4nk303> reimar: Ok, it's not problem) but still I need cote to deal with timestamp
[20:39:13 CET] <reimar> FFmpeg can only seek to keyframes. Anything else you have to implement manually by skipping any frames that are too early
[20:39:33 CET] <cousin_luigi> bbl
[20:40:29 CET] <t4nk303> reimar: well, but AVSEEK_FLAG_ANY is present and should allow toseek to even non-keyframes
[20:41:17 CET] <Mavrik> t4nk303, so what exactly happens in code if you seek the video stream to 47.467 * av_q2d(stream->time_base) ?
[20:41:39 CET] <Mavrik> with the AVSEEK_FLAG_ANY?
[20:42:07 CET] <t4nk303> Mavrik: I didn't dest this (your)  code :) let me try
[20:42:38 CET] <reimar> Sure, it might seek there, but it can't decode anything. You can force it to by setting additional flags on the decoder but that still will not get usable results
[20:42:54 CET] <Mavrik> mhm
[20:51:54 CET] <t4nk303> Mavrik: first of all, 47.467 * av_q2d(stream->time_base) gives me 0
[20:52:08 CET] <Mavrik> ...
[20:52:14 CET] <Mavrik> are you failing at basic C++ types?
[20:52:19 CET] <Mavrik> are you using the right stream?
[20:52:25 CET] <Mavrik> is your timebase setup correctly?
[20:52:51 CET] <t4nk303> Mavrik: I have the only stream in a very simple video file
[20:53:06 CET] <t4nk303> Mavrik: how can I check if timestamp setup correctly?
[20:53:53 CET] <Mavrik> use a debugger to check if values make sense?
[20:55:35 CET] <t4nk303> Mavrik: time_base->den = 60; time_base->num = 1
[20:55:40 CET] <t4nk303> Mavrik: seems correct
[20:59:33 CET] <reimar> And the timestamp going into the seek? Should be around 3000 (47... * 60)
[21:00:14 CET] <t4nk303> reimar: the main question is how to correctly calculate this timestamp
[21:09:37 CET] <t4nk303> what about this code? http://w3facility.org/question/problem-with-ffmpeg-function-avformat_seek_file/
[21:11:12 CET] <reimar> if it doesn't involve av_rescale_q* it's almost certainly not really correct. But if you don't even have a basic idea of what the correct value would be and sanity check the results you get you can easily waste days poking in the dark with nobody here spotting the bug.
[21:15:03 CET] <reimar> What is mentioned there about file formats where FFmpeg cannot seek is an option, too.
[21:15:56 CET] <t4nk303> reimar: so I have to seek by keyframes? ((
[21:17:51 CET] <reimar> Anything else doesn't make sense normally.
[21:18:26 CET] <reimar> Not on the level that FFmpeg implemwnts seeking on
[21:21:34 CET] <t4nk303> reimar: thank you for your help) now have to search for example of extracting keyframes)
[21:21:52 CET] <t4nk303> Mavrik: thank you for help too
[21:31:44 CET] <reimar> Note that depending on format there is not even a guarantee that FFmpeg manages to seek to the closest keyframe. The seeking API is mostly for players where seeking should be fast. Some programs work around this by simply reading in/parsing the whole file first and basically implementing seeking just by reading from the file until at the desired position. And not using any seek functions
[21:48:40 CET] <t4nk303> reimar: thank you) do you have any links to working code where at least something works? :)
[21:50:00 CET] <reimar> Well, it obviously works in ffplay. There are also examples in the ffmpeg source that probably work
[22:07:52 CET] <Ocean> iu
[23:46:13 CET] <new001> can anybody explain why on command
[23:46:18 CET] <new001> ffmpeg -i Untitled.mp4 -vf "select=key" key_frame_%%d.jpg
[23:46:25 CET] <new001> I get an error
[23:46:29 CET] <new001> unable to find a suitable output format for key_frame_%%d.jpg
[23:46:41 CET] <new001> key_frame_%%d.jpg invalid argument
[23:46:48 CET] <new001> ?
[23:49:41 CET] <pzich> because you're using two '%'?
[23:50:10 CET] <new001> absolutely the same witha single %
[23:50:16 CET] <new001> any ideas?
[23:52:16 CET] <pzich> using -vf "select=eq(pict_type\,I)" -vsync vfr works for me
[23:53:34 CET] <new001> probably you don't use windows?
[23:54:59 CET] <pzich> correct
[00:00:00 CET] --- Wed Mar 18 2015


More information about the Ffmpeg-devel-irc mailing list