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

burek burek021 at gmail.com
Thu Jan 28 02:05:01 CET 2016


[00:05:52 CET] <dorp> If one performs lengthy screen-capture sessions, what would be a recommended/common alternative to lossless x264, for mitigating the size of the exports? Simply using crf?
[00:06:11 CET] <J_Darnley> Do you want a lossless encode or not?
[00:06:58 CET] <dorp> J_Darnley: Well, I can't afford the size of the export, so I suppose the compromise can't be lossless?
[00:08:21 CET] <J_Darnley> You could try ffv1 as a lossless alternative (with -coder range_tab)
[00:08:37 CET] <J_Darnley> Otherwise, yes just give the crf you want to use.
[00:09:16 CET] <dorp> Hmm.. I was under the assumption that -qp 0 -preset ultrafast ... would produce the smallest export? (even smaller than ffv1?)
[00:09:41 CET] <J_Darnley> To be honest I don't know
[00:09:52 CET] <dorp> (tries it out)
[00:10:33 CET] <dorp> But in any case, if I can't afford lossless, then simply having crf is the next best thing?
[00:11:25 CET] <J_Darnley> Yes, you ask the encoder to provide a quality and the encoder will use as many bits as it thinks it needs
[00:11:51 CET] <llogan> lossless will probably suffice. just perform some tests.
[00:12:02 CET] <llogan> i mean lossy
[00:16:39 CET] <dorp> Hmmm, weird, I'm trying very low crf's... 0, 5, 10... and I was under the assumption that the cpu consumption will be higher than -qp 0 (same ultrafast preset)
[00:17:08 CET] <dorp> And it seems that the differences are relatively insignificance. So I guess it's a good thing
[00:17:26 CET] <dorp> insignificant*
[00:18:24 CET] <J_Darnley> That's because most of the time will be spend in entropy coder.  The time spent in it is proportional to the bitrate.
[00:19:03 CET] <J_Darnley> Oh wait, that was cabac and ultrafast use cavlc
[00:19:18 CET] <J_Darnley> Maybe the same applies (just to a lseer degree)
[00:19:21 CET] <dorp> So the higher the bitrate of the export- the less time spent?
[00:20:02 CET] <J_Darnley> No, I meant the opposite.
[00:20:49 CET] <dorp> But the bitrate of -qp 0 is the highest, wouldn't that imply that -qp 0 should consume more time?
[00:21:31 CET] <J_Darnley> Now we're just talking in circles.
[00:22:55 CET] <dorp> crf 10, exported 20Mbits/sec, 7 seconds
[00:23:11 CET] <Krish> Hi There , could anybody tell me where to place the external libraries for the enabling them with ffmpeg while compiling?
[00:23:12 CET] <dorp> qp 0, exported 55Mbits/sec, 6.2 seconds
[00:23:31 CET] <J_Darnley> Krish: anywhere your compiler can find them
[00:24:01 CET] <J_Darnley> If you want to use a special location then read the configure help and your compiler's manual.
[00:24:30 CET] <J_Darnley> Oh pkgconfig needs to find them too.
[00:24:40 CET] <Krish> i am using the msys 2 in windows. I tried the command gcc search dir
[00:24:59 CET] <Krish> and placed my lib file in the usr/lib
[00:25:09 CET] <Krish> but it says libx264 not found
[00:25:33 CET] <J_Darnley> Please post the whole log.
[00:25:38 CET] <Krish> Oh by the way, I managed to compile libx264 for windows 10,. Thanks for your help.
[00:25:59 CET] <J_Darnley> Was that me?  I remember being not much help to someone
[00:26:04 CET] <Krish> Henrik created a patch for x264 which made it compatible with win 10 RT
[00:26:18 CET] <Krish> well your giudance helped :)
[00:26:23 CET] <Krish> guidance*
[00:26:51 CET] <Krish> u and furq here.
[00:27:00 CET] <Krish> Now I am trying to compile it with ffmpeg
[00:27:01 CET] <furq> huh
[00:27:05 CET] Action: J_Darnley doubts that. J_Darnley distinctly remembers ranting and raving.
[00:27:12 CET] <Krish> heheh
[00:27:37 CET] <furq> J_Darnley? ranting and raving? never
[00:27:49 CET] <furq> certainly not in my lifetime
[00:27:54 CET] <J_Darnley> I suggest you use --extra-cflags and -I and --extra-ldflags and -L
[00:28:25 CET] <J_Darnley> If you're using gcc that is
[00:29:03 CET] <Krish> tried that, got this error in the log "-LC:/msys64/usr/local/lib" option ignored
[00:29:33 CET] <J_Darnley> gcc won't ignore options, that sounds like msvc again
[00:29:46 CET] <Krish> well a warning actually. After that the error " cannot open input file x264.lib
[00:29:57 CET] <Krish> yup , I am tring it for msvc mate
[00:29:57 CET] <furq> x264.lib definitely sounds like msvc
[00:30:01 CET] <Krish> need it for WinRT
[00:30:13 CET] <furq> i don't think putting those in /usr/lib will work but then i've never tried
[00:30:52 CET] <Krish> opened MSYS2 from MSVC as suggested by https://trac.ffmpeg.org/wiki/CompilationGuide/WinRT#Windows10x64
[00:31:02 CET] <Krish> without libx264 this is working fine
[00:31:29 CET] <Krish> the moment I include --enable-libx264 starts throwing error libx264 not found
[00:33:09 CET] <drv> -L should get translated to -libpath for MSVC
[00:33:31 CET] <drv> (looks right in configure to me)
[00:36:11 CET] <Krish> let me try
[00:38:40 CET] <Krish> --extra-ldflags="-APPCONTAINER WindowsApp.lib -libpath/usr/local/lib" is this fine? or the the slashes needs to be forward?
[00:39:39 CET] <drv> no, you should pass -L to configure so it can get translated correctly, or if you want to use -libpath yourself, it needs to have a colon between it and the path
[00:40:17 CET] <drv> -libpath:/usr/local/lib or whatever, should get translated because of the MSYS magic
[00:41:04 CET] <furq> sometimes msys pathnames don't work
[00:41:30 CET] <furq> you might need to pass the real path
[00:41:33 CET] <Krish> well -L is not working as mentioned above since the option is getting ignored
[00:41:49 CET] <furq> try with C:\\mingw\\usr\\lib or whatever the real path is
[00:43:29 CET] <Krish> --extra-ldflags="-APPCONTAINER WindowsApp.lib -libpath:C:\\msys64\\usr\\local\\lib" like this?
[00:43:49 CET] <Krish> the previous one threw error
[00:48:58 CET] <Krish> second one also threw error
[00:48:59 CET] <Krish> fatal error C1083: Cannot open include file: 'x264.h': No such file or directory
[00:49:48 CET] <drv> so then it's working, but you also need --extra-cflags with -I to the include path
[00:50:24 CET] <Krish> and -I in msvc converts to?
[00:54:04 CET] <drv> -I is the same in MSVC, shouldn't need to be converted
[00:55:49 CET] <Krish> but what about the path type
[00:56:45 CET] <Krish> should it be like -I/usr/local/include or? -IC:\\msys64\\usr\\local\\include
[00:56:53 CET] <drv> the same as whatever worked for -libpath
[00:59:55 CET] <Krish> tried both: both gives the error : x264.libLINK : fatal error LNK1181: cannot open input file 'x264.lib'
[01:06:11 CET] <hyponic> Hi. i have a stream that has a continuity error every few seconds. i was told that ffmpeg can fix this and and give an output without glitches. i wonder if this is true?
[01:07:48 CET] <hyponic> somthing like this: [mpegts @ 0xac4a40] Continuity check failed for pid 0 expected 7 got 0
[02:14:59 CET] <dorp> Is ffmpeg the right tool for precision (frame-accurate) cutting and joining of an exported video (x264, crf=10, variable framerate)?
[02:16:36 CET] <dorp> Is there a common tool for such a task, that wouldn't require a complete retranscode of the whole video, and would only retranscode the touched segments?
[04:24:04 CET] <TD-Linux> dorp, ffmpeg does not have that capability, and I don't know of a tool that does, sorry
[05:29:08 CET] <william_sg> Hi
[05:29:43 CET] <william_sg> i'm trying HLS  using vlc + ffmpeg ..
[05:30:15 CET] <william_sg> but im not sure what is the best transcodeing parameters for better quality  and to be able to play on mobile devices ..
[05:30:26 CET] <william_sg> source is  multicast stream ..
[05:32:26 CET] <william_sg> take a look  my script and parameters  her http://pastebin.com/NzYP3dDc
[05:32:28 CET] <william_sg> here*
[07:14:51 CET] <DHE> william_sg: what's the source video? 1.5 megabit video is a bit low for anything above 480p or so
[07:18:45 CET] <DHE> broadly speaking you shouldn't need -aspect, and for quality I wouldn't recommend ultrafast. at 480p most modern CPUs can keep up alright at "veryfast"
[07:37:23 CET] <william_sg> HI DHE , source is multicast stream  . it's a live tv channel
[07:38:00 CET] <DHE> yes. what resolution? SD?
[07:38:05 CET] <william_sg> yes SD
[07:38:13 CET] <william_sg> i have both SD and HD ..
[07:38:43 CET] <william_sg> if i put bit rate to  2M and higher .. it 's very slow to load .
[07:38:49 CET] <william_sg> on mobile device
[07:42:54 CET] <william_sg> im using apple mac mini and install fedora on it ..
[07:43:15 CET] <william_sg> i can only transcode about 3SD + 1 HD channel ..
[07:43:23 CET] <william_sg> and quality is still a bit low ..
[07:54:43 CET] <DHE> so, SD is usually interlaced. if so I'd recommend using a deinterlacer
[07:55:28 CET] <DHE> and switch from ultrafast to veryfast
[07:56:01 CET] <chandujr> hey guys
[07:56:27 CET] <chandujr> have anyone visited this site: http://cinekatz.com
[07:57:19 CET] <chandujr> i want to know what technology they've used to edit the videos there and put customized texts in it
[07:57:30 CET] <chandujr> anybody know about this?
[07:58:28 CET] <chandujr> We can upload pictures, give our texts and select a template video. Then the customized video will be generated within seconds.
[07:59:35 CET] <chandujr> i asked people, some have said that it's possible to have done using python and some video libraries, but he's not sure about it.
[09:52:11 CET] <dorp> Is ffmpeg capable of precision (frame-accurate) cutting/joining, without the requirement of a complete retranscode of the whole stream?
[10:00:13 CET] <DHE> no unless the whole video is made of key frames, because the video must start with a keyframe or playback would not be possible anyway
[10:06:17 CET] <furq> dorp: if you mean only transcoding the bits that you cut out, the trim filter might work
[10:06:26 CET] <furq> i'm not sure if it's frame-accurate though
[10:07:47 CET] <dorp> DHE: But theoretically, only the modified segment is required to be retranscoded, and not the whole stream, right?
[10:08:05 CET] <dorp> furq: I'm reading about it, thanks
[10:08:55 CET] <furq> dorp: http://superuser.com/a/682534/146437
[10:08:58 CET] <furq> something like that
[10:09:05 CET] <DHE> oh that... not sure if ffmpeg does it. in theory it can be done. there are some concerns about getting the encoding parameters right though. I've seen hardware devices become unhappy if something happens like the resolution changes without it being informed
[10:09:21 CET] <furq> except you probably want trim=start_frame=123:end_frame=456
[10:15:28 CET] <mike_papa> Hello. I need to record MJPEG stream from usb camera without recompressing it. Just as it is. How do I tell ffmpeg to just save it without recompressing?
[10:15:38 CET] <furq> mike_papa: -c:v copy
[10:16:07 CET] <mike_papa> furq: thanks. :)
[10:16:47 CET] <mike_papa> whole bunch of buffer underflow messages
[10:18:34 CET] <dorp> furq: Hmm, the documentation doesn't seem to elaborate on the nature of the filter, wouldn't that imply that a full retranscode of the whole stream is required? And not just the specific segments that are being trimmed?
[10:18:55 CET] <furq> unselected frames aren't processed at all
[10:21:30 CET] <dorp> furq: I'm not sure if my question was clear enough, my intention was to trim a few frames, within a lengthy video, that doesn't consist of strictly I frames
[10:22:00 CET] <dorp> Without the need to retranscode the whole thing, but only retranscode the mandatory modified segments
[10:22:43 CET] <BtbN> While in theory possible, I don't think you can easily do that with a plain ffmpeg command.
[10:23:13 CET] <BtbN> You could cut the video into a lot of parts, starting a new segment on every I frame, and then do the processing on each segment if neccesary.
[10:24:02 CET] <furq> does it matter if the segments start on an i-frame if you're encoding them and then concatting the encoded files together
[10:24:26 CET] <dorp> BtbN: I thought about that, but I wasn't sure if the re-stitching is guaranteed not to introduce a/v related side-effects?
[10:24:31 CET] <termos> ffmpeg does not write the CODECS attribute to my m3u8 files, is there a way to enable this in the muxer?
[10:25:27 CET] <furq> dorp: i should have thought the video would be fine, but i'm not sure about the audio
[10:26:33 CET] <dorp> Is there a native ffmpeg feature for such a thing, for splitting a video into segments, and later restitching them, or such a thing should be scripted?
[10:27:16 CET] <furq> afaik you'd have to run ffmpeg once per section and then one more time with -f concat
[10:27:19 CET] <BtbN> there is a segment output
[10:27:45 CET] <BtbN> or just tell it to output to a m3u8 HLS playlist, with 1 second segments, and it will cut at key frames
[10:28:10 CET] <furq> wouldn't that encode the whole input file
[10:28:13 CET] <furq> which is what he's trying to avoid
[10:37:37 CET] <chandujr> hey guys
[10:37:44 CET] <chandujr> have anyone visited this site: http://cinekatz.com
[10:37:57 CET] <chandujr> i want to know what technology they've used to edit the videos there and put customized texts in it
[10:38:04 CET] <chandujr> anybody know about this?
[10:38:30 CET] <chandujr> We can upload pictures, give our texts and select a template video. Then the customized video will be generated within seconds.
[10:38:48 CET] <chandujr> i asked people, some have said that it's possible to have done using python and some video libraries, but he's not sure about it.
[10:39:01 CET] <mike_papa> after using: 'ffmpeg -t 00:00:05 -f v4l2 -input_format mjpeg -r 5 -s 1280x720 -i /dev/v4l/by-id/usb-Creative_Technology_Ltd._Live__Cam_Connect_HD_VF0750_123456789abcdef0-video-index0 -c:v copy test.avi', I get whole bunch of 'Non-monotonous DTS in output stream 0:0; previous: 264, current: 59; changing to 265.' and video is 5 times slower then it should be.
[10:39:37 CET] <mike_papa> And ffmpeg doesn't stop after 5 seconds.
[10:40:01 CET] <_Vi> How do I turn off output buffering? With `-f matroska -` or `-f nut -` I don't immediately receive little frames, but with `-f mpegts -` or `-f avi -` I do.
[10:49:17 CET] <furq> mike_papa: use -framerate 5 instead of -r 5
[10:53:11 CET] <mike_papa> furq: Still didn't stop after 5 s. Non-monotonous DTS error still shows up. Video 3x slower then real life. Command I used:ffmpeg -t 00:00:05 -f v4l2 -input_format mjpeg -framerate 5 -video_size 1280x720 -i /dev/v4l/by-id/usb-Creative_Technology_Ltd._Live__Cam_Connect_HD_VF0750_123456789abcdef0-video-index0 -c copy test.avi
[10:55:16 CET] <relaxed> mike_papa: use -t after the input
[10:55:31 CET] <mike_papa> furq: and after stopping it, ffmpeg says: frame=  142 fps= 32 q=-1.0 Lsize=    8904kB time=00:00:16.10 bitrate=4530.5kbits/s speed= 3.6x. Why fps is 32?
[10:57:35 CET] <mike_papa> relaxed: It helped for stopping after 5 seconds. Thanks. Still video is 15 seconds instead of 5, and it is 3x slow motion.
[10:57:58 CET] <mike_papa> "frame=  123 fps= 34 q=-1.0 Lsize=    7569kB time=00:00:14.20 bitrate=4366.3kbits/s speed=3.87x"
[10:58:35 CET] <relaxed> pastebin.com the command and console output
[11:00:46 CET] <mike_papa> relaxed: here it is: http://pastebin.com/fFEhtW7v
[11:04:08 CET] <relaxed> hmm, maybe you need to use v4l2-ctl as stated in https://trac.ffmpeg.org/wiki/Capture/Webcam
[11:05:34 CET] <mike_papa> relaxed: seems that frame rate is good there: http://pastebin.com/R1hag8xT
[11:15:25 CET] <relaxed> and when you omit -framerate ?
[11:17:34 CET] <mike_papa> Still lot of Non-monotonous DTS, video frozen for first 2 seconds, than catching up for 1 second (double speed), then normal.
[11:17:58 CET] <an3k> I want to extract a video stream that's stored in two M2TS files. Is https://trac.ffmpeg.org/wiki/Concatenate the correct way?
[11:19:05 CET] <mike_papa> relaxed: When I changed time to 10 seconds it went well. No Non-monotonous DTS errors, video is good.
[11:19:17 CET] <an3k> Concat demuxer or Concat protocol
[11:19:22 CET] <mike_papa> it seems that lowering framerate couses problems.
[11:20:59 CET] <mike_papa> but v4l2-ctl --list-formats-ext shows that 5 fps is available.
[11:21:28 CET] <relaxed> mike_papa: try with -vsync 0 before the input
[11:24:49 CET] <mike_papa> relaxed: frame=  223 fps= 26 q=-1.0 Lsize=   14045kB time=00:00:22.30 bitrate=5159.4kbits/s speed=2.55x
[11:24:49 CET] <mike_papa> video:14034kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.077763%
[11:25:01 CET] <mike_papa> relaxed: video is almost 3x slower
[11:25:22 CET] <mike_papa> then it should. I believe it's 10s to 22.3s ratio now
[11:25:50 CET] <mike_papa> and bunch of those dts errors again
[11:26:43 CET] <mike_papa> maybe I should try grabbing series of jpeg images and then combine them to video file on PC? Actually I need only 1-2 fps.
[11:28:06 CET] <an3k> avisynth? :)
[11:28:45 CET] <relaxed> mike_papa: -vsync drop ?
[11:31:07 CET] <mike_papa> relaxed: http://pastebin.com/p1nB9EaF - video still ca. 3 x slower. But no errors.
[11:31:41 CET] <mike_papa> No DTS errors. It complains about not setting timestamps correctly.
[11:32:56 CET] <relaxed> it's slower on playback?
[11:35:05 CET] <mike_papa> relaxed: yes. On playback file is over 22 seconds long.
[11:35:21 CET] <mike_papa> relaxed: while recording took only 10 seconds.
[11:49:22 CET] <an3k> Whenever I try to directly read a Blu-ray: http://pastebin.com/9mn7VdXp
[11:51:45 CET] <mike_papa> relaxed: if I use -r 24 before output I get more or less good speed. But still, output doesn't have 5 fps.
[11:54:47 CET] <an3k> mike_papa: if you specify -r 24 your output will have 24 frames per second
[11:55:54 CET] <mike_papa> an3k: If I specify -r 5 (as input has 5 fps) I get 48.2 seconds output from 10 seconds input.
[11:56:30 CET] <mike_papa> an3k: If I don't use -r before output at all I get 22.5 seconds output
[11:57:53 CET] <an3k> mike_papa: what happens if you set -r 5 as an input option?
[11:58:44 CET] <mike_papa> an3k: -r 5 on input and nothing on output gives 48.2 s
[11:59:55 CET] <an3k> and with -framerate 5 as an input option?
[12:00:23 CET] <mike_papa> an3k: I have it.
[12:00:55 CET] <an3k> Great :) What's the solution? -framerate?
[12:01:51 CET] <mike_papa> an3k: no... It still doesn't work. I cannot get 5 fps avi from webcam. I can grab 5 fps from it, but I cannot save it into 5 fps avi.
[12:02:43 CET] <an3k> ah ok. Guess my brain needs some overhaul :(
[12:03:07 CET] <mike_papa> an3k: it's slow motion. If I force -r 23 (or 24) on output I get more or less 1x playback speed.
[12:03:32 CET] <an3k> mike_papa: is the recording exactly 10 seconds long? How many frames are in the created file?
[12:04:02 CET] <mike_papa> an3k: I use -t 00:00:10 so ffmpeg should make it 10s
[12:04:26 CET] <mike_papa> an3k: and it grabs 238 frames
[12:04:44 CET] <mike_papa> at least that's what it says at the end
[12:04:46 CET] <an3k> °_0
[12:05:51 CET] <mike_papa> an3k: see yourself: http://pastebin.com/ycpXM1cH
[12:09:09 CET] <an3k> hmm
[12:09:41 CET] <an3k> try -vframes 50
[12:10:07 CET] <mike_papa> an3k: on input?
[12:11:19 CET] <mike_papa> an3k: on output. It says frame=50, but file is 5s
[12:11:58 CET] <an3k> ok, now it does 10 fps
[12:13:09 CET] <mike_papa> ak3k: and recording took something like 1.7s (at least that's what my stopwatch, which I'm recording, says).
[12:16:06 CET] <an3k> ffmpeg -f v4l2 -framerate 5 -r 5 -input_format mjpeg -video_size 1280x720 -vsync drop -t 00:00:10 -i /dev/v4l/by-id/usb-Creative_Technology_Ltd._Live__Cam_Connect_HD_VF0750_123456789abcdef0-video-index0 -c copy -r 5 test.avi
[12:16:10 CET] <an3k> what does this do?
[12:21:32 CET] <mike_papa> 48s video file. After I moved -t to output. On input it deosn't work.
[12:23:55 CET] <mike_papa> Ok. I gtg now. I think I will record at 15 fps. It works good then.
[12:24:40 CET] <an3k> Ok, bye. sorry that we couldn't help.
[12:25:41 CET] <mike_papa> Bye. Thanks guys
[13:25:23 CET] <hyponic> Hi. i have a stream that has a continuity error every few seconds. i was told that ffmpeg can fix this and and give an output without glitches. i wonder if this is true?
[13:25:26 CET] <hyponic> somthing like this: [mpegts @ 0xac4a40] Continuity check failed for pid 0 expected 7 got 0
[13:28:19 CET] <waressearcher2> hyponic: hallo und herzlich willkommen
[14:41:35 CET] <YaMoonSun> -i "Input" -r 30 -q 1 "Output"%5d.jpeg should give me the highest quality video extractions without going to .png right?
[14:42:15 CET] <relaxed> YaMoonSun: yes
[14:44:32 CET] <YaMoonSun> Cheers, just confirming, I did -q 10 earilier and it looked questionable. Forgot the quality scale for a moment.
[14:53:39 CET] <hyponic> waressearcher2 i don't speak german i am sorry
[14:56:32 CET] <hyponic> waressearcher2 but google translate does! thanks. :)
[14:56:56 CET] <hyponic> waressearcher2 do you have an idea if ffmpeg can help me solve that problem?
[14:57:31 CET] <waressearcher2> nein, keine ahnung
[14:58:46 CET] <spaam> kaputt!
[16:18:20 CET] <dorp> If I take a video file and split it into segments, based on the I frames. The duration/length of the video and audio streams must be identical? ... because otherwise, when I wish to concat these segments, desn't this has the potential to cause an audio skew?
[16:19:16 CET] <JEEB> most containers have timestamps
[16:19:45 CET] <JEEB> so as long as your player is not completely retarded and you don't do dumb things during concatenation it should be OK
[16:22:10 CET] <dorp> JEEB: I've tried to make a testcase with MP4Box, I've removed the audio stream from one of the segments, and concated it back, and it seems like MP4Box would produce a skew (based on the length of said no-audio segment)
[16:22:19 CET] <YaMoonSun> I once tried to make a video a smaller file size by exporting the 6 hour long .ogg and then using a 144p jpeg that was complete blacked out and then I tried to make the video one frame per hour and youtube had a fit about it
[16:22:25 CET] <dorp> I'm trying to test it with ffmpeg too, but it seems that I'm doing something wrong with ffmpeg
[16:23:30 CET] <JEEB> dorp: no idea how mp4box fucks things up
[16:23:40 CET] <JEEB> but IIRC mp4 concatenation isn't a simple process to begin with
[16:24:16 CET] <JEEB> plus after checking your file is correctly muxed (use L-SMASH's boxdumper etc) you will have to check that the player you're testing with is also handling all the crap correctly
[16:24:36 CET] <JEEB> basically, instead of expecting things to do things right, check their output and confirm that shit is like it should be
[16:24:57 CET] <JEEB> of course checking that shit requires some specification reading as well :P
[16:25:11 CET] <JEEB> thankfully the 14496-12 is available for free
[16:27:03 CET] <dorp> JEEB: In the MP4Box case, not only the player would introduce th skew, MP4Box -info would show the concatenated export has the audio stream's duration shorter by the same amount of seconds
[16:27:23 CET] <JEEB> as I said, don't expect things to work like you'd think they work
[16:27:35 CET] <JEEB> use boxdumper et al to read the output file's timestamps and other things
[16:30:25 CET] <FilipeMaia> Hi. Is there a way to losslessly compress a series of png images and then decompress them?
[16:31:16 CET] <FilipeMaia> I tried ffmpeg -i input.png -c:v libx264 -preset ultrafast -qp 0 output.mkv followed by ffmpeg -i output.mkv -r 1/1 $filename%03d.png, but that left some artifacts
[16:32:02 CET] <c_14> You're going to need a codec that can encode rgb
[16:32:04 CET] <J_Darnley> 1 - that will convert rgb into yuv, try libx264rgb
[16:32:20 CET] <J_Darnley> 2 - that might drop frames to reach a framerate of 1
[16:32:55 CET] <c_14> If you're only compressing 1 png, just use -frames:v 1 ?
[16:34:18 CET] <FilipeMaia> Thanks, Ill give lib264rgb a try
[16:34:18 CET] <kbarry> c_14 I have a follow up question after your advice yesterday
[16:34:32 CET] <J_Darnley> If you don't want to change from png files then try a png compressor like opting, pngcrush, pngquant
[16:35:01 CET] <kbarry> http://pastebin.com/4U7SgFqd
[16:35:39 CET] <kbarry> stream 0  is 5:48, stream 1 is 3:00
[16:36:01 CET] <FilipeMaia> J_Darnley: The png was just a test. Eventually I want to try with some data from some scientific camera so any format is fine
[16:36:11 CET] <FilipeMaia> J_Darnley: I just dont know how to read/write yuv files
[16:36:50 CET] <kbarry> I am using the -t 348 and a -stream_loop -1 (on the 3:00 stream to try to produce a file that has the metadata including duration) of stream 0 with the audio of stream 1
[16:37:06 CET] <FilipeMaia> J_Darnley: we have many terabytes of uncompressed images, which are often similar. Im curious how much they can be compressed with modern compression technology
[16:37:11 CET] <kbarry> Also, the metadata isnt coming thru.
[16:37:16 CET] <J_Darnley> ha wow
[16:39:34 CET] <FilipeMaia> btw libx264rgb worked perfectly
[16:44:23 CET] <kbarry> I can't seem to get the metadata to clone from an input file to the output file
[16:46:40 CET] <J_Darnley> kbarry: you probably want -c copy unless you want to compress an already compressed file
[16:47:05 CET] <J_Darnley> as for the metadata, that looks "right" to me
[16:47:30 CET] <c_14> kbarry: you're missing the -map_metadata:g 0
[16:47:40 CET] <c_14> Also, it doesn't look like stream_loop works when you have multiple input files
[16:47:42 CET] <kbarry> c_14: Lemm e try that (again)
[16:47:42 CET] <c_14> For whatever reason
[16:48:05 CET] <kbarry> any reason why it chose the duration of the shortest file?
[16:48:14 CET] <c_14> You might just have to create a stream_loop'd version that's longer than the longest song you're trying to replace and then use that as input without the stream_loop option
[16:48:30 CET] <c_14> kbarry: because that was the audio stream you were using
[16:48:47 CET] <kbarry> Ahhh. Alright,
[16:49:10 CET] <kbarry> I seem unable to get the metadata to go thru
[16:49:21 CET] <kbarry> i just tried -map_metadata:g 0, no change
[16:49:34 CET] <kbarry> (been trying lots of iterations, trying to get a fix on the syntax. no luck.)
[16:49:49 CET] <kbarry> does it matter that I am changing the name of the file?
[16:50:06 CET] <kbarry> (ie, the output file will not have the same name as stream 0 ?
[16:52:26 CET] <kbarry> so, trying to not been a leech here. First thing I am doing is, creating a 20 minute look file of my original.
[16:52:37 CET] <kbarry> (so it will always be longer than the stream0
[16:52:52 CET] <derp_annex> Anyone have suggestions on how I can cut down the CPU utilization for this live transcoding: http://pastebin.com/NcPqry3V ?
[16:53:44 CET] <c_14> derp_annex: -preset veryfast
[16:54:10 CET] <derp_annex> @c_14 And ultrafast as well? haha
[16:54:51 CET] <kbarry> c_14:  OK, got the durration to work, using a super-long version of the stream I "was" trying to loop before.
[16:55:16 CET] <kbarry> My output file is the same duration as stream 0, not just need to get the metadata copied over.
[16:57:19 CET] <c_14> kbarry: ffmpeg -i a.mp3 -i b.mp3 -t 00:03:58.86 -map_metadata:g 0 -map_metadata:s:0 0:s:0 -c:v copy -c:a copy -map 1:a -map 1:v out.mp3 <- seems to work for me
[16:57:53 CET] <kbarry> Lemme give it a try, then i might have a few questions.
[16:59:30 CET] <c_14> Eh, that command is wrong. It should be 0:v not 1:v
[17:01:06 CET] <kbarry> yea, i fixed that,
[17:01:06 CET] <kbarry> Still no metadata.
[17:01:13 CET] <c_14> Oh, and while you're at it, add -fflags +bitexact -flags +bitexact
[17:01:48 CET] <c_14> How are you checking the metadata?
[17:01:51 CET] <kbarry> In the output, it shows that stream 0 has metata "publisher: Ninja tune, but later in the output, it shows metadata "tpub: Ninja Tune"
[17:02:03 CET] <kbarry> I'm on windows (sorry ahead of time)
[17:02:51 CET] <kbarry> And looking for the metadata on the file-browser
[17:02:52 CET] <c_14> Can you compare the outputs of ffprobe -of flat -show_streams -show_format blah.mp3 for the input and the output?
[17:03:20 CET] <kbarry> I can. Might have to wait a little. About to get off the trin.
[17:04:30 CET] <derp_annex> @c_14 Thanks for the suggestion.  I suppose I am going to need to research some more, considering I am republishing those three rtmp streams to HLS via nginx-rtmp.  This doesn't look like it's going to scale well. haha
[17:30:34 CET] <nfshr> HI all, i jsut wanted to create a small gif file from a mkv-clip. now i created one with '-s 320x174  "fps=15"' which just works fine. But now i wanted to create the same gif with a corresponding pallette file, which i created and used via '-filter_complex "fps=15,scale=320:-1:flags=lanczos[x];[x][1:v]paletteuse"' which amps up the output size from an acceptable 1.6MB without the palette, to an 180% whooping increase to 4.5MB.. why is this and
[17:30:34 CET] <nfshr>  how can i reduce the size?
[17:31:30 CET] <nfshr> my intuitun would be that both should be the same size, since both have the same fps and resolution...
[17:40:20 CET] <nfshr> corresponding full input lines: http://pastebin.com/raw/REHrGEy0
[17:48:42 CET] <kbarry> c_14, I think the metadata i am "seeing" may not be part of what windows displays.
[17:49:02 CET] <kbarry> IE, the metadata displayed in windows, it might be some "extra" metadata, possibly handled by the OS.
[17:56:27 CET] <salviaD> there is this 4k video on Vimeo, I can stream it OK, but if I download it  (with youtube-dl command line tool), the resulting .mp4 file has lots of lag/shuttering momments.  Is this something related to ffmpeg conversion?
[18:23:13 CET] <dorp> It seems that I'm back to square one... I would like to cut/join with precision (frame-accuracy), video+audio exports that do not consists only of I frames. As I understand the common convention would be to re-transcode the whole stream, I was wondering if there's an approach that would require to retranscode only the modified segment?
[18:23:43 CET] <c_14> sure, but it's a pain
[18:24:10 CET] <dorp> I tried to split the video into segments (based on I frame positions), but it seems that the considerations related to video/audio stitching is too complicated for me to comprehend
[18:24:10 CET] <c_14> You'd have to find the nearest i-frame at the section you want to modify cut there, then recode everything after it
[18:25:50 CET] <dorp> c_14: I'm willing to live with this compromise, but I'm not sure how to handle the stitching of the 'new' segment? If I simply split the .mp4 into segments, it's clear that the segments' video/audio streams do not necessraily have the exact same length/duration, how would one go about and stitch them together?
[18:28:56 CET] <c_14> You'll first have to find the timestamp of the i-frame nearest and before the point you want to cut then copy everything up to that point into a new file (preferably not mp4, something like mpegts is great for this). Then seek to the first frame after the i-frame and cut reencoding to the point where you actually wanted to cut and put that in another file (again preferably something like mpegts), then concat
[18:28:58 CET] <c_14> those two pieces
[18:29:31 CET] <c_14> The benefit of using mpegts in this case is that you can just cat them together
[18:29:57 CET] <c_14> And you have to make sure when encoding the section that you use the same codec/settings as in the part you cut out
[18:30:34 CET] <J_Darnley> nfshr: what about the full logs?
[18:30:51 CET] <c_14> This gets more fun when you want to avoid audio desync because the audio frame might not have the same boundary as the video frame, so it's probably best to do both separately
[18:32:31 CET] <dorp> c_14: Could you elaborate on the 'fun' part? Does that imply that I can't simply break a video into segments (based on I frames), and then stitch the segments together, and expect to be identical to the source?
[18:34:21 CET] <dorp> Maybe I should experiment with something other than mp4, such as mpegts/mkv and see where I stand
[18:35:03 CET] <c_14> The 'fun' part is making sure the audio and video stay in sync.
[18:35:22 CET] <c_14> Because the audio and video frames might not line up perfectly.
[18:36:45 CET] <c_14> And the problem with cutting a video at iframes and then just concatting it back together is that you'd have all the iframes you cut at twice right next to each other
[18:37:00 CET] <c_14> Because an iframe usually opens and closes a gop
[18:37:25 CET] <c_14> So in order to have 2 blocks that can be decoded independently of each other you'd have to have the iframe at the end of the first block and start of the second
[18:37:45 CET] <c_14> Which is why I mentioned cutting the part you reencode one frame after the nearest i-frame
[18:40:09 CET] <dorp> Well, I guess it's above my head, thanks for trying to explain that to me- I guess I better yet just 'try' and see whether I manage to get something I can live with, I just hate the idea of a full retranscode for such a thing, even if the retranscode is lossless
[18:45:36 CET] <nfshr> Full logs regarding my issue: http://pastebin.com/MA80zz3J , J_Darnley
[18:49:27 CET] <J_Darnley> I don't know what the problem is, sorry.
[18:49:49 CET] <J_Darnley> Perhaps try making sure the same thing is done in both runs.
[18:49:58 CET] <c_14> You'd probably have to ask the author of the paletteuse filter or read the source code.
[18:49:59 CET] <J_Darnley> you use fps filter in one and not the other
[18:50:38 CET] <J_Darnley> You also scale slightly differentlt
[18:50:43 CET] <J_Darnley> *differently
[18:51:21 CET] <nfshr> J_Darnley, hm..
[18:52:14 CET] <J_Darnley> Have you looked at the output and checked that both look similar and "correct"?
[18:52:21 CET] <nfshr> J_Darnley, well thx for looking into it
[19:17:25 CET] <hyponic> Hi. i have a stream that has a continuity error every few seconds. i was told that ffmpeg can fix this and and give an output without glitches. i wonder if this is true?
[19:17:28 CET] <hyponic> somthing like this: [mpegts @ 0xac4a40] Continuity check failed for pid 0 expected 7 got 0
[19:20:39 CET] <an3k> Is subtitle extraction (PGS) still not possible? I found https://trac.ffmpeg.org/ticket/2208 and have the same issue
[19:22:46 CET] <J_Darnley> I guess it isn't
[19:23:26 CET] <J_Darnley> There isn't a gread deal of support for "raw" subtitle formats
[19:25:33 CET] <an3k> So how do I convert them if I can't extract them in the first place?
[19:25:48 CET] <dorp> It seems that simply by using .mkv with mkvmerge, I have the capability of 'stitching' segments, and it will apply something for keeping the a/v syncing in-shape. (maybe it's not 'identical', but I can't hear/see any issue, so that would do)
[19:25:57 CET] <J_Darnley> Convert them to what?
[19:26:04 CET] <an3k> Any other format
[19:26:23 CET] <J_Darnley> Why not use eac3to like in that ticket?
[19:27:03 CET] <dorp> c_14: Thanks for the hint of ditching .mp4, .mkv with mkvmerge's capabilities are good enough for me ^
[19:28:34 CET] <an3k> J_Darnley: So I should use ffmpeg for the video stream, eac3to for two audio streams and eac3to again for four subtitle stream? That would take more than 3 1/2 hours to extract everything
[19:29:38 CET] <J_Darnley> If you want pgs format writing then you'd better write it.
[19:31:38 CET] <an3k> J_Darnley: I guess one can expect pgs format writing with a tool like ffmpeg?!
[19:32:20 CET] <J_Darnley> That's because nobody wrote it yet!  These things don't magically happen.
[19:32:47 CET] <J_Darnley> That ticket is 3 years old.
[19:33:02 CET] <J_Darnley> In that time nobody has stepped up with a patch.
[19:33:03 CET] <an3k> Yeah, especially after that period of time.
[19:33:12 CET] <J_Darnley> So clearly people don't care enough.
[19:34:20 CET] <an3k> Wow. I thought the devs would care of more or less completing their project
[19:34:52 CET] <J_Darnley> Yeah!  That's the only missing feature.  When that gets added we can all go home.
[19:35:58 CET] <an3k> Never said it's the only missing feature. I doubt it will take soooo much time to implement it specially the code is already there
[19:44:36 CET] <digidog> vspipe | via ffmpeg using ffms2 spits out that it has FAILED. Python exception: No attribute with the name ffms2 exists. Did you mistype a plugin namespace? - but of course ffms2 is installed. :$ I don't get it. I am sure I messed up sth with plugin paths etc. but the docs are too confusing ot be sure to know what to do ...
[19:49:40 CET] <durandal_1707> and this is not vapoursynth support channel
[20:01:25 CET] <durandal_1707> pgs are bitmaps
[20:01:27 CET] <an3k> digidog: why not directly sending to x264?
[20:01:47 CET] <durandal_1707> he need to process it
[20:02:45 CET] <an3k> digidog: have you imported ffms2? it's probably not in the vapoursynth autoloading libary directory
[20:58:33 CET] <johnnny22-afk> when using a m3u8 stream as input, ffmpeg starts downloading full speed, but after it has gotten a couple of segments, it seems to fetch one segment at the time more slowly, with a tiny 1 second gap between each segments being downloaded. While i did specify -live_start_index 1  and the stream has many many segments. Is there a reason for this ?
[21:00:54 CET] <J_Darnley> It downloads whatever is available then it has to wait for more to be produced?
[21:01:10 CET] <johnnny22-afk> nope, there's a lot available
[21:01:44 CET] <johnnny22-afk> it basically looks like the delay between ending the download of a segment and the time it takes for the next segment to start downloading...
[21:02:52 CET] <johnnny22-afk> testing something.
[21:07:00 CET] <johnnny22-afk> does -live_start_index need to be applied to the input or the output ?
[21:19:27 CET] <litb> hello all
[21:19:31 CET] <litb> I try to capture my desktop and stream it to raspberry pi 2
[21:19:38 CET] <litb> but raspberry only displays weird color war and then dies after a few seconds
[21:19:42 CET] <litb> (kodi hangs)
[21:19:48 CET] <litb> this is the ffmpeg command I use
[21:19:51 CET] <litb> ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 25 -s 1920x1080 -i :0.0 -acodec aac -strict -2  -preset fast -vcodec libx264 -crf 30 -threads 0 -f mpegts - | vlc -I dummy - --sout='#std{access=http,mux=ts,dst=:3030/}'
[21:20:00 CET] <litb> any idea what could be wrong with it?
[21:43:09 CET] <CFX> Hi everyone, I had a support question in case anyone is able to help me.
[21:44:00 CET] <CFX> I'll just leave it here in case anyone wants to
[21:44:54 CET] <CFX> I'm porting some old code using ffmpeg to the newest version of the libraries. I keep getting errors about deprecation of av_dup_packet(AV_Packet*) telling me to use av_ref_packet instead
[21:45:25 CET] <CFX> however av_ref_packet takes two arguments and I'm not exactly sure what am I suppossed to pass as the dst argument
[22:00:52 CET] <J_Darnley> CFX: is the message a warning or an error?
[22:01:00 CET] <J_Darnley> if its a warning just continue.
[22:01:28 CET] <J_Darnley> The code is still there just sort of "marked for future deletion"
[22:02:31 CET] <J_Darnley> I can't hep you with updating your use of the API
[22:09:23 CET] <debianuser> litb: Does it work if you just save it to a file and try to play it? e.g. `ffmpeg ... -f mpegts somefile.ts` then try to play somefile.ts locally or at raspberry
[22:17:09 CET] <CFX> it's actually an error
[22:17:14 CET] <CFX> It prevents compilation
[22:17:45 CET] <CFX> It's a video player, I'm not using the ffmpeg executables
[22:18:28 CET] <CFX> I've checked the source files, and I'm gonna try to do something like the actual source code does, and try to disable the deprecation checks
[22:18:59 CET] <CFX> to see if at least it gets by while I look for a proper solution
[22:21:09 CET] <derekprestegard> hey, does anyone have a good method for gop aligned abr segmented encoding?
[22:21:25 CET] <derekprestegard> e.e. taking a file and encoding multiple chunks of multiple bitrates all in parallel across a ton of servers?
[22:34:08 CET] <litb> debianuser: it works locally
[22:36:41 CET] <litb> debianuser: it doesn't play on kodi.. i only see green war
[22:38:59 CET] <litb> debianuser: also tried different pixel formats
[22:45:48 CET] <litb> debianuser: ah i needed yuv420p
[23:06:38 CET] <hyponic> is possible to get ffmpeg to automatically respawn if a hls steam is disconnected and try to pick up from where it was dropped?
[00:00:00 CET] --- Thu Jan 28 2016



More information about the Ffmpeg-devel-irc mailing list