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

burek burek021 at gmail.com
Sat Oct 27 03:05:01 EEST 2018


[00:00:35 CEST] <furq> the input file only contains audio and video
[00:00:38 CEST] <furq> so there's nothing to copy
[00:40:24 CEST] <steve___> I'm in the weeds a bit.  I'm trying to create a number of videos from different images and then concat with them some actual videos.
[00:40:47 CEST] <steve___> Here is the output of ffprobe for one of the videos -- https://p.zsw.ca/XT
[00:41:10 CEST] <steve___> err
[00:41:44 CEST] <steve___> https://p.zsw.ca/SR
[00:42:30 CEST] <steve___> Here is the output of ffprobe for the video I created using an image -- https://p.zsw.ca/EZ
[00:46:12 CEST] <steve___> after concat'ing those two videos, I get these errors via 'mpv' -- https://p.zsw.ca/7R
[00:46:41 CEST] <steve___> playing each video independently works fine
[00:47:00 CEST] <steve___> I'm using ffmpeg version 3.3.2
[01:11:38 CEST] <bodqhrohro_> What is the best approach for integrating ffmpeg with custom OpenGL processing module? Maybe frei0r, or something standalone that reads/produces a stream?
[02:02:32 CEST] <qwertymodo> @kepstin @iive and anybody else that helped me out yesterday, thanks.  I managed to throw together a gimp python script that was able to un-blend the video frames I fed into it.  Still needs some TLC to clean up the noise (and GIMP really needs to implement Python bindings for the GEGL functions, but that's another matter...), but I think this is at least a very solid starting point: https://twitter.com/qwertymodo/status/1055608341311811
[02:02:32 CEST] <qwertymodo> 584
[02:05:20 CEST] <iive> looks really good!
[02:18:03 CEST] <iive> btw, there are some patterns that repeat and it might not be entirely because of the quantization.
[02:18:40 CEST] <iive> some deinterlacers use data from more than 2 fields.e.g. 3 lines from one field picture and 3 from another...
[02:19:26 CEST] <iive> that of course makes it a bit harder to revert...
[02:19:36 CEST] <iive> anyway, gtg, keep the good work :D
[02:20:47 CEST] <iive> and I have feeling some images might be easier to reconstruct by copy/pasting parts of the non-blended frames ;)
[02:20:50 CEST] <iive> n8
[07:13:36 CEST] <JC_Yang> do anyone (re-)pickup ffserver(patch & fix) lately?
[08:50:45 CEST] <superware> I'm trying to use FFmpeg libav to remux a network stream to a TS file, but when I play the file it doesn't start from the first written frame (av_interleaved_write_frame) but rather starts with a blank period which corresponds to the network stream start offset from that frame... any ideas?
[09:43:14 CEST] <JC_Yang> do you have your ts processed correctly?
[13:11:01 CEST] <TheWild> hello
[13:11:12 CEST] <TheWild> ffmpeg -c copy ...
[13:11:23 CEST] <TheWild> why I'm getting: Unknown decoder 'copy' ?
[13:15:09 CEST] <th3_v0ice> superware: You can either set out_stream->start_dts = first_packet_dts; out_stream->start_time = first_packet_pts / time_base; or simply deduce first_packet_dts from each packet.
[13:19:48 CEST] <TheWild> ah, s**t. Never mind. Order of arguments is important.
[13:19:50 CEST] <iive> TheWild, position matters
[13:20:05 CEST] <TheWild> ffmpeg -i input -c copy ...
[13:21:46 CEST] <TheWild> iive: I ninja'd, but thanks anyway
[13:22:10 CEST] <iive> yeh, i was like a second slower :P
[13:54:41 CEST] <Harzilein> hmm
[13:56:03 CEST] <Harzilein> i used to know more about this... but say i have an audio player that is relatively simplistic about seek points, it'll happily skip mp3 decoding until it can decode again, but display the time offset from what you entered as seek position
[13:57:28 CEST] <Harzilein> i now want a list of seek offsets i can safely jump to without getting the wrong time (in seconds) displayed... do i need ffprope -show_packets? how do i find out if it's basically an "audio i-frame"?
[13:57:52 CEST] <Harzilein> (maybe the right intuition is to use -show_frames? but that is for video, right?)
[13:57:52 CEST] <JEEB> most audio players quickly parse through the whole file
[13:58:11 CEST] <JEEB> so in lavf terms they just open a demuxer and get the offsets where to begin for packets
[13:58:14 CEST] <JEEB> and the duration
[13:58:22 CEST] <JEEB> this is for audio without containers, like mp3
[13:58:50 CEST] <JEEB> both video and audio output frames, just that there's generally a whole lot more audio frames than video frames in general :P
[13:59:06 CEST] <JEEB> since a typical audio frame could contain 960 or 1024 samples, out of 48000 for example
[14:03:00 CEST] <Harzilein> i was desperate so i started manually trying if something is a start position or an overshoot position. player is xmms2 0.8, file is http://rcveeder.net/clash/cotti30.mp3, i can tell it to seek to $(( (6 * 60) + 51 )) and while that might not be a correct position, $(( (6 * 60) + 52 )) will be an overshoot. how can i determine that fact from ffprobe output?
[14:04:14 CEST] <Harzilein> it tells me key_frame for each of the frames :/
[14:04:26 CEST] <JEEB> in mp3 they all are
[14:04:34 CEST] <JEEB> your problem is that the seek you're trying to do is done through guesstimation
[14:04:52 CEST] <JEEB> which is why I say that your player has to use libavformat to first parse through the file
[14:04:59 CEST] <JEEB> "index" it if you may
[14:05:15 CEST] <JEEB> then you know the byte-wise indices
[14:05:23 CEST] <JEEB> and you can use byte-wise seek
[14:05:28 CEST] <JEEB> and get where you want
[14:05:44 CEST] <Harzilein> really? a music player that specializes in music playing guesstimates the positions based on cbr? i'll have to dig into this, that can't be true :D
[14:06:30 CEST] <JEEB> no, I mean mp3 doesn't have a container or index
[14:06:35 CEST] <JEEB> it's raw mpeg-1 layer 3
[14:06:41 CEST] <JEEB> the only way to accurately seek in it is to index the file
[14:06:45 CEST] <JEEB> to know where the audio packets are
[14:07:09 CEST] <JEEB> and since in case of mp3 all packets are "you can start decoding here", you just need to know how many packets there are and where each of them begins
[14:07:33 CEST] <JEEB> that way you can better estimate the length as well as do seeking
[14:07:47 CEST] <JEEB> if you are using libavformat without first doing this sort of indexing and seeking based on duration
[14:07:51 CEST] <JEEB> that is *guessing*
[14:07:57 CEST] <JEEB> because that's all that libavformat at that point can do
[14:08:07 CEST] <JEEB> I hope that's clear enough
[14:08:09 CEST] <Harzilein> yeah, i get it. and i understand that xmms2 wants to unify streaming and file urls and may only do deferred indexing, but this seems wrong...
[14:08:43 CEST] <JEEB> basically seeking without indexing an mp3 file can only work if the encode packets are all the same size
[14:08:46 CEST] <JEEB> aka CBR
[14:08:50 CEST] <JEEB> but a whole crapload of files are not
[14:09:04 CEST] <JEEB> all the players including foobar2000 seem to just index the stuff :P
[14:09:09 CEST] <JEEB> the FFmpeg APIs let you do that too
[14:11:08 CEST] <JEEB> and that is why I'm happy that no-container audio didn't really take off outside of mp3 :P
[14:11:20 CEST] <JEEB> it's a mess and herp derp
[14:13:33 CEST] <Harzilein> so basically i'd need to extract xmms2 (mad-based? not sure) seeking formula in order to predict if it will seek correctly... but the assumption is that it's unlikely that it will converge to the vbr positions later anyway (again, the goal here is to get second precision, so i have _some_ hope)
[14:14:02 CEST] <JEEB> well you'd have to dive into the code of that player and make sure it indexes non-containerized formats
[14:14:08 CEST] <JEEB> otherwise the seeking will be all over the place :P
[14:14:52 CEST] <JEEB> well not all over the place, but not necessarily where you wanted it to be
[14:16:08 CEST] <Harzilein> JEEB: i'd be somewhat fine with that if i can have "segments" where at the start, the guessed offset happens to match the correct offset with second precision
[14:16:44 CEST] <JEEB> that might or might not be possible, you'll have to see how the player you're talking about is actually doing it then :P
[14:18:12 CEST] <Harzilein> JEEB: basically i want to insert timestamps into the text adventure transcript of an episode where they read that podcast. going from a transcript position to an mp3 position is "nice to have" but it'd not be crippling the concept if only a small subset of those points would be marked for that
[14:18:34 CEST] <Harzilein> s/read that podcast/read that text adventure/
[14:19:26 CEST] <Harzilein> it'd be overkill to include ffmpeg in the if interpreter :D
[14:20:26 CEST] <Harzilein> yeah, i'll look at that. maybe they are conservative about wether they want to do the indexing because they assume people use smb shares etc.
[14:20:33 CEST] <Harzilein> but still have the functionality
[14:21:14 CEST] <Harzilein> but once i have a mapping from second to guessed position, getting my "is it correct-ish" answer from ffprobe output should be easy, thanks.
[14:23:31 CEST] <Harzilein> looking at xmms_mad_seek, now i remember, vbr working was about those xing headers... ffprobe can tell me if those are present, right?
[14:23:55 CEST] <Harzilein> vbr seeking*
[14:24:20 CEST] <Harzilein>                 bytes = xmms_xing_get_toc (data->xing, i) * (xmms_xing_get_bytes (data->xing) / 256);
[14:24:23 CEST] <Harzilein>                 bytes = (guint)(((gdouble)samples) * data->bitrate / data->samplerate) / 8;
[14:24:24 CEST] <Harzilein> :D
[14:24:38 CEST] <Harzilein> +/* vs. */
[14:27:32 CEST] <JEEB> not sure what the header contains, as I prefer general solutions, and just parsing (not even decoding) mp3 is generally quick :)
[14:30:22 CEST] <Harzilein> there's bound to be a xing header example in the samples collection *digs*
[15:02:40 CEST] <TheAMM> Ello minus
[15:03:53 CEST] <minus> well yes hello
[15:26:25 CEST] <feedbackmonitor> Hi, I have a folder full of MTS files that I need converted to MOV, without quality loss, can anyone provide me with the command to do this?
[15:28:25 CEST] <JEEB> remuxing in that case
[15:28:32 CEST] <JEEB> keeping the original video/audio tracks
[15:34:27 CEST] <feedbackmonitor> JEEB, So ffmpeg is not the tool fo rthis?
[15:39:02 CEST] <durandal_1707> feedbackmonitor: do you know what remuxing means?
[15:39:15 CEST] <feedbackmonitor> durandal_1707, Swapping containers?
[15:40:18 CEST] <JEEB> feedbackmonitor: FFmpeg can do it just fine, just noted what you have to do for it keyword-wise :P
[15:41:20 CEST] <feedbackmonitor> Can you perhaps provide the command for this, to convert a folder full of MTS to MOV format files?
[15:42:07 CEST] <feedbackmonitor> Though maybe this is not a good idea, the MTS format has different frame rates...
[15:45:18 CEST] <feedbackmonitor> I guess there should be a frame rate adjustment too?
[15:48:46 CEST] <durandal_1707> why?
[16:00:06 CEST] <Harzilein> JEEB: heh, turns out the file is actually cbr, but it has a xing header present which makes the seeking _more_ coarse :D
[16:01:36 CEST] <Harzilein> JEEB: so i have a marginal/arbitrary need to use ffprobe to determine the length in seconds, then divide that by 100 and i have the duration of each segment i can seek to
[16:01:59 CEST] <JEEB> I don't know why you're just using ffprobe instead of fixing teh application you're using?
[16:02:05 CEST] <JEEB> since you clearly are not using the FFmpeg APIs
[16:09:43 CEST] <Harzilein> JEEB: i'd use ffprobe for the data but i'm fine with using an inferior player for the implementation if that means i can be lazier with the code
[16:12:23 CEST] <JEEB> I really don't get it :P
[16:18:45 CEST] <feedbackmonitor> Sorry, my computer locked up and culd not get any response, if there was any
[16:20:42 CEST] <durandal_1707> feedbackmonitor: try: ffmpeg -i input -c copy out.mov
[16:22:44 CEST] <lowin> Hello. Is there a filter to average every couple of video frames into a single frame? I think it's called long exposure. but I can't find any info on it that doesn't involve splitting the video into frames and then joining them in multiple steps
[16:23:20 CEST] <durandal_1707> lowin: tmix
[16:23:37 CEST] <lowin> durandal_1707, oh awesome
[16:27:08 CEST] <feedbackmonitor> durandal_1707, There are two things; 1) I have a folder full of MTS files, 2) it is my understanding that ffmpeg needs to be instructed about the quality of output, so I want the results to be decent, if possible.
[16:27:35 CEST] <feedbackmonitor> So for the first part, can I tell ffmepg to recursively go through the folder and convert?
[16:28:17 CEST] <feedbackmonitor> The second, can I tell ffmpeg to output in decent quality, nothing too crazy?
[16:28:33 CEST] <relaxed> 1) stream copies are lossless 2) script ffmpeg to do it using a shell
[16:28:49 CEST] <relaxed> mixed those up :)
[16:30:39 CEST] <feedbackmonitor> I guess the simpler solution is to find a video editing program that can handle MTS formats
[16:30:46 CEST] <feedbackmonitor> ; - b
[16:31:56 CEST] <relaxed> ffmpeg can handle remuxing to mov if you have the space
[16:32:24 CEST] <feedbackmonitor> Yeah, it's the scripting part I am not up on
[16:32:39 CEST] <feedbackmonitor> I need to take a few classes in scripting before I can do this project
[16:32:47 CEST] <feedbackmonitor> : - D
[16:33:22 CEST] <relaxed> is this linux, mac, or windows?
[16:33:39 CEST] <feedbackmonitor> relaxed, linux
[16:34:27 CEST] <relaxed> in the directory conatining the videos run,  for i in *ts; do ffmpeg -i "$i" -c copy "${i%.*}".mov; done
[16:38:31 CEST] <steve___> I have two videos that I'd like to join.  One of the two videos I created from a jpg using this command: ffmpeg -y -loglevel -8 -framerate 1 -i stills/wte01-%02d.jpg -c:v libx264 -r 30 -pix_fmt yuv420p 02-wte01.m4v
[16:39:04 CEST] <steve___> How do I go about concat'ing the two videos.  I don't mind reencoding.
[16:39:57 CEST] <relaxed> steve___: you'll probably need to use the concat filter:  https://trac.ffmpeg.org/wiki/Concatenate
[16:44:14 CEST] <steve___> relaxed: yeah i was trying that as well as -filter_complex but I was running ashore
[16:44:46 CEST] <relaxed> pastebin.com your complete command and output for help
[16:44:51 CEST] <steve___> relaxed: At first I tried 'ffmpeg -y -f concat -safe 0 -i ./meta -c copy'  It concat the two video but there is a pause between video1 and video2
[16:45:38 CEST] <steve___> here is the output of that command -- https://p.zsw.ca/6D
[16:47:11 CEST] <steve___> ffprobe of video1 -- https://p.zsw.ca/TG   video2 -- https://p.zsw.ca/RU
[16:50:24 CEST] <relaxed> they're different framerates
[16:52:38 CEST] <steve___> relaxed: what is my best bet to get around that?
[16:53:52 CEST] <steve___> relaxed: Just so I'm with you, you're talking about 29.97 fps vs 30 fps, right?
[16:54:42 CEST] <relaxed> yes, try the concat filter
[16:54:48 CEST] <microcolonel> Is there (mature) support for producing Apple CAF files?
[16:55:03 CEST] <microcolonel> I want to play Opus streams on Safari and for some reason they haven't implemented standard containers for this
[16:55:22 CEST] <microcolonel> -f caff should work?
[16:55:46 CEST] <JEEB> yes, opus is there it seems
[16:55:53 CEST] <JEEB> in libavformat/cafenc.c that is
[16:55:54 CEST] <steve___> relaxed: for video2, I set "-r" to 29.97 and it seem to work.  Is this wise?
[16:56:10 CEST] <feedbackmonitor> relaxed, I ran that command, but no results came from that but "No such file or directory", oh well.
[16:56:23 CEST] <JEEB> I don't know what you ran
[16:56:48 CEST] <JEEB> ffmpeg -i welp.opus -c copy out.caf
[16:56:52 CEST] <JEEB> should "just work" in theory
[16:57:16 CEST] <steve___> feedbackmonitor: cd to the dir with the ts files and then run the command
[16:57:18 CEST] <JEEB> forcing the muxer only is required when there's multiple things with the same extension
[16:58:51 CEST] <feedbackmonitor> steve___, I did indeed do that, and they are MTS files
[16:59:40 CEST] <steve___> then maybe -- for i in *TS; do ffmpeg -i "$i" -c copy "${i%.*}".mov; done
[17:01:05 CEST] <feedbackmonitor> steve___, https://pastebin.com/ZZYDLW3u
[17:01:53 CEST] <feedbackmonitor> steve___, wait, https://pastebin.com/HXjddiuE
[17:01:55 CEST] <feedbackmonitor> there
[17:03:20 CEST] <steve___> feedbackmonitor: ah, you have to paste the entire command.
[17:04:20 CEST] <feedbackmonitor> steve___, I suspect everything after the word "do" is the command
[17:04:45 CEST] <steve___> everything after my "--" is the command
[17:05:35 CEST] <microcolonel> hmm
[17:05:51 CEST] <microcolonel> JEEB: I guess I'll find out when I get a Safari user to confirm
[17:06:07 CEST] <microcolonel> thx
[17:07:29 CEST] <feedbackmonitor> steve___, Ahh, I see. Thanks. But the results are highly pixelated.
[17:07:35 CEST] <feedbackmonitor> : - (
[17:08:28 CEST] <feedbackmonitor> Then I suspect that FFMPEG really needs to convert these files proper
[17:09:29 CEST] <durandal_1707> feedbackmonitor: pixelated? -c copy does not change video/audio
[17:10:21 CEST] <feedbackmonitor> durandal_1707, That's the results I have, even the output sizes are smaller
[17:11:49 CEST] <durandal_1707> you are doing something wrong
[17:12:12 CEST] <feedbackmonitor> durandal_1707, Sure
[17:12:54 CEST] <feedbackmonitor> I just copy and pasted the commands, but if there is something better, I am open to pasting that too
[17:13:06 CEST] <JEEB> microcolonel: I think someone tested it back when the patch was posted
[17:13:09 CEST] <JEEB> so in theory it should work
[17:17:03 CEST] <sakrecoer> hi! is it possible to use ffmpeg to inject the necessary metadata for webservices to detect that the video is a 360 video with equirectangular projection ?
[17:18:28 CEST] <sakrecoer> my websearch fu is failing me miserably... i know exiftool can add some xmp stuff, but it seems most webservices rquire the information on the codec level (? bare with me, i'm not very good at all this)
[17:19:18 CEST] <durandal_1707> no
[17:19:38 CEST] <durandal_1707> but there are scripts that do it
[17:19:40 CEST] <feedbackmonitor> durandal_1707, Here is the output of what happened: https://pastebin.com/EFmKyFNJ
[17:21:04 CEST] <sakrecoer> thanks durandal_1707 :) i'm aware of googles spatial thing, but i can't find anything that runs on GNU+Linux. any links to such scripts, please?
[17:22:31 CEST] <durandal_1707> feedbackmonitor: make sure to compare with input file
[17:23:40 CEST] <feedbackmonitor> durandal_1707, What do you mean?
[17:24:06 CEST] <feedbackmonitor> Are you saying that the input file is pixelated therefore the output file is pixelated?
[17:24:47 CEST] <durandal_1707> feedbackmonitor: yes, compare visually both input and output
[17:25:20 CEST] <feedbackmonitor> durandal_1707, The input is very nice, the output is very shitty.
[17:26:04 CEST] <durandal_1707> feedbackmonitor: take screenshot of both of them?
[17:26:43 CEST] <feedbackmonitor> durandal_1707, Sure
[17:34:36 CEST] <sakrecoer> ok if anyone else wonders, this helped me imensly :) https://github.com/google/spatial-media/tree/master/spatialmedia
[17:35:00 CEST] <sakrecoer> thanks for you hint durandal_1707 it made me find that thing :)
[17:48:57 CEST] <feedbackmonitor> durandal_1707, You are correct and I am not correct. I double checked and I had an issue copying my originals to another drive for conversion. The MTS copies were corrupted so I copied the originals over again and this time it looks okay.
[17:49:04 CEST] <feedbackmonitor> durandal_1707, Thanks for your patience.
[17:49:46 CEST] <durandal_1707> feedbackmonitor: just dont overwrite originals
[17:50:17 CEST] <feedbackmonitor> durandal_1707, I have the originals backed up on another drive. : - )
[17:51:48 CEST] <feedbackmonitor> When i filmed at the time, I did not fully understand my camera and recorded in the MTS format, now I know my camera a little better. It records best at MOV, which is less shitty
[17:53:51 CEST] <feedbackmonitor> So I have all this footage that should have been shot at MOV and I cannot re-shoot so am stuck with the MTS
[18:01:15 CEST] <furq> feedbackmonitor: if the quality of the actual streams is the same then it's probably better to use ts
[18:01:38 CEST] <furq> mp4/mov etc will be unplayable if the recording gets interrupted and the camera can't write the header
[18:02:23 CEST] <feedbackmonitor> furq, The MOV has a higher quality out put. The file sizes are MUCH LARGER.
[18:02:44 CEST] <furq> that sounds fun
[18:02:51 CEST] <furq> i guess just don't drop the camera then
[18:03:11 CEST] <feedbackmonitor> furq, Whereas an interview segment in MTS is under a gig, in MOV that same segment is several gigs., A half hour interview is 32 gigs in MOV whereas it may be two gigs in MTS
[18:04:04 CEST] <feedbackmonitor> Oddly, even though MTS is smaller, it looks really good
[18:04:30 CEST] <furq> yeah the output you pasted says it's 1080p h264
[18:04:44 CEST] <furq> so i don't know what the mov would be recording that's so much bigger or better quality
[18:04:47 CEST] <furq> unless it's prores or something
[18:04:58 CEST] <feedbackmonitor> furq, There are various h264 apparently
[18:05:15 CEST] <feedbackmonitor> All the MTS and MOV are h264
[18:05:23 CEST] <furq> weird
[18:05:24 CEST] <feedbackmonitor> with different levels of quality
[18:05:39 CEST] <feedbackmonitor> furq, I have a Panasonic GH3
[18:43:21 CEST] <fsphil> any handy media files on the net with variable frame rates, or other unusual but valid setups I could use to test with?
[18:44:03 CEST] <furq> https://samples.ffmpeg.org/archive/extension/mp4/mov+mpeg4+aac++vfr.mp4
[18:44:06 CEST] <furq> and samples.ffmpeg.org in general
[18:44:25 CEST] <fsphil> ah brilliant. thanks
[21:20:22 CEST] <alimiracle> hi
[21:20:35 CEST] <alimiracle> its this concatenation method performs a re-encode or not?
[21:20:44 CEST] <alimiracle> ffmpeg -f concat -i concat.txt  -c:v copy merged.mp4 -y
[21:21:41 CEST] <JEEB> not re-encoding but IIRC that can go wrong in o9k ways if you happen to hit it with input it wasn't meant to handle by the original author
[21:21:45 CEST] <JEEB> or wait
[21:21:51 CEST] <JEEB> you are only specifying copy for video
[21:21:58 CEST] <JEEB> so everything that is not video is getting default re-encoded
[21:22:16 CEST] <JEEB> (audio and subtitles)
[21:24:12 CEST] <alimiracle> <JEEB> I nede dont  re-encoded everything
[21:27:00 CEST] Last message repeated 1 time(s).
[21:28:35 CEST] <JEEB> come back when you can make that into an English sentence, thanks
[22:55:22 CEST] <alimiracle> hi
[22:55:25 CEST] <alimiracle> I'm concatenate two mp4 files using ffmpeg
[22:55:30 CEST] <alimiracle> I'm use this
[22:55:37 CEST] <alimiracle> ffmpeg -f concat -i mylist.txt -c copy output
[22:55:44 CEST] <alimiracle> its this method dont performs a re-encode to all data in file??
[22:58:35 CEST] <alimiracle> if this method  performs a re-encode to sum data in file??
[22:59:12 CEST] <alimiracle> can you gave me the tru method
[00:00:00 CEST] --- Sat Oct 27 2018


More information about the Ffmpeg-devel-irc mailing list