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

burek burek021 at gmail.com
Tue Nov 20 03:05:02 EET 2018


[03:00:36 CET] <Buliarous> how would I extract subtitles from a VTS VOB concat like this: ffmpeg -i "concat:VTS_01_0.VOB|VTS_01_1.VOB|VTS_01_2.VOB|VTS_01_3.VOB|VTS_01_4.VOB"  I have subtitles at stream 2 and 3 and want to create srt's from them
[03:11:54 CET] <pink_mist> uh, I don't believe ffmpeg can create srts from vobsubs
[03:12:05 CET] <pink_mist> vobsubs are basically pictures of text
[03:12:33 CET] <pink_mist> so you need software that can do optical character recognition
[03:12:43 CET] <pink_mist> ffmpeg is not that afaik
[03:17:09 CET] <Hello71> it could give you a bunch of pictures
[03:19:23 CET] <pink_mist> that's not valid srt though
[03:20:23 CET] <Hello71> halfway there though
[03:20:29 CET] <Hello71> well more like 20% of the way there
[03:20:50 CET] <pink_mist> more like 5% I'd say
[03:20:54 CET] <pink_mist> OCR is hard
[03:33:41 CET] <Hello71> making ocr is hard but using ocr is not that hard
[03:33:51 CET] <Hello71> hell, using ocr is usually easier than using ffmpeg
[03:36:27 CET] <Buliarous> thanks pink_mist went with mkvmerge for this task, can always convert later
[11:55:06 CET] <scramblez> Hi All, I downloaded 'https://www.youtube.com/watch?v=ig4g6oD9Als' but it will not render in a Mut at nt 51HD. The same box has no problem playing vp9 in webm, as long as they do not contain HDR metadata. I wanted to test using m2ts container, but copying over the streams fails.
[11:57:05 CET] <scramblez> What options should I use to move it into m2ts?  Will m2ts work with HDR?
[12:00:05 CET] <scramblez> Here's the error I get: 'https://pastebin.com/gGj8Y60V'
[12:02:16 CET] <scramblez> Ah!  I removed the copy directive and it is now converting it.  :-)
[12:11:01 CET] <scramblez> ... but the box won't render it.  :(
[12:21:07 CET] <relaxed> scramblez: maybe because it's yuv420p10le
[12:21:17 CET] <snatcher> >ffmpeg -tls_verify 1 -i 'https://ffmpeg.org/' >error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
[12:21:34 CET] <snatcher> why https validation failed?
[12:22:26 CET] <relaxed> firefox lists https://ffmpeg.org/ as insecure
[12:22:44 CET] <relaxed> oh wait! I'm wrong
[12:23:29 CET] <scramblez> relaxed: yes, quite.  It may be the box is not able to render 10bit - at all?  Strangely, my laptop with a 10 year old radeon card is rendering the webm and m2ts seemingly without a problem.
[12:25:12 CET] <relaxed> scramblez: that's because your laptop uses software decoders and your tv uses hardware, which only supports certain features
[12:25:49 CET] <barc0d4> hi when I start webcam with mpv I get an error like this : [ffmpeg/demuxer] video4linux2,v4l2: Dequeued v4l2 buffer contains 613376 bytes, but 614400 were expected. Flags: 0x00012001.
[12:25:59 CET] <scramblez> relaxed: you reckon it is the TV at fault here, rather than the Mut at nt set top box?
[12:27:17 CET] <scramblez> Hmm ... I guess I could try connecting the laptop to the TV and see what it shows.
[12:28:10 CET] <relaxed> yeah, I run hdmi from my nvidia card to my TV and with mpv I never have issues
[12:29:00 CET] <scramblez> Question: how can I copy the 'Mastering Display Metadata' from the webm container to the m2ts?
[12:29:46 CET] <scramblez> All the luminance data are not transfered over to the m2ts - is there some special option needed?
[13:37:15 CET] <skident> hello
[13:39:17 CET] <skident> I have a code which uses ffmpeg audio filters, it works fine on Windows, but the same code works incorrect on macos (sound is noisy). Does anybody know how to fix this?
[13:40:42 CET] <durandal_1707> skident: show code
[13:42:39 CET] <snatcher> seems >error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed ffmpeg-related, "openssl s_client -connect ffmpeg.org:443" >Verify return code: 0 (ok)
[13:42:42 CET] <snatcher> any ideas?
[13:46:10 CET] <skident> it is integrated into a project and I can't reproduce without a project. I need to write a simple playback code for testing my code without current project
[13:47:02 CET] <skident> but unfortunately I haven't found examples of playback using ffmpeg (only portaudio)
[13:47:40 CET] <durandal_1707> skident: see mpv audio lavfi code
[13:54:46 CET] <skident> <durandal_1707> could you share a link?
[13:59:08 CET] <durandal_1707> skident: mpv.io
[15:12:46 CET] <scramblez> Hi All, I've transcoded 'https://www.youtube.com/watch?v=ig4g6oD9Als' from vp9 within webm to hevc within m2ts 'Video: hevc (Main 10) ([36][0][0][0] / 0x0024), yuv420p10le(tv), 3840x2026 [SAR 1:1 DAR 1920:1013], 24 fps, 24 tbr, 90k tbn, 24 tbc'. However, the HDR luminance etc side data were not transfered through, so the video looks washed out. How can I also transfer the HDR metadata to m2ts?
[15:13:43 CET] <scramblez> This is the data I'm talking about: 'Mastering Display Metadata, has_primaries:1 has_luminance:1 r(0.6800,0.3200) g(0.2650,0.6900) b(0.1500 0.0600) wp(0.3127, 0.3290) min_luminance=0.005000, max_luminance=1000.000000'
[15:15:32 CET] <tango_> hello all. I recorded a video with obs, and post-facto I realized that the video is capturing an area (of the screen) larger than I initially intended, so I was looking for a way to crop the video with ffmpeg. Ideally, I would like to keep the encoding settings for the video output stream to be exactly the same of the original input stream. my command line at the moment is: ffmpeg -i input.flv -vf
[15:15:37 CET] <tango_> "crop=1024:768:0:0" -c:a copy out.flv. I couldn't find a straightforward way to tell ffmpeg to use the same encoding _settings_ as the input, though
[15:15:45 CET] <tango_> the input settings are     Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 2500 kb/s, 30 fps, 30 tbr, 1k tbn, 60 tbc
[15:20:40 CET] <furq> tango_: there isn't a straightforward way to do that
[15:20:54 CET] <furq> you can crop h264 without reencoding but it won't actually make the file any smaller
[15:21:06 CET] <furq> https://www.ffmpeg.org/ffmpeg-bitstream-filters.html#h264_005fmetadata
[15:26:56 CET] <tango_> furq: for the time being I'd be satisfied even with just that
[15:27:05 CET] <tango_> I'll just remember to use the correct settings the next time 8-)
[15:34:00 CET] <tango_> furq: thanks, -bfs:v h264_metadata=crop_right=$((1920-1024)):crop_bottom=$((1080-768)) did the thing
[15:45:32 CET] <scramblez> I've used libx265 to transcode it, should have I used hevc_cuvid? Or is there some option I could pass to it to copy over the HDR metadata without having to specify each one individually?
[15:52:25 CET] <scramblez> Oops! Sorry, meant to say: hevc_vaapi
[16:10:48 CET] <Hello71> why is cropping part of h264? shouldn't it be a container feature?
[16:10:54 CET] <Hello71> do encoders actually use it?
[16:12:05 CET] <Hello71> tango_: while you're at it, you probably want crf, not cbr
[16:12:38 CET] <tango_> Hello71: what's crf?
[16:12:45 CET] <tango_> Hello71: (fwiw, the original video was recorded by obs)
[16:13:13 CET] <Hello71> I can't remember if obs is fine or sucks
[16:13:16 CET] <Hello71> iirc it's "meh"?
[16:13:35 CET] <tango_> Hello71: is there anything better for linux on X without a compositor running?
[16:13:43 CET] <tango_> ffmpeg directly? 8-D
[16:13:49 CET] <tango_> I mean, the video comes out fine
[16:13:53 CET] <Hello71> x11grab is fine if you're not picky about latency
[16:14:16 CET] <tango_> I potentially want to use the same for streaming in the future
[16:27:14 CET] <scramblez> Hmm ... I just came across this ticket which is broadly similar to my problem (I'm not resizing the video): 'https://trac.ffmpeg.org/ticket/7037'
[16:27:28 CET] <scramblez> I assume it has not been resolved yet.
[16:28:32 CET] <scramblez> ffprobe shows color_range, color_space, color_transfer, and color_primaries are not transferred over to mp4.  :(
[16:30:02 CET] <scramblez> Is there a way to specify these individually for the libx265 encoder?
[16:30:42 CET] <scramblez> Meant to say, not transferred over to m2ts
[16:33:55 CET] <ritsuka> scramblez: probably you can pass it to x265 with -x265-params
[16:36:02 CET] <furq> scramblez: -colorspace -color_primaries -color_trc -color_range
[16:38:13 CET] <scramblez> I also found this: '-metadata string=string' under the x265 parameters.  I wonder if I could pass the whole 'Mastering Display Metadata' string to it?
[16:42:23 CET] <scramblez> furq: thanks!  I entered these values individually and it is running now. No errors yet! :)
[16:42:49 CET] <scramblez> No luminance values though.
[16:46:29 CET] <furq> i have no idea if that stuff works for tonemapping
[16:48:53 CET] <GuiToris> hey, I can't find it anywhere, can I adjust the quality of jpegs with ffmpeg?
[16:49:52 CET] <furq> -q
[16:50:17 CET] <Hello71> although the ffmpeg jpeg encoder is usually worse than alternatives
[16:50:54 CET] <GuiToris> Hello71, do alternatives mean image magick here?
[16:50:59 CET] <Hello71> pretty sure it's designed for mjpeg. same format, different requirements
[16:51:13 CET] <Hello71> imagemagick is fine. if you want high quality I hear the google one is pretty good
[16:51:29 CET] <furq> why would it being designed for mjpeg affect the quality
[16:52:18 CET] <GuiToris> Hello71, I'm not sure if Image Magick can alter the pixel format
[16:52:55 CET] <Hello71> furq: moving pictures are different from non-moving pictures?
[16:53:02 CET] <furq> mjpeg is intra-only
[16:53:20 CET] <Hello71> right
[16:53:40 CET] <Hello71> but people usually don't view moving pictures one frame at a time
[16:53:44 CET] <Hello71> they view them as a... movie
[16:53:56 CET] <Hello71> is the point that I'm making
[16:54:07 CET] <furq> if the point is "they put less effort in because who cares" then sure
[16:54:55 CET] <furq> anyway -q 2 is the best you'll get out of ffmpeg's encoder
[16:55:39 CET] <furq> mozjpeg is the best in class afaik and it does support changing the subsampling
[16:55:45 CET] <furq> -sample 2x2 for 4:2:0
[16:56:33 CET] <GuiToris> furq, 2? is it differs from the one that gimp uses? I've tried -q 91 and -q 50 and well both images are ugly
[16:56:49 CET] <furq> it goes from 2 to 31
[16:56:55 CET] <furq> anything above 31 will be trash
[16:57:04 CET] <GuiToris> so it's a different scale :/
[16:57:11 CET] <furq> the range of values for -q in ffmpeg is an eternal mystery
[16:57:17 CET] <furq> it doesn't help that it's not even documented for most codecs
[16:58:36 CET] <GuiToris> oh and this is mjpeg, I haven't noticed it
[17:03:10 CET] <scramblez> furq: Thanks again. Your suggestions worked (at least for sorting out the colorspace). :)
[17:03:28 CET] <GuiToris> furq, can I specify conventional jpeg with -f?
[17:03:40 CET] <GuiToris> furq, -f jpg doesnt work
[17:03:59 CET] <GuiToris> I'm using still images
[17:13:09 CET] <dryft> hello all, I'm trying to stream with ffmpeg and failing, I'd appreciate anyone taking a look. https://0x0.st/sUvl.txt
[17:14:22 CET] <dryft> presumably I'm missing some arguments or they're in the wrong order idk
[17:17:23 CET] <furq> dryft: -f flv
[17:17:55 CET] <furq> GuiToris: -f singlejpeg
[17:18:52 CET] <GuiToris> great, it works :)
[17:41:55 CET] <dryft> furq, thank you.
[17:42:15 CET] <dryft> if only I had asked here before searching for hours
[17:42:21 CET] <dryft> :D
[17:45:33 CET] <Hello71> mozjpeg is the best if you want it to encode pretty fast
[17:45:55 CET] <Hello71> if you are happy to spend several minutes on each file then guetzli produces much better results
[18:20:17 CET] <georgeli_> Hello, I have a problem about implementing hardware encoding on raspberry pi by using openmax. I always get wrong time stamp  in my AVpacket. I notice since the packet got initialized, the time stamp was assigned to be 634 (seems to be the numerator of time base) and it does not change overtime.
[18:21:10 CET] <georgeli_> AVPacket pkt;     printf("0-time stamp = %ld, enc = %d/%d st = %d/%d\n", pkt.pts,             encoder_ctx->time_base.num,encoder_ctx->time_base.den,             fmt_encoder_ctx->streams[video_stream]->time_base.num,             fmt_encoder_ctx->streams[video_stream]->time_base.den);     printf("avframe time stamp = %ld\n", sw_frame->pts);     av_init_packet(&pkt);     printf("1-time stamp = %ld, enc = %d/%d st = %d/%d\n", pkt.pts, 
[18:23:43 CET] <georgeli_> Sorry, I don't know how to paste code here. I always get time stamp equals 634 for my printf, even right after I initialize AVpacket. That's weird.
[18:58:07 CET] <leite> hi
[00:00:00 CET] --- Tue Nov 20 2018


More information about the Ffmpeg-devel-irc mailing list