[Ffmpeg-devel-irc] ffmpeg.log.20190520
burek
burek021 at gmail.com
Tue May 21 03:05:02 EEST 2019
[00:06:22 CEST] <AndrewR> bug (7913) created ...
[07:38:27 CEST] <th3_v0ice> How can I get in_ch_layout or any other field of SwrContext?
[07:43:04 CEST] <th3_v0ice> Is calling swr_alloc_set_opts() enough to reinitialize the SwrContext?
[07:51:38 CEST] <th3_v0ice> Seems that swr_alloc_set_opts() followed by swr_init() should reinitialized the SwrContext. First question remains tho.
[10:24:01 CEST] <cartman412> what would be the fastest way to extract a certain number of frames from a video? I want to populate a ranged slider with those frames. Slider is used to trim video.
[10:27:19 CEST] <cehoyos> With ffmpeg? ffmpeg -i input -vframes x -f rawvideo out
[10:30:33 CEST] <cartman412> well yes, with ffmpeg :)
[10:42:17 CEST] <cartman412> cehoyos: would that just extract the firsrt X number of frames? or would it extract X frames from start to end of video?
[10:42:32 CEST] <cartman412> Just realized my question wasn't all that clear
[10:42:49 CEST] <cehoyos> I don't understand your question: How would "extract X frames from start to end" work?
[10:44:01 CEST] <cartman412> Like, I want to extract 10 frames, including the first/last frame with all frames being equidistant to each other
[10:44:38 CEST] <cartman412> so if video is 30s long and I want 10 frames, I would like to extract a frame every 3 seconds
[10:52:53 CEST] <Ariyasu> you should script that
[10:54:07 CEST] <Ariyasu> store duration as a variable (can do with mediainfo cli) do maffs on the variable to workout timestamp you want to dump a frame at
[10:54:26 CEST] <Ariyasu> then dump frames with ffmpeg and -ss timestamp
[10:54:44 CEST] <Ariyasu> it cannot be done with 1 command so you need to do a bit of scripting work
[10:56:04 CEST] <cartman412> yeah that was my initial solution, then I moved to using '-skip_frame nokey' to only extract key frames (not as accurate but worked nicely), however it seems the versions I have access to on android/ios are outdated and don't support that command
[10:56:58 CEST] <cartman412> was just trying to see if there was a way to do it in a single command :)
[10:57:11 CEST] <cartman412> (that would be as fast as the scripted solution)
[10:57:48 CEST] <cehoyos> cartman412: Use the select filter to get an exact distance between the frames that are output
[10:58:43 CEST] <cehoyos> If you don't need an exact distance, skip_frame would work much, much faster. You should try to find out why it doesn't work on ios, as said the option was added many years ago
[10:59:31 CEST] <cartman412> yeah I thought so, it seems its running n3.0.1 which I believe supports skip_frame
[10:59:47 CEST] <cartman412> although when I run it it just throws a option not found error on skip_frame
[11:00:26 CEST] <cehoyos> We do not support 3.0, try current FFmpeg
[11:02:08 CEST] <cartman412> I'm actually calling it through Unity, using a plugin that provides a wrapper for the android/ios versions so I don't really have a way of upgrading versions myself :(
[11:02:31 CEST] <cartman412> might have to look into making my own wrapper and update to the current FFmpeg version
[11:03:39 CEST] <cartman412> thanks for all the feedback
[11:04:46 CEST] <cehoyos> Did you already test 3.0.1 on a more common operating system? I strongly suspect skip_frame works fine but your way of calling it does not work
[11:06:41 CEST] <cartman412> it works just fine on osx
[11:07:15 CEST] <cartman412> this is the command: https://pastebin.com/BtZLBwKv
[11:08:41 CEST] <cehoyos> Does not look complete, uncut
[11:10:25 CEST] <cartman412> the output you mean?
[11:12:35 CEST] <cehoyos> Yes
[11:12:59 CEST] <cehoyos> (If it is complete, uncut the source for the used binary was changed making the request less useful)
[11:13:07 CEST] <cehoyos> afaict...
[11:16:23 CEST] <cartman412> https://pastebin.com/LiytftJB thats all I see
[11:16:46 CEST] <cartman412> let me change the log level
[11:17:03 CEST] <cartman412> and make a new build
[11:18:15 CEST] <cehoyos> I suggest you make a sane build of current FFmpeg git head instead of hunting issues in outdated versions
[11:18:23 CEST] <cehoyos> with funny build options
[11:19:33 CEST] <cartman412> I understand, but It's not something I can do right now.
[11:43:17 CEST] <grosso> there is a way to send any custom data, in addition to audio and video, occasionally, over a continous live streaming?
[11:45:54 CEST] <grosso> ie "timed metadata"
[17:09:08 CEST] <Darxus> I did some web searching, but figured I'd try here before looking into other programs: I can't pause and resume with a key combination while recording my desktop with ffmpeg, right?
[17:24:42 CEST] <throstur> Is there an "easy way" to split a video to less than 2GB file chunks, so that they can be put on USB?
[17:24:59 CEST] <throstur> from what I can tell, I'll have to "guess" based on time
[17:25:54 CEST] <kepstin> throstur: on linux you can use the 'split' tool (has a byte size option), then put it back together afterwards with cat
[17:26:50 CEST] <kepstin> putting the file into an archive (e.g. zip) which supports multi-volume archives works too
[17:27:12 CEST] <kepstin> i wouldn't bother doing anything at the video level unless you require that each split file is independently playable
[17:28:59 CEST] <kepstin> you could also reformat your usb with a filesystem that doesn't have a 2gb size limit...
[17:30:37 CEST] <throstur> kepstin: problem with reformatting is moving 100gb of files around, problem with files having to be all playable is that I want to play them on the TV which has shoddy software
[17:34:26 CEST] <kepstin> well, that's pretty annoying. Yeah, as you saw, it looks like there's no easy way to do splitting based on file size in ffmpeg. In this case I guess you should go with the 'segment' muxer and pick the biggest round number for segment length (1 hour? 30 minutes?) that gives you small enough segments.
[17:36:16 CEST] <throstur> I guess I'll have to spoil for myself a little bit and just try to split it into chapters
[17:36:21 CEST] <throstur> with -ss and -to
[17:36:45 CEST] <throstur> pretty much same idea as segmenting but still guesswork
[17:37:12 CEST] <kepstin> if the original file has chapters, "ffmpeg -i file.mkv" should print out the start and end times so it's less guesswork
[17:41:24 CEST] <kepstin> the other trick I use is to play the video with `mpv --osd-msg1='${=time-pos}' --keep-open file.mkv` which shows a precise frame timestamp overlay, then you can seek and framestep to find the exact point to cut on :)
[18:40:25 CEST] <Lypheo> or just press Shift+o to toggle between OSD states
[18:40:36 CEST] <trashPanda_> Hello, I know this is slightly off topic. Does anyone know if DTS is required to be consistent (in order) between multiple program streams in a mpeg transport stream? Or can the two streams have DTS values going back and forth as long as its consistently increasing within the program stream?
[18:48:16 CEST] <DHE> each stream requires its DTS values to be strictly increasing (mindful of the overflow for long/continuous streams). and ideally each stream should be in very close proximity to each other
[18:55:55 CEST] <trashPanda_> ok, I was looking through as much documentation as I could find and I couldn't find mention of differing DTS order between program streams
[19:01:18 CEST] <trashPanda_> DHE, do you know where I can find the hard requirement written down abut the DTS needing to be strictly increasing?
[21:08:54 CEST] <frubsen> Hello all, does anyone have experience with ffmpeg and blackmagic decklink support?
[22:51:13 CEST] <DHE> trashPanda_: https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/mux.c#L617-L626 Code that enforces it
[23:00:09 CEST] <trashPanda_> DHE, thank you for taking the time to find that. I know of the code in ffmpeg, which is what led to the original question. I was browsing through the mpegts standard but I couldn't find any language matching that requirement.
[23:01:26 CEST] <DHE> it's what ffmpeg enforces. AVPackets must be presented in the order the decoder wants them (which is also the order in which the encoder produces them)
[23:07:00 CEST] <cehoyos> trashPanda: Do you have an issue with a timestamp reset (after >20hours) or is there another reason why your packets do not arrive in order?
[23:08:53 CEST] <trashPanda_> I don't have an issue with ffmpeg specifically, it was more a generalized video question because all the muxers (ffmpeg included) ive seen enforce this rule
[23:09:19 CEST] <trashPanda_> but I wasn't able to find anything in the standard about it, which is why I was wondering if there was somewhere else that it was written that the idea came from
[23:11:31 CEST] <cehoyos> Not sure, it may just be common sense, I suspect it is required for many formats while mpegts allows discontinuities
[23:13:00 CEST] <trashPanda_> Yeah its certainly what you would expect, I just wanted to find a hard quote on the policy. Ive been forced to use gstreamer lately (was previously using ffmpeg) for some Jetson development work
[23:13:16 CEST] <DHE> mpegts is a streaming protocol. discontinuities are for streamer resets. the question is specific about the dts being not quite monotonically increasing
[23:14:26 CEST] <trashPanda_> because I needed hardware encoding on the jetson, and the gstreamer mux doesn't support sparse metadata. The current "hack" to support it results in out of order packets between the streams
[23:15:25 CEST] <trashPanda_> I wish I could use ffmpeg on the Jetson, but from all the forum posts I read, nvidia seems pretty hard stuck on only supporting Gstreamer
[23:15:40 CEST] <trashPanda_> (with hardware acceleration anyway)
[23:17:24 CEST] <DHE> ffmpeg does have an nvenc driver. it can produce h264 and h265 (hardware permitting)
[23:18:29 CEST] <trashPanda_> the jetson doesn't seem to support nvenc, they're using omx-h264 and h265 for hardware accelerating
[23:26:15 CEST] <frubsen> Hi all, having an issue with ffmpeg recording through a blackmagic decklink and audio out of sync issues
[00:00:00 CEST] --- Tue May 21 2019
More information about the Ffmpeg-devel-irc
mailing list