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

burek burek021 at gmail.com
Thu Oct 26 03:05:02 EEST 2017


[00:32:21 CEST] <lightbulb6> hello, is there a filter in ffmpeg that would inverse the 'tile' filter?
[00:32:36 CEST] <lightbulb6> basically I've got a big photo and want to split it into smaller ones
[00:32:58 CEST] <Johnjay> lightbulb6: don't know. i would have guessed that's what a filter named tile does
[00:33:21 CEST] <lightbulb6> Johnjay: the 'tile' filter takes smaller images and arranges them to create a big one
[00:33:35 CEST] <Johnjay> i see
[00:33:36 CEST] <lightbulb6> so it's the opposite thing
[00:33:42 CEST] <JEEB> source->split (creates X copies of the source)->crop each accordingly->use those cropped ones as encoder input
[00:33:53 CEST] <JEEB> some manual math needed but I think this does it :P
[00:34:02 CEST] <lightbulb6> okay, gonna try it
[00:34:03 CEST] <lightbulb6> thanks
[00:34:13 CEST] <Johnjay> JEEB: i've noticed there are lots of tasks needing manual math
[00:34:20 CEST] <Johnjay> and you just want to say why can't a filter do this instead lol
[02:50:59 CEST] <Compy_> Hey guys and girls. I'm working on a raspberry pi 3, and I'm wondering, does ffplay specifically have playback support using OMX? I'd rather use it compared to omxplayer.
[02:51:43 CEST] <Compy_> I _did_ compile ffmpeg enabling omx and omx-rpi. Not sure if it was only for the encoding side though
[03:25:02 CEST] <Johnjay> Compy_: well you got farther than i could. Because I couldn't even get ffmpeg to compile.
[03:29:30 CEST] <Compy_> oh?
[03:54:45 CEST] <Johnjay> Compy_: pm me how you got it work if you had to do anything special
[03:55:30 CEST] <Compy_> I just downloaded the ffmpeg master branch from git, did a ./configure --enable-shared --enable-omx --enable-omx-rpi, make, make install
[03:55:39 CEST] <Compy_> Not sure what issue you got when compiling, and at what step.
[04:12:43 CEST] <Johnjay> well.
[04:12:49 CEST] <Johnjay> i don't recall exactly, only that it said missing libraries
[04:13:09 CEST] <Johnjay> and no matter what i did i couldn't get it to pass ./configure, it seemed to expect certain libraries that just weren't there
[04:13:14 CEST] <Johnjay> and i had no clue how to proceed
[05:09:42 CEST] <kode54> I have to wonder what happened to my iTunes Gapless MP3 patch?
[05:10:11 CEST] <kode54> I submitted a FATE test for it, but haven't seen the actual patch it depends on appear
[05:11:02 CEST] <kode54> simple patch, depended on ID3v2 reading, and then I had to add a patch for ID3v2.2 comment frames, since iTunes on Mac writes 2.2 tags
[07:01:31 CEST] <cosven> #mopidy
[08:18:36 CEST] <memeka> hi; how are decoded frames sent to the video drivers? profiling gstreamer and mpv+ffmpeg, I get very different results: on my arm board with no dmabuf-import gpu support, gstreamer spends most of the time doing memcpy, and less in the gpu driver, but mpv+ffmpeg spends most of its time in the driver: 72% libmali.so   cobjp_neon_linear_to_block_8b_8x8 ; 16% libmali.so   cobjp_neon_linear_to_block_16b_8x8, 7% memcpy
[10:09:36 CEST] <goodafternoon> hi there
[10:09:54 CEST] <goodafternoon> how to convert from .opus to .mp3 please ?
[10:21:18 CEST] <DHE> ffmpeg -i input.opus [mp3-options] output.mp3
[10:27:48 CEST] <Rathann> hi
[10:28:34 CEST] <Rathann> is it possible to use vdpau or vaapi (with non-Intel gfx) on something else than x86 arch?
[10:28:55 CEST] <Rathann> say, arm or ppc?
[10:29:57 CEST] <memeka> Rathann: yes, but there are others for e.g. arm
[10:30:40 CEST] <memeka> Rathann: from what i know there are vdpau implementations for other archs, so ffmpeg doesn't do anything extra
[10:31:38 CEST] <Rathann> ok
[10:32:25 CEST] <memeka> is there anything specific you are interested in?
[10:38:36 CEST] <Rathann> memeka: no, I just saw that vdpau gets automatically enabled in our ffmpeg package builds in RPMFusion on non-x86 and was wondering if I should disable it explicitly or leave it
[11:31:05 CEST] <cosven> #mopidy
[11:32:20 CEST] <CoreX> fuck off
[12:20:30 CEST] <Dark-knight> hey, whats the CL to combine an audio and video stream into 1 container
[12:20:47 CEST] <Dark-knight> audio is .webm and video is .mp4
[12:21:00 CEST] <Dark-knight> do I have to convert video to webm first?
[12:21:28 CEST] <Dark-knight> I also want to make sure the audio is synced properly
[13:15:58 CEST] <debianuser> Hello. Is there a way to export/import PTS value of each frame? I have a video with changing color balance. And I can fix it by converting video into a bunch of images, then ImageMagick `convert $f -channel all -normalize ../2/$f` and assemble those images back into a video (+audio from original file), but how can I avoid video/audio desync? Can I use PTS values of original video stream somehow?
[13:16:43 CEST] <JEEB> not sure if we have such things in the ffmpeg.c command line application
[13:17:20 CEST] <Dark-knight> mine was simple
[13:18:18 CEST] <Dark-knight> idk nobody can answer it
[13:18:43 CEST] <JEEB> `ffmpeg -i input -i input2 -map 0 -map 1 -c copy out_file` is the remuxing side, although most likely most mobile/hardware players will not be able to play the audio
[13:18:57 CEST] <JEEB> since most expect certain audio formats in mp4
[13:19:16 CEST] <JEEB> you can add -c:a aac -b:a 192k after -c copy to tell it to re-encode the audio to AAC while at it
[13:19:28 CEST] <Dark-knight> will that matter?
[13:19:34 CEST] <JEEB> does it matter to you?
[13:19:45 CEST] <JEEB> anyways, you can remux and see if anything you use for playback works or not :P
[13:19:53 CEST] <Dark-knight> thanks
[13:19:54 CEST] <JEEB> and/or if the audio format is not supported
[13:19:59 CEST] <JEEB> (by mp4)
[13:20:02 CEST] <JEEB> (in FFmpeg at least)
[13:20:16 CEST] <Dark-knight> how do I change mp4 to webm
[13:20:22 CEST] <Dark-knight> ill just make it easy
[13:20:37 CEST] <JEEB> if you are going to be re-encoding video that will take quite a bit more time and you will lose quality
[13:20:40 CEST] <JEEB> just keep the video as-is
[13:20:44 CEST] <JEEB> re-encoding the audio is simpler as I noted :P
[13:21:15 CEST] <JEEB> `-c copy -c:a aac -b:a 192k` is "copy all tracks, but re-encode audio to AAC - oh and I want a bit rate of 192kbps"
[13:21:19 CEST] <Dark-knight> what happens if I use cl to change the container without changing content?
[13:21:29 CEST] <JEEB> copy you mean?
[13:21:35 CEST] <JEEB> that would just put the streams there if possible
[13:21:39 CEST] <Dark-knight> yeah
[13:21:57 CEST] <JEEB> if the players you care about play the file afterwards, that might be good enough for you
[13:21:57 CEST] <Dark-knight> basically just using ffmpeg to change the file extension
[13:22:00 CEST] <JEEB> no
[13:22:02 CEST] <JEEB> not just extension
[13:22:06 CEST] <JEEB> the container is swapped
[13:22:13 CEST] <Dark-knight> thats what I mean
[13:22:28 CEST] <JEEB> inputs are opened, streams are de-multiplexed, and then not sent for decoding/encoding but just passed into streams of the output
[13:22:31 CEST] <Dark-knight> I'm only going to keep it on my computer
[13:22:48 CEST] <JEEB> basically try to copy and see if it works :P if it doesn't - add the audio re-encoding
[13:22:56 CEST] <JEEB> and that should then work
[13:23:02 CEST] <Dark-knight> ok cool thanks
[13:23:17 CEST] <JEEB> also you might want to add -movflags faststart just in case if you ever want to read that file over HTTP or something
[13:23:26 CEST] <JEEB> that will do a second pass where the index is written at the beginning
[13:24:28 CEST] <Dark-knight> I ripped a video from youtube but it split the streams into 2 files for some reason
[13:24:43 CEST] <JEEB> you can just remux to matroska instead then P
[13:24:44 CEST] <JEEB> :P
[13:24:49 CEST] <JEEB> unless you want mp4 for some reason
[13:24:54 CEST] <Dark-knight> no
[13:24:57 CEST] <Dark-knight> I wanted webm
[13:25:06 CEST] <JEEB> then request webm for both video and audio?
[13:25:10 CEST] <Dark-knight> I was going to repost it on a website
[13:25:13 CEST] <JEEB> also webm is matroska
[13:25:19 CEST] <JEEB> (limited set of features of it)
[13:25:47 CEST] <Dark-knight> ok, then if I just go back and resave the video as webm will that work?
[13:25:55 CEST] <Dark-knight> default save option was mp4
[13:26:08 CEST] <JEEB> yes, just tell youtube-dl to pick webm - search their help etc for the format specifiers :P
[13:26:21 CEST] <JEEB> you should then get VP9 video and Opus audio
[13:26:22 CEST] <Dark-knight> it wasn't youtube-dl
[13:26:30 CEST] <Dark-knight> it was download helper
[13:26:37 CEST] <JEEB> then I have no fscking idea :)
[13:26:40 CEST] <Dark-knight> lol
[13:27:00 CEST] <JEEB> anyways, out of scope for FFmpeg :P
[13:28:31 CEST] <debianuser> Dark-knight: Yeah, "youtube-dl" is a great tool (https://rg3.github.io/youtube-dl/download.html). :) Use `youtube-dl http://your-url-to-download` and it should automatically download best video and audio for you and merge them together into a single file.
[13:28:47 CEST] <JEEB> and you can control which formats you want :P
[13:29:09 CEST] <JEEB> like 99% of all download helpers most likely use youtube-dl in the background
[13:29:13 CEST] <JEEB> but anyways, out of topic
[13:50:46 CEST] <debianuser> (back to my "use PTS of original video" question... maybe I can do that with some `-vf overlay` magic...)
[13:52:11 CEST] <JEEB> not likely, vf overlay is just overlaying stuff on the images
[13:52:19 CEST] <JEEB> unless that is what you want to do instead of the PTS stuff
[14:07:53 CEST] <debianuser> I thought maybe I can use something like -vf overlay=n=n, like take overlay frame with same number... but, no, "n" is expression parameter, not filter parameter.
[14:39:20 CEST] <TheFuzzball> I'm trying to capture a webcam, here's the v4l2 output for valid inputs - https://gist.github.com/anonymous/0ce17b22c2ed33d723336133ca6b3c1b
[14:39:26 CEST] <TheFuzzball> I'm using: ffmpeg -f v4l2 -input_format mjpeg -s 1920x1080 -i /dev/video0 -c:v h264_omx out.mp4
[14:39:50 CEST] <TheFuzzball> But ffmpeg fails with: Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[14:40:01 CEST] <TheFuzzball> and "[swscaler @ 0x2f5ec20] deprecated pixel format used, make sure you did set range correctly"
[14:40:39 CEST] <relaxed> TheFuzzball: that should be -video_size 1920x1080
[14:41:38 CEST] <TheFuzzball> I thought -s was shortform, ffmpeg -f v4l2 -input_format mjpeg -video_size 1920x1080 -i /dev/video0 -c:v h264_omx out.mp4 also fails with the same error
[14:42:28 CEST] <relaxed> this is a rpi3 ?
[14:42:31 CEST] <TheFuzzball> Yep
[14:44:01 CEST] <TheFuzzball> This is the list-sources output: https://gist.github.com/anonymous/d5547b90cdc76ce3c42cc75b03d23718
[14:44:19 CEST] <TheFuzzball> Looks like ffmpeg doesn't output to stdout, which makes just piping to gist a faff
[14:44:22 CEST] <TheFuzzball> Gimme a sec
[14:44:37 CEST] <JEEB> TheFuzzball: all multimedia apps output console output to stderr
[14:44:39 CEST] <JEEB> so 2>
[14:44:48 CEST] <JEEB> because you can use stdout for actually piping content
[14:44:54 CEST] <JEEB> like from a decoder to encoder etc
[14:45:09 CEST] <TheFuzzball> Ah I see
[14:47:03 CEST] <TheFuzzball> https://gist.github.com/anonymous/027f62604319cf19f819c287343df9f1
[14:48:27 CEST] <relaxed> TheFuzzball: try adding -pix_fmt yuv420p after the input
[14:50:27 CEST] <TheFuzzball> Hmm, same error
[14:52:08 CEST] <relaxed> does "-input_format raw" work?
[14:52:43 CEST] <TheFuzzball> Nah, that's not a valid format
[14:53:10 CEST] <TheFuzzball> yuyv422 and mjpeg are the only valid formats
[14:53:43 CEST] <relaxed> https://www.raspberrypi.org/forums/viewtopic.php?t=105964
[14:53:48 CEST] <TheFuzzball> It seems like it's a problem with the h264 encoder, it's refusing to encode anything it seems. I've got it to work before, tho..
[14:54:05 CEST] <relaxed> that says you need to set gpu_mem=128
[14:54:51 CEST] <TheFuzzball> Ok, I've changed that and rebooted
[14:55:23 CEST] <Dark-knight> hey JEEB it didn't work https://pastebin.com/DzmN40vU
[14:58:15 CEST] <TheFuzzball> relaxed hmm. that's working.. but the frame rate is 9fps, where the MJPEG output says it should be 30
[14:58:24 CEST] <TheFuzzball> Is the h264 encoder really that slow?
[15:00:28 CEST] <TheFuzzball> https://gist.github.com/anonymous/5e651e9f9075bbc6c4e57a63446b0adb
[15:00:53 CEST] <TheFuzzball> I guess it must me, the input stream is "mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 1920x1080, 30 fps, 30 tbr, 1000k tbn, 1000k tbc"
[15:16:28 CEST] <rc0r> What's the proper way to build ffmpeg w/o pthread? Using --disable-pthreads breaks the build for me b/c of undefined references to sem_post at glibc :/
[15:17:02 CEST] <jkqxz> References from where?
[15:17:53 CEST] <ivan_filho> Hi guys. I need to parse an H264 containing nal units to find only the access unit i need to produce only one frame. I'm parsing an access unit, and by the H264 standard, if i find a access_unit with primary_pic_type == 0, this acces_unit is a complete coded frame, but the problem is, sometimes the encoder encode I-frame as two field pictures where the top field is I-picture and the bottom one is P-picture. And i dont know exactl
[15:19:05 CEST] <ivan_filho> an entire access unit (or more) to produce one frame
[15:19:28 CEST] <jkqxz> An access unit is a coded picture, not a coded frame.
[15:20:52 CEST] <ivan_filho> but a coded picture can ben a coded frame or a coded field, right?
[15:20:58 CEST] <jkqxz> If you want to make a frame from two fields, that is two access units (and will have two AUDs).
[15:21:01 CEST] <jkqxz> Yes.
[15:21:29 CEST] <ivan_filho> My problem is to determine when is a coded frame and when is a coded field
[15:21:42 CEST] <ivan_filho> =/
[15:22:00 CEST] <ivan_filho> and, when is a coded field, to find all access unit i nedd to produce the frame
[15:22:42 CEST] <jkqxz> If frame_mbs_only_flag, it's all frames.  Otherwise look at field_pic_flag in the slice header.
[15:23:19 CEST] <jkqxz> Finding all access units to produce a frame is in general a hard problem, because they need not be adjacent in the stream.
[15:23:37 CEST] <jkqxz> You would need to look at the POCs and find the matching pair.
[15:26:53 CEST] <ivan_filho> so first i find the start access unit?
[15:27:18 CEST] <ivan_filho> i mean
[15:27:20 CEST] <ivan_filho> the first VCL NAL unit of a primary coded picture
[15:27:23 CEST] <ivan_filho> ?
[15:30:42 CEST] <ivan_filho> My problem is being finding the matching pair
[15:33:22 CEST] <jkqxz> rc0r:  <http://ffmpeg.org/pipermail/ffmpeg-devel/2017-October/218489.html>.  Builds for me with that.
[15:33:58 CEST] <jkqxz> ivan_filho:  Why do you want to find it?
[15:34:30 CEST] <jkqxz> You'll need to parse at least the SPS and then some of the slice headers to find the information you want.
[15:35:19 CEST] <ivan_filho> I have a embbed system moniroting, and a i need to extract one frame to send to server, but i have limited bandwidth
[15:37:13 CEST] <jkqxz> It is probably easier to decode the stream, pick the frame you want, and reencode it.
[15:37:15 CEST] <ivan_filho> So first, I look at the pic_order_cnt_type in SPS to know the method to decode picture order?
[15:38:02 CEST] <ivan_filho> But i'm receiving the a digital tv broadcasting, i just need filter the packets each x times
[15:39:38 CEST] <ivan_filho> my hardware has limited architecture, limited memory and process
[15:39:55 CEST] <ivan_filho> =/
[15:40:09 CEST] <rc0r> jkqxz: thx, will try that
[15:40:50 CEST] <rc0r> jkqxz: /usr/local/bin/ld: libavcodec/libavcodec.a(v4l2_buffers.o): undefined reference to symbol 'sem_post@@GLIBC_2.2.5' in case you're curious
[15:41:46 CEST] <jkqxz> Yeah, that's what that patch fixes.
[15:47:29 CEST] <ivan_filho> Do you have some tip how to finding the matches access unit?
[16:02:57 CEST] <jkqxz> ivan_filho:  In general, not really - you just have to read all the slice headers and follow the spec.
[16:03:45 CEST] <jkqxz> If you have restricted cases where you know the structure in advance then you may be able to avoid that, though.
[16:16:56 CEST] <voltagex> Don't know if anyone cares, but the video converter product currently being promoted by The Humble Bundle appears to be ripping off ffmpeg.
[16:17:18 CEST] <JEEB> lol
[16:18:01 CEST] <JEEB> how did you verify that is a seeming violation?
[16:18:06 CEST] <JEEB> *it is
[16:18:09 CEST] <teratorn> are there very many commercial video products left that *aren't* ripped-off ffmpeg?
[16:18:28 CEST] <JEEB> because I know at least one app that seemed to actually comply to the LGPL terms
[16:18:35 CEST] <JEEB> (it licensed x264 separately from x264 LLC)
[16:20:48 CEST] <voltagex> JEEB: no mention of ffmpeg anywhere, "avconvert.dll" has symbols/text
[16:20:52 CEST] <voltagex> https://usercontent.irccloud-cdn.com/file/yTXmurtg/image.png
[16:30:55 CEST] <ivan_filho> Thanks.
[16:31:49 CEST] <Scandy> hello
[16:32:45 CEST] <Scandy> can I ask a question here about ffmpeg?
[16:33:29 CEST] <JEEB> that's literally what the channel's name is
[16:36:29 CEST] <Scandy> ok so here I go! :) I'm running an HLS streaming from a RTSP IP camera as video source, using this simple script:
[16:36:39 CEST] <Scandy> fmpeg -i [SOURCE-URL] -acodec aac -vcodec copy -f hls -hls_allow_cache 0 -hls_segment_filename [TRUNK-NAME-BY_SOURCE].ts -hls_time 9 -hls_list_size 0 -hls_flags append_list playlist.m3u8
[16:36:53 CEST] <Scandy> It works, but my result is rather unstable and highly dependent on network performance (acquiring the source from the network).
[16:37:25 CEST] <Scandy> What options could I add to my script to make it more "stable" and "network-independent"?
[16:38:14 CEST] <Scandy> on BitBucket I found a similar script that uses the following options:
[16:38:16 CEST] <Scandy> -bufsize 1M -crf 18 -r 10 -g 30
[16:38:30 CEST] <Scandy> but I can't find description in official docs
[16:38:55 CEST] <iive> some of these looks like libx264 options
[16:39:15 CEST] <iive> crf is constant rate factor, a way to set quant/quality of the encoder
[16:39:41 CEST] <iive> -r is framerate, so 10fps
[16:40:17 CEST] <alexp> is there a way to take an MP2 audio track from a video and losslessly copy the right channel to the left channel (effectively turning it into dual mono)?
[16:40:18 CEST] <iive> -g is probably gop size, used to set keyframe intervals, so 1 keyframe every 30 frames ( at 10fps, that's each 3 seconds)
[16:40:33 CEST] <iive> -bufsize is probably for vbv buffer.
[16:40:35 CEST] <blaze> can someone explain me what can be possibly wrong with this code https://github.com/KDE/k3b/blob/master/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp ?
[16:40:44 CEST] <blaze> deel free to pm me on taht
[16:40:48 CEST] <blaze> *feel
[16:41:48 CEST] <zerodefect> Using the C-API to integrate the 'buffer' video filter - is it the case that the input resolution (spatial and temporal) is required at initialisation time?
[16:42:55 CEST] <Scandy> thank you very much iive
[16:43:31 CEST] <Scandy> but is -framerate option deprecated in ffmpeg 3.3?
[16:43:37 CEST] <iive> Scandy: if you are on linux, `man ffmpeg` would give you manual page with all the options. there must be a web page with it on the website
[16:44:14 CEST] <Scandy> I'm on Mac and unfortunately there is no man page with my binary
[16:44:18 CEST] <zerodefect> I'm getting an error that 'Invalid parameters provided' when using _only_ "time_base=1/25"
[16:44:51 CEST] <zerodefect> It seems that if I'm required to specify the spatial resolution, the filters are quite restrictive...which makes me think i'm doing something wrong :)
[16:45:23 CEST] <c_14> Scandy: https://ffmpeg.org/ffmpeg.html
[16:48:30 CEST] <iive> alexpigment: this sounds way too specific. In theory it should be possible, but I'm not aware of any tool that does it. It is kind of bitstream filter and ffmpeg doesn't have many of these.
[16:48:55 CEST] <alexpigment> iive: if I use map channel does it need to re-encode?
[16:50:33 CEST] <iive> alexpigment: i think map channel works on pcm data, so yeh. BTW, at least MP3 has a joint stereo mode, where audio is encoded as a center channel (mono) and differenciate channel, that is substracted from the center to get left/right channels
[16:50:44 CEST] <Scandy> thank you very much. About framerate option: it's ok if I acquire a 30fps source with -framerate 24 option?
[16:51:16 CEST] <alexpigment> iive: yeah, i'm working with actual stereo rather than joint stereo, which is why I was thinking it would be possible to encode losslessly. oh well. thanks for the input
[16:51:32 CEST] <iive> Scandy: i don't know. you do "video codec copy" that literally passes through the video without touching it.
[16:52:24 CEST] <iive> alexpigment: as I siad, it is quite specific. there might be some project that let's you edit mp2/3 on bitlevel
[16:53:20 CEST] <Scandy> iive: yes because it is a H.264 source. Sometimes after a short network error I get a video in "slow motion" while audio is OK, so I wonder if I can somehow fix FPS without reenconding video
[16:55:31 CEST] <iive> Scandy: that would need changing the video bitstream, to drop non-reference B-frames and renumber the other frames.
[16:56:09 CEST] <Scandy> iive: so I need to re-encode, it is correct?
[16:56:35 CEST] <iive> unless there is bitstream filter that already does that...
[16:57:45 CEST] <Scandy> iive: about -bufsize option... it is cited but not commented in the docs
[16:58:55 CEST] <Scandy> iive: there is a way to "buffer" a video source acquired from network? thank you
[17:04:46 CEST] <iive> Scandy: i think it is an encoding option, not cache control. Aka the https://en.wikipedia.org/wiki/Video_buffering_verifier
[17:05:23 CEST] <iive> it simply makes the encoder not produce too big or too small packets, so you can use buffer of this size on the player
[17:06:11 CEST] <iive> there are more exaples with it in `man ffmpeg-codecs` , strange but libx264 seems to use explicit vbv-buffer option
[17:06:21 CEST] <iive> so... no idea
[17:07:03 CEST] <Scandy> iive: ok thank you very much ;)
[18:29:46 CEST] <Dark-knight> JEEB it didn't work https://pastebin.com/DzmN40vU
[18:31:10 CEST] <JEEB> Dark-knight: well you got webms so just use -c copy, and don't set -c:a aac -b:a 192k ?
[18:31:13 CEST] <JEEB> that was for mp4
[18:31:26 CEST] <JEEB> also you are only mapping one of the files
[18:31:39 CEST] <JEEB> -map 0 only maps things out of the first file, you also need -map 1
[18:41:59 CEST] <Dark-knight> I did -map 1 and it didn't do anything
[18:42:04 CEST] <Dark-knight> same error
[18:42:38 CEST] <JEEB> did you remove the audio encoding and bit rate? :P
[18:42:50 CEST] <JEEB> that was my primary point, and then I just noticed that you weren't mapping the second file :P
[18:42:59 CEST] <Dark-knight> yes I already did that
[18:43:01 CEST] <Dark-knight> same error
[18:43:07 CEST] <JEEB> pastebin the log thank you
[18:43:10 CEST] <JEEB> (with command line)
[18:46:06 CEST] <Dark-knight> https://pastebin.com/GJHDNZj0
[18:46:32 CEST] <JEEB> uhh
[18:46:56 CEST] <JEEB> the video is not webm but a normal matroska
[18:47:10 CEST] <JEEB> so it contains video that you can't put into webm
[18:47:14 CEST] <JEEB> as the error says
[18:47:23 CEST] <Dark-knight> how do I fix this?
[18:47:31 CEST] <JEEB> just call the output file something.mkv
[18:47:32 CEST] <JEEB> there
[18:47:40 CEST] <Dark-knight> ok thanks
[18:48:08 CEST] <JEEB> but the error does say what happened, "Only VP8 or VP9 video and Vorbis or Opus audio and WebVTT subtitles are supported for WebM" :)
[18:48:15 CEST] <JEEB> and your video file contains H.264
[18:48:56 CEST] <JEEB> oh wait
[18:49:11 CEST] <JEEB> your video webm is just renamed mp4 :P
[18:49:15 CEST] <JEEB> that is why it has H.264
[18:49:22 CEST] <JEEB> FFmpeg actually picks that up and just works
[18:49:31 CEST] <JEEB> instead of kicking you in the face for naming it webm
[18:49:33 CEST] <Dark-knight> hmm I guess saving it as webm didn't help
[18:49:50 CEST] <JEEB> anyways, just call the output file .mkv and you get yourself a matroska file :P
[18:50:05 CEST] <JEEB> or re-add the audio encoding (-c:a aac -b:a 192k) and call it .mp4
[18:50:10 CEST] <JEEB> whatever you want
[18:50:29 CEST] <Dark-knight> whats easier to convert to webm. mp4 or mkv?
[18:50:42 CEST] <Dark-knight> and is it even possible to convert this?
[18:50:51 CEST] <Dark-knight> I got the mkv file already
[18:51:07 CEST] <JEEB> why the heck would you be re-encoding the video
[18:51:14 CEST] <JEEB> if you can just grab the same thing from youtube again, in VP9
[18:51:15 CEST] <JEEB> :P
[18:51:23 CEST] <JEEB> youtube-dl -F "https://youtube.com/something"
[18:51:27 CEST] <JEEB> lists all the foramts
[18:51:30 CEST] <JEEB> *formats
[18:51:33 CEST] <JEEB> and you can then pick
[18:51:43 CEST] <JEEB> anyways, out of scope o this channel and you can play that mkv file already :P
[18:51:43 CEST] <Dark-knight> lol ok
[18:52:31 CEST] <Dark-knight> for the sake of education, lets say in the future I wanted to convert an mkv to a webm. how would I go about doing that?
[18:55:14 CEST] <klaxa> https://trac.ffmpeg.org/wiki/Encode/VP8
[18:55:24 CEST] <klaxa> or VP9 if you have time on your hands
[18:55:32 CEST] <klaxa> or is VP9 fast now?
[18:59:33 CEST] <Johnjay_> how to tell ffmpeg to skip file if it already exists on command line?
[18:59:51 CEST] <c_14> -n
[19:00:39 CEST] <Johnjay_> thanks
[19:01:07 CEST] <Johnjay_> by the way, I was reading about this new firefox update
[19:01:18 CEST] <Johnjay_> the one where they are switching to webextension. which might break compatibility
[19:01:30 CEST] <Johnjay_> i read that a competitor to firefox wants to use ffmpeg to play media or something
[19:01:36 CEST] <Johnjay_> i guess people demand browsers play video so makes sense
[19:01:45 CEST] <JEEB> Firefox already uses FFmpeg
[19:02:04 CEST] <JEEB> it has the FFmpeg decoder module (mostly used in linux), and they separated the VP9 decoder
[19:02:04 CEST] <Johnjay_> right, this is a competitor
[19:02:16 CEST] <JEEB> Chromium also uses their own fork of FFmpeg
[19:02:17 CEST] <Johnjay_> i was checking them out because firefox 57 might kill extensions
[19:02:31 CEST] <JEEB> I'm already on 57 and I'm not really having issues
[19:02:35 CEST] <JEEB> https://docs.google.com/spreadsheets/d/1TFcEXMcKrwoIAECIVyBU0GPoSmRqZ7A0VBvqeKYVSww/view
[19:02:39 CEST] <Johnjay_> interesting. yet another bunch of things that rely on ffmpeg
[19:02:39 CEST] <JEEB> you can see alternatives here :P
[19:02:41 CEST] <JEEB> anyways, off-topic
[19:03:24 CEST] <Dark-knight> thanks for the notes
[19:03:24 CEST] <JEEB> Johnjay_: heck even the nvidia experience app in nvidia's driver has avcodec-52.dll in it :P
[19:03:45 CEST] <Dark-knight> I update my notes everytime I get useful info :)
[19:03:47 CEST] <JEEB> (newer one has -55)
[19:04:13 CEST] <JEEB> ok, the windows version of Firefox also has mozavcodec.dll
[19:04:20 CEST] <JEEB> so it has also some FFmpeg
[19:04:33 CEST] <JEEB> Steam has avcodec-56
[19:05:28 CEST] <JEEB> pretty much darn everything has avcodec/format/etc in it :P my TV has it (although they might be using Libav still)
[19:05:46 CEST] <Johnjay> eh really
[19:05:55 CEST] <Johnjay> that's kind of weird lol
[19:06:12 CEST] <Johnjay> TVs in walmart dont' say "USING FFMPEG TECHNOLOGY" in big letters on the front
[19:06:24 CEST] <JEEB> easy to check if you grab your stuff's (L)GPL source code release
[19:06:38 CEST] <JEEB> since pretty much everything uses linux nowadays, there's at least that to release
[19:07:00 CEST] <BtbN> My TV uses some 0.8 version of ffmpeg
[19:07:04 CEST] <JEEB> yup
[19:07:10 CEST] <JEEB> quite often ancient because bunker development :D
[19:07:35 CEST] <JEEB> I think my TV uses at least two pieces of software that I've contributed to
[19:07:44 CEST] <JEEB> Libav/FFmpeg being one of them
[19:08:10 CEST] <BtbN> I also have no idea how to update them, or get software onto the TV at all
[19:08:15 CEST] <BtbN> So no idea if that is GPL compliant
[19:08:27 CEST] <JEEB> only v3 tells them to let you switch it
[19:08:43 CEST] <Johnjay> tv should be updateable with fully GPL code. #sourcecodematters
[19:08:45 CEST] <JEEB> v2 is a-OK with you not being able to actually replace software due to DRM
[19:09:02 CEST] <BtbN> There is no DRM. Just no way to get software on the TV, at all
[19:09:13 CEST] <JEEB> well that's a technical limitation, no?
[19:09:21 CEST] <BtbN> It comes with a pre-baked ROM, no updates intended
[19:09:22 CEST] <kepstin> well, if they're using such an old version of ffmpeg, there might be some code execution vulnerabilities in there :)
[19:09:42 CEST] <JEEB> kepstin: I'm pretty sure I could try and exploit my TV with some mp4 timed text
[19:09:48 CEST] <JEEB> I've seen funky stuff come out of that
[19:10:12 CEST] <BtbN> All the Wii U hacks work that way, by making the Browser play mp4 videos to run specific homebrew
[19:10:17 CEST] <Johnjay> JEEB: that sounds kind of cool lol
[19:10:50 CEST] <JEEB> I think the TV is using Libav/FFmpeg for the mp4 demuxing because it supports E-AC3/TrueHD/DTS-HD MA in mp4
[19:10:51 CEST] <Dark-knight> lol hacking TVs
[19:11:38 CEST] <Johnjay> And you converted a video file to TrueHD in mp4 to test this specifically or...?
[19:11:58 CEST] <JEEB> I have samples of those audio formats
[19:12:21 CEST] <JEEB> Including just grabbing them from the blu-rays I have on my bookshelf
[19:13:27 CEST] <Johnjay> now this is odd.
[19:13:42 CEST] <Johnjay> I clearly see a webm file in this directory that has not been converted to mp3
[19:13:51 CEST] <Johnjay> I run my for loop to convert webm to mp3 with the -n option
[19:13:53 CEST] <Johnjay> but nothing happens
[19:16:19 CEST] <Johnjay> the loop clearly hits that webm file. yet ffmpeg isn't producing an output file with -n
[19:16:48 CEST] <Johnjay> there we go
[19:16:53 CEST] <Johnjay> i had -i -n instead of -n -i
[19:16:59 CEST] <JEEB> :P
[19:17:09 CEST] <JEEB> yea, "-n" is kind of probably not the file name you wanted to poke
[19:17:11 CEST] <Johnjay> i suppose it thought the input file was named -n? :D
[19:17:29 CEST] <Johnjay> hehe that one was clearly my fault
[19:17:53 CEST] <Johnjay> see i'm fair. when i'm in the wrong i can admit it. but when it's the software that's wrong i'll call it out.
[21:23:33 CEST] <timmmit> is there an easy way to do basically "ffmpeg -i %d.bmp out.mp4" in C/C++ where the bitmaps are (unsigned char) buffers of pixels (width and height known)?
[21:24:09 CEST] <JEEB> yes, you can do it with the API
[21:25:06 CEST] <JEEB> also usually you talk of uint8_t buffers :)
[21:26:03 CEST] <JEEB> anyways, you make AVFrames out of that RGB stuff (I will guess it's RGB), then you use avfilter to convert that to YCbCr, and finally feed those post-filtering AVFrames to an encoder of your choice. you get AVPackets out of that, which you push into avformat's mp4 muxer
[21:26:05 CEST] <timmmit> can you link me to the api? i cant find something comprehensive
[21:26:32 CEST] <JEEB> there's examples in the repo http://git.videolan.org/?p=ffmpeg.git;a=tree;f=doc/examples;h=HEAD
[21:26:44 CEST] <JEEB> uh, that didn't work.
[21:26:53 CEST] <JEEB> it's under doc/examples in that thing :P
[21:27:41 CEST] <JEEB> after that you can google for the generated doxygen documentation if you don't want to generate it yourself
[21:27:58 CEST] <JEEB> stuff like this https://www.ffmpeg.org/doxygen/trunk/group__lavc__encdec.html
[21:29:59 CEST] <timmmit> so is this what im looking for? line 165-180 https://git.videolan.org/?p=ffmpeg.git;a=blob;f=doc/examples/doc/examples/encode_video.c;
[21:30:20 CEST] <JEEB> by the file name, yes
[21:30:34 CEST] <timmmit> just need to convert from rgb (yes you guessed right ;)) to YCbCr?
[21:30:41 CEST] <JEEB> yes
[21:30:53 CEST] <JEEB> libavfilter is the simplest way of going around that
[21:31:07 CEST] <JEEB> there's a filtering example as well as far as I know
[21:31:17 CEST] <JEEB> the chain would be rather simple :D
[21:31:38 CEST] <JEEB> basically "I want this in YUV420P" and then that's almost it
[21:31:49 CEST] <JEEB> but it gets you ready for more filtering should you need it
[21:32:20 CEST] <JEEB> also libavfilter because it takes in and gives out AVFrames
[21:32:28 CEST] <JEEB> which is also what the encoder takes in
[23:09:06 CEST] <Johnjay> JEEB: what's the purpose of those doc/examples files
[23:09:26 CEST] <Johnjay> is it for vlc people to learn how to use ffmpeg data structures?
[23:09:30 CEST] <durandal_1707> to teach you how to code
[23:10:20 CEST] <Johnjay> cool
[00:00:00 CEST] --- Thu Oct 26 2017


More information about the Ffmpeg-devel-irc mailing list