Re: [FFmpeg-user] DAR/SAR
Sorry, I just saw that you already ran an ffprobe. If you run ffprobe again and look for Stream #0:0, does yours report the DAR as 4:3? If so, perhaps you were looking at Stream #0:2 when you were seeing the DAR 17:25. If not, then perhaps there's something else going on with your build. If that's the case, let us know which version you're running (usually reported at the top of ffprobe/ffmpeg output) On Tue, Feb 28, 2023 at 5:34 PM Steve Zemlicka wrote: > if you run ffprobe [filename], you'll notice that it does indicate 4:3 for > stream#0:0 > Stream #0:0[0x1](eng): Video: h264 (High) (avc1 / 0x31637661), > yuv420p(progressive), 640x480, 792 kb/s, SAR 1:1 DAR 4:3, 23.98 fps, 23.98 > tbr, 23981 tbn (default) > > When dealing with aspect ratios, it's always good to do a ffprobe to > examine the details of how ffmpeg will interpret/recognize the files. The > entire ffprobe for that file is as follows: > > ffprobe version n5.1.2 Copyright (c) 2007-2022 the FFmpeg developers > built with gcc 12.2.0 (GCC) > configuration: --prefix=/usr --disable-debug --disable-static > --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm > --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl > --enable-ladspa --enable-libaom --enable-libass --enable-libbluray > --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libfreetype > --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack > --enable-libmfx --enable-libmodplug --enable-libmp3lame > --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg > --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg > --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh > --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab > --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp > --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 > --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc > --enable-opencl --enable-opengl --enable-shared --enable-version3 > --enable-vulkan > libavutil 57. 28.100 / 57. 28.100 > libavcodec 59. 37.100 / 59. 37.100 > libavformat59. 27.100 / 59. 27.100 > libavdevice59. 7.100 / 59. 7.100 > libavfilter 8. 44.100 / 8. 44.100 > libswscale 6. 7.100 / 6. 7.100 > libswresample 4. 7.100 / 4. 7.100 > libpostproc56. 6.100 / 56. 6.100 > [mov,mp4,m4a,3gp,3g2,mj2 @ 0x557a198b11c0] stream 0, timescale not set > Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Hallelujah (1929)._edit.mp4': > Metadata: > major_brand : isom > minor_version : 512 > compatible_brands: isomiso2avc1mp41 > iTunEXTC: mpaa|NR|600| > iTunMOVI: > : "http://www.apple.com/DTDs/PropertyList-1.0.dtd;> > : > : > : directors > : > : > : name > : King Vidor > : > : > : producers > : > : > : name > : Irving Thalberg > : > : > : screenwriters > : > : > : name > : Wanda Tuchock > : > : > : studio > : Metro-Goldwyn-Mayer > : > : > : > title : Hallelujah > artist : Victoria Spivey > genre : Drama > date: 1929-08-20 > description : Sharecroppers Zeke and Spunk Johnson sell their > family's portion of the cotton crop for $100. They are promptly cheated out > of the money by the shill Chick (Nina Mae McKinney), in collusion with her > gambling-hustler boyfriend, Hot Shot. Spunk is murdered > synopsis: Sharecroppers Zeke and Spunk Johnson sell their > family's portion of the cotton crop for $100. They are promptly cheated out > of the money by the shill Chick (Nina Mae McKinney), in collusion with her > gambling-hustler boyfriend, Hot Shot. Spunk is murdered > encoder : Lavf58.20.100 > hd_video: 0 > media_type : 9 > Duration: 01:39:51.41, start: 0.00, bitrate: 869 kb/s > Chapters: > Chapter #0:0: start 0.00, end 5991.00 > Metadata: > title : Chapter 1 > Stream #0:0[0x1](eng): Video: h264 (High) (avc1 / 0x31637661), >
Re: [FFmpeg-user] DAR/SAR
if you run ffprobe [filename], you'll notice that it does indicate 4:3 for stream#0:0 Stream #0:0[0x1](eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 640x480, 792 kb/s, SAR 1:1 DAR 4:3, 23.98 fps, 23.98 tbr, 23981 tbn (default) When dealing with aspect ratios, it's always good to do a ffprobe to examine the details of how ffmpeg will interpret/recognize the files. The entire ffprobe for that file is as follows: ffprobe version n5.1.2 Copyright (c) 2007-2022 the FFmpeg developers built with gcc 12.2.0 (GCC) configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-version3 --enable-vulkan libavutil 57. 28.100 / 57. 28.100 libavcodec 59. 37.100 / 59. 37.100 libavformat59. 27.100 / 59. 27.100 libavdevice59. 7.100 / 59. 7.100 libavfilter 8. 44.100 / 8. 44.100 libswscale 6. 7.100 / 6. 7.100 libswresample 4. 7.100 / 4. 7.100 libpostproc56. 6.100 / 56. 6.100 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x557a198b11c0] stream 0, timescale not set Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Hallelujah (1929)._edit.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 iTunEXTC: mpaa|NR|600| iTunMOVI: : http://www.apple.com/DTDs/PropertyList-1.0.dtd;> : : : directors : : : name : King Vidor : : : producers : : : name : Irving Thalberg : : : screenwriters : : : name : Wanda Tuchock : : : studio : Metro-Goldwyn-Mayer : : : title : Hallelujah artist : Victoria Spivey genre : Drama date: 1929-08-20 description : Sharecroppers Zeke and Spunk Johnson sell their family's portion of the cotton crop for $100. They are promptly cheated out of the money by the shill Chick (Nina Mae McKinney), in collusion with her gambling-hustler boyfriend, Hot Shot. Spunk is murdered synopsis: Sharecroppers Zeke and Spunk Johnson sell their family's portion of the cotton crop for $100. They are promptly cheated out of the money by the shill Chick (Nina Mae McKinney), in collusion with her gambling-hustler boyfriend, Hot Shot. Spunk is murdered encoder : Lavf58.20.100 hd_video: 0 media_type : 9 Duration: 01:39:51.41, start: 0.00, bitrate: 869 kb/s Chapters: Chapter #0:0: start 0.00, end 5991.00 Metadata: title : Chapter 1 Stream #0:0[0x1](eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 640x480, 792 kb/s, SAR 1:1 DAR 4:3, 23.98 fps, 23.98 tbr, 23981 tbn (default) Metadata: handler_name: VideoHandler vendor_id : [0][0][0][0] Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 65 kb/s (default) Metadata: handler_name: SoundHandler vendor_id : [0][0][0][0] Stream #0:2[0x0]: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 680x1000 [SAR 1:1 DAR 17:25], 90k tbr, 90k tbn (attached pic) Stream #0:3[0x3](und): Data: bin_data (text / 0x74786574) Metadata: creation_time : 2023-02-18T02:49:07.00Z On Tue, Feb 28, 2023 at 12:22 PM Jim Julian via ffmpeg-user < ffmpeg-user@ffmpeg.org> wrote: > I've just finished a dialogue with MediaInfo and there seems to be a > difference in the Linux and Windows versions. I also tried using WSL and > bash without success. The DAR/SAR are still reported
Re: [FFmpeg-user] Video stretched wide
It seems the issue must stem from the source having two SAR/DAR values as follows: Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, smpte170m, progressive), 720x480 [SAR 8:9 DAR 4:3], SAR 1:1 DAR 3:2, 29.97 fps, 29.97 tbr, 1k tbn (default) Adding "-aspect 4:3" to the ffmpeg command was sufficient to output a result consistent with the source. On Fri, Feb 24, 2023 at 8:47 AM Steve Zemlicka wrote: > I am transcoding some videos from a mpeg2 MKV extracted from a DVD using > makemkv to x264/x265. I noticed the transcoded videos seemed stretched > wide (using multiple players) as compared to the original MKV. It's very > slight but especially noticeable when looking at the black bars. Though I > first noticed this with the hevc_nvenc encoder, I've also verified it is > consistent even with the libx264 with the following minimal command: > ffmpeg -i input_test.mkv -c:v libx264 -crf 0 -c:a copy output_test.mp4 > > Mediainfo indicates the resolution and aspect ratio are identical between > the two. Both are 720x480 (3:2). Normally I'd look at the player being > the culprit but I did a test this morning using Handbrake and the output > from this does not have the issue. I suspect I'm doing something wrong but > I can't seem to figure it out. I tried looking this up but most results > seemed to stem from resizing, cropping, etc. and I'm not doing any of that > (at least not intentionally). Not sure if attachments will come through > but I'm attaching screenshots to this message. Any thoughts or suggestions? > > I am on ffmpeg version n5.1.2 > > The terminal output is as follows: > [szemlicka@xps finals]$ ffmpeg -i input_test.mkv -c:v libx264 -crf 0 -c:a > copy output_test.mp4 > ffmpeg version n5.1.2 Copyright (c) 2000-2022 the FFmpeg developers > built with gcc 12.2.0 (GCC) > configuration: --prefix=/usr --disable-debug --disable-static > --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm > --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl > --enable-ladspa --enable-libaom --enable-libass --enable-libbluray > --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libfreetype > --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack > --enable-libmfx --enable-libmodplug --enable-libmp3lame > --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg > --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg > --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh > --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab > --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp > --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 > --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc > --enable-opencl --enable-opengl --enable-shared --enable-version3 > --enable-vulkan > libavutil 57. 28.100 / 57. 28.100 > libavcodec 59. 37.100 / 59. 37.100 > libavformat59. 27.100 / 59. 27.100 > libavdevice59. 7.100 / 59. 7.100 > libavfilter 8. 44.100 / 8. 44.100 > libswscale 6. 7.100 / 6. 7.100 > libswresample 4. 7.100 / 4. 7.100 > libpostproc56. 6.100 / 56. 6.100 > Input #0, matroska,webm, from 'input_test.mkv': > Metadata: > ENCODER : Lavf58.76.100 > Duration: 00:01:29.04, start: 0.051000, bitrate: 5965 kb/s > Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, smpte170m, > progressive), 720x480 [SAR 8:9 DAR 4:3], SAR 1:1 DAR 3:2, 29.97 fps, 29.97 > tbr, 1k tbn (default) > Metadata: > DURATION: 00:01:28.93900 > Side data: > cpb: bitrate max/min/avg: 980/0/0 buffer size: 1835008 > vbv_delay: N/A > Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s > (default) > Metadata: > DURATION: 00:01:29.04300 > Stream #0:2(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s > Metadata: > DURATION: 00:01:29.04300 > Stream mapping: > Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (libx264)) > Stream #0:1 -> #0:1 (copy) > Press [q] to stop, [?] for help > [libx264 @ 0x55a167189c80] using SAR=1/1 > [libx264 @ 0x55a167189c80] using cpu capabilities: MMX2 SSE2Fast SSSE3 > SSE4.2 AVX FMA3 BMI2 AVX2 AVX512 > [libx264 @ 0x55a167189c80] profile High 4:4:4 Predictive, level 3.0, > 4:2:0, 8-bit > [libx264 @ 0x55a167189c80] 264 - core 164 r3095 baee400 - H.264/MPEG-4 AVC > codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: > cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=0 > mixed_ref=1 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 > fast_pskip=0 chroma_qp_offset=0 threads=15 l
[FFmpeg-user] MKV to MP4 subtitle issue
The question I have is similar to the following post: https://superuser.com/questions/932730/ffmpeg-mkv-to-mp4-conversion-loses-subtitles I am using ffmpeg version n5.1.2. I have an mkv that has two subtitle tracks. I am trying to convert it to mp4. mkvmerge -i input.mkv File 'input.mkv': container: Matroska Track ID 0: video (HEVC/H.265/MPEG-H) Track ID 1: audio (E-AC-3) Track ID 2: subtitles (HDMV PGS) Track ID 3: subtitles (HDMV PGS) Chapters: 10 entries I believe Track ID 2 is for foreign dialog only and is the one I would prefer to use. I also prefer to use hardsubs but would take hard or soft subs at this point. I've tried a number of approaches with little success. The closest I've gotten is to issue the subtitle=input.mkv option. ffmpeg -i input.mkv -c:v hecv_nvenc -crf 26 -preset fast -c:a aac -b:a 128k subtitles=input.mkv output.mp4 I expected this to burn the subs to the video but oddly enough, it seemed to make an mp4 with a subtitle track to toggle. Unfortunately the subtitles are just the chapter names and not the actual subtitles. I've also tried to manually select different subtitle tracks by using "subtitles=input.mkv:si=1" as per http://ffmpeg.org/ffmpeg-filters.html#subtitles. Unfortunately this results in an error: "Unable to find a suitable output format for 'subtitles=input.mkv:si1'" followed by: "subtitles=input.mkv:si=1: Invalid argument" I've also tried several other options including "-c:s copy" which didn't work due to the nature of the original subtitles (PGS) I suspect. Am I doing something wrong or missing something? ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".