burek021 at gmail.com
Fri Oct 2 02:05:01 CEST 2015
[01:59:34 CEST] <HoloPed> hey all. How do I extract the last frame of a video using ffmpeg? Considering that I don't know the total number of frames.
[03:36:27 CEST] <klaxa> HoloPed: you could use the reverse filter and do -vframes 1
[03:36:45 CEST] <klaxa> like: ffmpeg -i input.mp4 -vf revrse -vframes 1 out.png
[03:37:33 CEST] <HoloPed> oh snap
[03:37:36 CEST] <HoloPed> nice klaxa
[03:37:39 CEST] <HoloPed> thanks
[03:39:13 CEST] <klaxa> remember that this may take quite long depending on the track
[03:39:22 CEST] <klaxa> and it's also somewhat wasteful
[03:39:46 CEST] <klaxa> reading the file twice (once for finding out the duration and once for extracting the frame) would be a lot faster
[03:40:45 CEST] <klaxa> err... s/track/input/
[03:40:51 CEST] <klaxa> HoloPed: ^
[04:56:26 CEST] <dabbler> I'm using ffmpeg to simply change container formats ("ffmpeg -i foo.flv -c copy foo.mp4"), but it's not preserving the encoding timestamp of the streams. Shouldn't it?
[05:08:40 CEST] <dabbler> All the "encoded" and "tagged" timestamps, container-level and stream-level, are being replaced with 1904-01-01 00:00:00.
[05:10:06 CEST] <dabbler> I could understand the logic of *updating* the container-level timestamps, since the container is being recreated, but not the stream-level timestamps.
[05:18:48 CEST] <epitron> dabbler: whenever i run into a problem like that, i usually write a duct-tape script that copies over the metadata after the processing is finished :)
[05:35:17 CEST] <dabbler> epitron: yeah, it'd be nice to not have to do that. also, the ffmpeg options are so overwhelming it'd probably take an hour to figure out what command would copy such timestamps over. :)
[05:37:30 CEST] <epitron> dabbler: oh, i just meant like, grepping the output and extracting the metadata to strings, then writing it into the new file :)
[05:37:44 CEST] <epitron> serious duct tape
[05:38:03 CEST] <epitron> you're right though -- figuring out how to write that info could be a huge pain
[05:39:00 CEST] <epitron> probably easier to patch the code
[05:42:54 CEST] <klaxa> epitron: i'm not sure myself how it works, but maybe this manpage section helps: https://ffmpeg.org/ffmpeg.html#Advanced-options see: -map_metadata
[05:43:26 CEST] <klaxa> also not sure if that'll work with what's not working for you right now
[05:43:45 CEST] <epitron> klaxa: thanks! (this was dabbler's issue)
[05:43:56 CEST] <klaxa> ah, oops
[05:45:19 CEST] <epitron> my problem is getting QP working with nvenc
[05:46:03 CEST] <dabbler> klaxa: yeah, i saw that. thing is, if I understand it correctly, if i used that switch, i'd have to list out every mapping to make, not just the ones it was failing to make by default
[05:47:02 CEST] <klaxa> >Optional metadata_spec_in/out parameters specify, which metadata to copy.
[05:47:09 CEST] <klaxa> so i guess by default it copies everything?
[05:48:21 CEST] <dabbler> it doesn't clearly state it, but i assume it means it copies everything that it would make sense to preserve
[05:49:04 CEST] <klaxa> have you tried running it?
[05:50:09 CEST] <dabbler> running&? i've tried "ffmpeg -i foo.flv -c copy foo.mp4", and it obliterates all the timestamps
[05:52:35 CEST] <dabbler> also seems relevant to deciphering default behavior: > These default mappings are disabled by creating
[05:52:36 CEST] <dabbler> any mapping of the relevant type. A negative file index can be used to create a dummy mapping
[05:52:36 CEST] <dabbler> that just disables automatic copying.
[05:52:56 CEST] <dabbler> so there is automatic copying
[05:53:02 CEST] <pinPoint> sine`: ok, thanks
[05:55:09 CEST] <klaxa> i meant to just run the code like in the examples? i.e.: ffmpeg -i in.mkv -map_metadata 0 -c copy out.mkv
[05:55:45 CEST] <klaxa> and see if that does what you want
[06:28:08 CEST] <dabbler> hm. that appears to make it set every timestamp to a particular value, including ones that were 1970-01-01 in the input
[06:28:44 CEST] <dabbler> i think it's copying the container timestamps to all the streams
[09:37:37 CEST] <epitron> hmm.. still having trouble controlling the bitrate with nvenc_h264
[09:37:39 CEST] <epitron> https://www.ffmpeg.org/doxygen/2.7/nvenc_8c_source.html#l00772
[09:38:06 CEST] <epitron> it looks like there's a constqp setting, but -qp isn't wired up to the codec
[09:38:26 CEST] <epitron> -qmin and -qmax kinda work...
[09:40:49 CEST] <epitron> if i set them to the same value, and make that value really high, the file is a bit smaller :)
[09:41:02 CEST] <epitron> using h264 by itself results in the smallest file though
[09:41:07 CEST] <epitron> (with no settings)
[10:40:55 CEST] <Eli12> Hello! I am having troubles with streaming and was wandering is someone could take a look at the command I'm using to direct me to my mistake..
[10:43:11 CEST] <Eli12> the command I've used is: ffmpeg.exe -y -f gdigrab -framerate 2 -i title="YouTube - Google Chrome" -an -f mpegts udp://127.0.0.1:12345
[10:43:42 CEST] <Eli12> when I'm opening VLC to to read the stream, I get a blank black screen
[11:45:33 CEST] <CounterPillow> Is it possible for the "ass" video filter to load fonts from the mkv file attachments?
[11:57:41 CEST] <relaxed> CounterPillow: it should do that by default with the subtitle filter
[11:58:09 CEST] <CounterPillow> I don't remember it doing that but I think I used the "ass" filter; I'll try again
[11:59:15 CEST] <relaxed> you want to copy them to the output or hardsub with the font?
[11:59:21 CEST] <CounterPillow> hardsub
[12:00:26 CEST] <relaxed> use the subtitle filter
[12:01:38 CEST] <CounterPillow> thanks
[12:02:06 CEST] <CounterPillow> aww, too bad fast seeking still breaks the timing
[12:20:15 CEST] <CounterPillow> ah, solved it with -copyts and setpts
[13:08:25 CEST] <feliwir> ffmpeg doesn't build with msvc 2015?
[14:43:32 CEST] <Anoia> hi all
[14:44:28 CEST] <Anoia> I'm doing some work that extracts decoded H.264 data (YUV420) into a Direct3D compatable buffer. Can anyone confirm the data layout in data[0,1,2]?
[14:44:46 CEST] <Anoia> and the stride in any pointer/alignment requirements?
[14:47:31 CEST] <Anoia> ahha, just found "For video the linesizes should be multiples of the CPUs alignment preference, this is 16 or 32 for modern desktop CPUs."
[14:50:09 CEST] <deroad> Hi, i'm writing an app to record an rtmp stream, but i do not understand what i should do to save the stream in the same format i get fromthe network. i do not want to use a decoder, but i want to write directly the packet to a file. can someone enlighten me?
[14:52:13 CEST] <deroad> do i need to alloc another AVFormatContext struct just to save the stream?
[14:54:47 CEST] <svvitch> someone had memory leak with command like this http://pastebin.com/23yXT7Nv ? , how to avoid it
[14:55:42 CEST] <svvitch> in a day it can use approxim 9GB of RAM
[15:33:37 CEST] <Mavrik> deroad, you'll need to remux it so yeah
[15:36:07 CEST] <durandal_170> svvitch: report it on tracker
[15:37:45 CEST] <deroad> ok, thanks Mavrik
[15:44:43 CEST] <svvitch> durandal_170: is seriously a bug? or maybe some hack with options
[15:45:03 CEST] <durandal_170> bug
[18:20:32 CEST] <sopparus> hello
[18:20:56 CEST] <sopparus> is it possible to utilize amd VCE or OpenMax for encoding with ffmpeg under linux?
[21:16:24 CEST] <pinPoint> c_14: looks like final cut pro loves .mp4-> prores 422 proxy.
[21:16:27 CEST] <pinPoint> http://i.imgur.com/0pq0Ykh.jpg
[21:16:43 CEST] <pinPoint> no complaints importing the file into timeline
[23:20:20 CEST] <YaMoonSun> How do I turn a jpeg into a x264 video stream, and then import an audio stream to make an .mp4?
[23:20:24 CEST] <YaMoonSun> 1fps
[23:21:02 CEST] <YaMoonSun> Or frame per hour if that's even possible.
[23:33:19 CEST] <c_14> ffmpeg -i jpg
[23:33:21 CEST] <c_14> eh
[23:33:47 CEST] <c_14> ffmpeg -framerate 1/3600 -i jpg -i audio -c:v libx264 -c:a copy out.mkv
[23:36:01 CEST] <YaMoonSun> You can do multiple inputs? Here my dumb self was trying to use the -map feature on a directory.. smh
[23:38:07 CEST] <DHE> -map 0:0 would be the jpg, -map 1:0 would be the audio. but the default is import everything
[23:38:31 CEST] <c_14> s/everything/one video, one audio and one subtitle stream/
[23:38:50 CEST] <YaMoonSun> The mapping feature only works on media containers, not directories, am I right?
[23:39:08 CEST] <c_14> ffmpeg doesn't work with directories
[23:39:12 CEST] <YaMoonSun> The video seems to have worked, but won't play because I didn't specifiy a frame rate I don't think.
[23:39:19 CEST] <DHE> unless someone wants to write such a feature. :)
[23:39:28 CEST] <YaMoonSun> Cheers, thanks for your help so far man.
[23:39:35 CEST] <DHE> closest is to make a movie out of a collection of files, but that's more a filename wildcard system
[23:39:37 CEST] <YaMoonSun> .iso support would be nice as well =p
[23:39:50 CEST] <c_14> Most players probably don't like the framerate being that low. Might want to duplicate frames with the output. or -loop 1 -t something
[23:40:47 CEST] <c_14> DHE: there actually is preliminary fs-navigation support, but nobody really likes the feature so it's avpriv
[00:00:00 CEST] --- Fri Oct 2 2015
More information about the Ffmpeg-devel-irc