Re: [FFmpeg-user] Size of 10-bit 4:2:2 video streams?

2022-09-21 Thread Carl Zwanzig



The only occurrence of "non-interleaved AVI" is on avidec.c:

if (avi->non_interleaved) {
av_log(s, AV_LOG_INFO, "non-interleaved AVI\n");
clean_index(s);
}
and from a quick read of clean_index(), all that's doing is building a new 
index for a given stream. Absent other info, I'm not sure the message is 
more than information.




On 9/21/2022 12:59 AM, Paul B Mahol wrote:

It could be that index for frames in AVI is not listing all entries.
Hard to guess.
You could inspect file in some AVI file format analyzer.
If there is such thing available.


In theory, avicodec will do it but it's quite old, same for vitrualdubmod 
and gspot (http://www.headbands.com/gspot/), but then AVI format is also 
quite old. I have used gspot before and it was useful, haven't tried it for 
this purpose.


https://greshka.net/avicheck/ has some interesting suggestions, which 
eventually land on "ffmpeg -v 5 -i FILE.avi -f null -" (decode to null 
output, turn up the error reporting.


I'll echo Paul's thoughts that the AVI is somewhat corrupt, at least the 
metadata is badly wrong. It's possible that by either poking the metadata to 
"correctness" or ignoring a lot of errors, usable video could be pulled out.


Later,

z!
___
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".


Re: [FFmpeg-user] ffmpeg MP4/x264 output colours change when input source is different resolution (bug?)

2022-09-21 Thread Dan

On Sun, 18 Sep 2022 22:49:58 +0100, Reino Wijnsma  wrote:


With FFmpeg, creating a temp-file, zscale does work:

ffmpeg -i PLdsb.png -t 5 -vf "zscale=m=709" -c:v libx264 -crf 0 
PLdsb_zscale-bt709.mp4

Again, not exactly the same colour, but very close.


 SNIP


These are all VUI (Video Usability Information) options and, unlike the 
colourmatrix conversions above, don't have a direct impact on the video-image 
itself.


 SNIP


ffmpeg -i PLdsb.png -t 5 -color_range tv -colorspace bt470bg -c:v libx264 -crf 
0 PLdsb_vui-tv601.mp4


Thanks for both of those ffmpeg CLI lines! They do actually work for me (in MPC 
and Chrome).
Would you consider both of the lines safe to use?

Unfortunately, the line that I used which failed before, now also succeeds in 
producing accurate colours:

ffmpeg.exe -i testchart.png -crf 0 -vcodec libx264 -t 5 -y -colorspace bt470bg 
testchart.mp4

Here is the URL again for the test chart: https://www.belle-nuit.com/test-chart

I'm at a loss why it's suddenly producing correct colour results when it didn't 
before.


If you insist on using these VUI options, then in contrast to what you might 
expect (PC,BT.709) it's actually TV,BT.601 that has the expected result.
Welcome to the wonderful world of video conversions.


Feels like I'm going crazy haha. Hope it's all simplified and unified in the 
future, and all this
arbitrary legacy baggage can be put behind us once and for all.

Dan
___
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".


Re: [FFmpeg-user] Subtitle metadata not intercompatible by ffprobe

2022-09-21 Thread Robin van der Linden via ffmpeg-user

Testing files can be obtained from here:


https://drive.google.com/file/d/1kShvOA6_Emx3COrMudn3V2__zErj8_-c/view?usp=sharing

--
Kind regards,

R. Linden

0x257F9C8D.asc
Description: application/pgp-keys
___
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".


Re: [FFmpeg-user] Size of 10-bit 4:2:2 video streams?

2022-09-21 Thread Paul B Mahol
On 9/21/22, Olivier Bruchez via ffmpeg-user  wrote:
> Hi Marc,
>
> Thanks for your answer.
>
>>> /So I made some further tests and discovered that my original AVI
>>> file is />/simply corrupted. It's supposed to have 88 minutes of
>>> video, but it fails />/after 38 minutes. /
>> What does "fails" mean? The player stops? Which player? The video goes
>> black
>> but playing continues? Please be specific.
>
> ffmpeg (a very recent version - or any version) will stop copying the
> stream after 00:38:50.12 (instead of 01:28:00.80):
>
> ffmpeg -i test.avi -c copy test.copy.avi
> ffmpeg version N-63101-gc92edd969a-static
> https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2022 the FFmpeg
> developers
>built with gcc 8 (Debian 8.3.0-6)
>configuration: --enable-gpl --enable-version3 --enable-static
> --disable-debug --disable-ffplay --disable-indev=sndio
> --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r
> --enable-gnutls --enable-gmp --enable-libgme --enable-gray
> --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf
> --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb
> --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband
> --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis
> --enable-libopus --enable-libtheora --enable-libvidstab
> --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp
> --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d
> --enable-libxvid --enable-libzvbi --enable-libzimg
>libavutil  57. 36.101 / 57. 36.101
>libavcodec 59. 42.104 / 59. 42.104
>libavformat59. 30.101 / 59. 30.101
>libavdevice59.  8.101 / 59.  8.101
>libavfilter 8. 48.100 /  8. 48.100
>libswscale  6.  8.108 /  6.  8.108
>libswresample   4.  9.100 /  4.  9.100
>libpostproc56.  7.100 / 56.  7.100
> [avi @ 0x653e900] non-interleaved AVI

This 'non-interleaved AVI' can be problematic.
Does other files report similar?

> Input #0, avi, from 'test.avi':
>Duration: 01:28:00.80, start: 0.00, bitrate: 221185 kb/s
>Stream #0:0: Video: v210 (v210 / 0x30313276), yuv422p10le, 720x576,
> 25 fps, 25 tbr, 25 tbn
> Output #0, avi, to 'test.copy.avi':
>Metadata:
>  ISFT: Lavf59.30.101
>Stream #0:0: Video: v210 (v210 / 0x30313276), yuv422p10le, 720x576,
> q=2-31, 25 fps, 25 tbr, 25 tbn
> Stream mapping:
>Stream #0:0 -> #0:0 (copy)
> Press [q] to stop, [?] for help
> frame=58254 fps=128 q=-1.0 Lsize=62915254kB time=00:38:50.12
> bitrate=221191.1kbits/s speed=5.12x
> video:62914320kB audio:0kB subtitle:0kB other streams:0kB global
> headers:0kB muxing overhead: 0.001485%
>
> The exit code is zero:
>
> echo $?
> 0
>
> test.avi is still the 146-GB file I mentioned originally.
>
>> You may want to try multiple players to see what's in the file and
>> look at
>> it with ffprobe and mediainfo. Also try encoding into a different format
>> which will force ffmpeg to demux/decode the frames; that might turn up
>> something.
>
> Here are a few things I've tried:
>
> - I've checked other AVI files in our archive coming from the same
> company. They "behave" as expected, i.e. they indeed contain about 1.5
> GB per minute of video stream (SD video) and can be copied or transcoded
> from beginning to end. No problem there. I've only found one single
> problematic file.
>
> - Play the problematic file with VLC. It stops the playback after 38
> minutes as well and doesn't even display the full duration of the file
> (01:28:00).
>
> - Examine it with mediainfo (full log here
> https://drive.google.com/drive/folders/1h2GxriHtvx86jxcpN41GKmJBURGO3y6P?usp=sharing).
> mediainfo says the duration is 01:28:00.800, but the "source duration"
> is 00:00:38.840 (not 38 minutes, but 38 seconds, which is weird!).
>
> - Transcode the AVI to MKV/H.264 (full command line available, but
> pretty standard). The resulting MKV file has a duration of 38 minutes
> only and can be played without any problem. Actually, I think I can do
> pretty much anything with the problematic AVI file using ffmpeg. It will
> just see it as a normal 38-minute file.
>
> - Examine the file with ffprobe (ffprobe -hide_banner -select_streams
> v:0 -show_frames). The full output log is available at the same location
> as the mediainfo output. I get information for 58254 frames, so about 38
> minutes of video.

It could be that index for frames in AVI is not listing all entries.
Hard to guess.
You could inspect file in some AVI file format analyzer.
If there is such thing available.

There could be still bug in avi demuxer but without file its very
limited to find out such bug.

>
> Thanks,
>
> Olivier
>
> ___
> 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".
>

Re: [FFmpeg-user] Size of 10-bit 4:2:2 video streams?

2022-09-21 Thread Olivier Bruchez via ffmpeg-user

Hi Marc,

Thanks for your answer.

/So I made some further tests and discovered that my original AVI 
file is />/simply corrupted. It's supposed to have 88 minutes of 
video, but it fails />/after 38 minutes. /
What does "fails" mean? The player stops? Which player? The video goes 
black

but playing continues? Please be specific.


ffmpeg (a very recent version - or any version) will stop copying the 
stream after 00:38:50.12 (instead of 01:28:00.80):


ffmpeg -i test.avi -c copy test.copy.avi
ffmpeg version N-63101-gc92edd969a-static 
https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2022 the FFmpeg 
developers

  built with gcc 8 (Debian 8.3.0-6)
  configuration: --enable-gpl --enable-version3 --enable-static 
--disable-debug --disable-ffplay --disable-indev=sndio 
--disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r 
--enable-gnutls --enable-gmp --enable-libgme --enable-gray 
--enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf 
--enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb 
--enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband 
--enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis 
--enable-libopus --enable-libtheora --enable-libvidstab 
--enable-libvo-amrwbenc --enable-libvpx --enable-libwebp 
--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d 
--enable-libxvid --enable-libzvbi --enable-libzimg

  libavutil  57. 36.101 / 57. 36.101
  libavcodec 59. 42.104 / 59. 42.104
  libavformat    59. 30.101 / 59. 30.101
  libavdevice    59.  8.101 / 59.  8.101
  libavfilter 8. 48.100 /  8. 48.100
  libswscale  6.  8.108 /  6.  8.108
  libswresample   4.  9.100 /  4.  9.100
  libpostproc    56.  7.100 / 56.  7.100
[avi @ 0x653e900] non-interleaved AVI
Input #0, avi, from 'test.avi':
  Duration: 01:28:00.80, start: 0.00, bitrate: 221185 kb/s
  Stream #0:0: Video: v210 (v210 / 0x30313276), yuv422p10le, 720x576, 
25 fps, 25 tbr, 25 tbn

Output #0, avi, to 'test.copy.avi':
  Metadata:
    ISFT    : Lavf59.30.101
  Stream #0:0: Video: v210 (v210 / 0x30313276), yuv422p10le, 720x576, 
q=2-31, 25 fps, 25 tbr, 25 tbn

Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame=58254 fps=128 q=-1.0 Lsize=62915254kB time=00:38:50.12 
bitrate=221191.1kbits/s speed=5.12x
video:62914320kB audio:0kB subtitle:0kB other streams:0kB global 
headers:0kB muxing overhead: 0.001485%


The exit code is zero:

echo $?
0

test.avi is still the 146-GB file I mentioned originally.

You may want to try multiple players to see what's in the file and 
look at

it with ffprobe and mediainfo. Also try encoding into a different format
which will force ffmpeg to demux/decode the frames; that might turn up
something.


Here are a few things I've tried:

- I've checked other AVI files in our archive coming from the same 
company. They "behave" as expected, i.e. they indeed contain about 1.5 
GB per minute of video stream (SD video) and can be copied or transcoded 
from beginning to end. No problem there. I've only found one single 
problematic file.


- Play the problematic file with VLC. It stops the playback after 38 
minutes as well and doesn't even display the full duration of the file 
(01:28:00).


- Examine it with mediainfo (full log here 
https://drive.google.com/drive/folders/1h2GxriHtvx86jxcpN41GKmJBURGO3y6P?usp=sharing). 
mediainfo says the duration is 01:28:00.800, but the "source duration" 
is 00:00:38.840 (not 38 minutes, but 38 seconds, which is weird!).


- Transcode the AVI to MKV/H.264 (full command line available, but 
pretty standard). The resulting MKV file has a duration of 38 minutes 
only and can be played without any problem. Actually, I think I can do 
pretty much anything with the problematic AVI file using ffmpeg. It will 
just see it as a normal 38-minute file.


- Examine the file with ffprobe (ffprobe -hide_banner -select_streams 
v:0 -show_frames). The full output log is available at the same location 
as the mediainfo output. I get information for 58254 frames, so about 38 
minutes of video.


Thanks,

Olivier

___
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".