<p>The issue isn't the scan type but the timestamps for the video stream.</p>

<p>Run</p>

<pre><code>ffmpeg -i bad.webm -c copy -an badv.nut
</code></pre>

<p>and then</p>

<pre><code>ffmpeg -i badv.nut -i bad.webm -c copy -map 0:v -map 1:a new.,webm
</code></pre>

<hr>

<p>The video timestamps start at some large non-zero number but the audio TS start at zero. That throws stream queueing out-of-whack since the sync relies on the stream with earliest start time within the file. The two step method works around that by isolating the video first into its own file.</p>

CC BY-SA 4.0
2018-07-02T05:38:39.407Z
Thanks @Gyan. After run your 2 commands. the new.webm can be replayed! can you explain what issue the timestamps of the bad.webm; and the reason.
Stony
CC BY-SA 4.0
2018-07-03T03:02:04.643Z
Thanks @Gyen for your kind help.  But I still don't know why the issue appear. the video was created by kurento RecorderEndpo.
Stony
CC BY-SA 4.0
2018-07-03T04:59:36.960Z
The issue appears because of the timestamp start_time difference  Why kurento created such a file, is best asked to kurento devs.
Gyan
CC BY-SA 4.0
2018-07-03T06:29:41.940Z
Can you tell me how to check the start_time for both video and audio?
Stony
CC BY-SA 4.0
2018-07-03T07:08:40.663Z
`ffprobe -show_entries stream=index,start_time,codec_type -of compact=p=0 in.mp4`
Gyan
CC BY-SA 4.0
2018-07-04T08:48:01.043Z
I run "ffprobe -show_entries stream=index,start_time,codec_type -of compact=p=0 ./bad.webm", start_time for video and audio are same, both are "0.000000"
Stony
CC BY-SA 4.0
2018-07-04T11:34:06.193Z
Compare video start_time with pts_time in `ffprobe in.mp4 -show_packets -select_streams v -read_intervals 0%+#1  -v 0`
Gyan
CC BY-SA 4.0
2020-05-14T14:58:05.513Z
ok, but if I have one video that ffprobe reports yuv420p(progressive) and when I encode with ffmpeg (-pix_fmt yuv420p) then ffprobe reports just "yuv420p" . So is there such an option to ffmpeg encoding to make ffprobe report (progressive) or is there not? My problem is I want to concatenate the two videos and they don't seem to work well, so perhaps this is the issue - I tried everything else. But even if this is not the issue, the original questions stands about ffmpeg option to set progressive. Thanks!
Tomeg
CC BY-SA 4.0
2018-07-02T05:30:40.297Z
2018-07-02T06:37:17.853Z
2018-07-02T06:37:17.853Z
Gyan
<p>I have a video, which was recorded by kurento.  But the video can't replay. after I checked it,  I think the reason is the scan type is incorrect.</p>

<p>The work video,</p>

<pre><code>Tony-MacBook-Pro:ios tony$ ffmpeg -i good.webm
ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
  built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4.1_2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --disable-jack --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, matroska,webm, from 'good.webm':
  Metadata:
    encoder         : GStreamer matroskamux version 1.8.1.1
    creation_time   : 2018-06-29T17:15:35.000000Z
  Duration: 00:00:57.52, start: 0.000000, bitrate: 438 kb/s
    Stream #0:0(eng): Video: vp8, yuv420p(progressive), 480x640, SAR 1:1 DAR 3:4, 1k tbr, 1k tbn, 1k tbc (default)
    Metadata:
      title           : Video
    Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      title           : Audio
</code></pre>

<p>The bad video,</p>

<pre><code>Tony-MacBook-Pro:ios tony$ ffmpeg -i bad.webm
ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
  built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4.1_2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --disable-jack --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, matroska,webm, from 'bad.webm':
  Metadata:
    encoder         : GStreamer matroskamux version 1.8.1.1
    creation_time   : 2018-06-29T13:52:20.000000Z
  Duration: 00:00:35.19, start: 0.000000, bitrate: 367 kb/s
    Stream #0:0(eng): Video: vp8, yuv420p, 480x640, SAR 1:1 DAR 3:4, 1k tbr, 1k tbn, 1k tbc (default)
    Metadata:
      title           : Video
    Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      title           : Audio 
</code></pre>

<p>I compared both, the only difference is the 1st one has <strong>yuv420p(progressive)</strong>, the 2nd one has <strong>yuv420p</strong>; so I guess that's the root cause, and want to change the scan type to try.</p>

<p>bad file: <a href="https://www.dropbox.com/s/t07pfe69a78h1tg/bad.webm?dl=0" rel="nofollow noreferrer">https://www.dropbox.com/s/t07pfe69a78h1tg/bad.webm?dl=0</a><br>
good file: <a href="https://www.dropbox.com/s/uivgb1trobhrg5n/good.webm?dl=0" rel="nofollow noreferrer">https://www.dropbox.com/s/uivgb1trobhrg5n/good.webm?dl=0</a></p>

CC BY-SA 4.0
2018-06-30T06:10:52.570Z
That's just a container flag missing. libvpx doesn't support interlacing. Does ffplay play the file?
Gyan
CC BY-SA 4.0
2018-07-02T01:46:08.097Z
Thanks @Gyan , the ffplay can replay the bad.webm. but it can't be replay in kurento. I guess the reason is bad.webm doens't have "(progressive)"; how can I add it, and have a try?
Stony
<ffmpeg>
Can I update the scan type by ffmpeg?
Stony
# Can I update the scan type by ffmpeg?

(Asked by: username_0 on 2018-06-30)

I have a video, which was recorded by kurento.  But the video can't replay. after I checked it,  I think the reason is the scan type is incorrect.
The work video,
Tony-MacBook-Pro:ios tony$ ffmpeg -i good.webm
ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
  built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4.1_2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --disable-jack --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, matroska,webm, from 'good.webm':
  Metadata:
    encoder         : GStreamer matroskamux version 1.8.1.1
    creation_time   : 2018-06-29T17:15:35.000000Z
  Duration: 00:00:57.52, start: 0.000000, bitrate: 438 kb/s
    Stream #0:0(eng): Video: vp8, yuv420p(progressive), 480x640, SAR 1:1 DAR 3:4, 1k tbr, 1k tbn, 1k tbc (default)
    Metadata:
      title           : Video
    Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      title           : Audio

The bad video,
Tony-MacBook-Pro:ios tony$ ffmpeg -i bad.webm
ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
  built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4.1_2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --disable-jack --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, matroska,webm, from 'bad.webm':
  Metadata:
    encoder         : GStreamer matroskamux version 1.8.1.1
    creation_time   : 2018-06-29T13:52:20.000000Z
  Duration: 00:00:35.19, start: 0.000000, bitrate: 367 kb/s
    Stream #0:0(eng): Video: vp8, yuv420p, 480x640, SAR 1:1 DAR 3:4, 1k tbr, 1k tbn, 1k tbc (default)
    Metadata:
      title           : Video
    Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      title           : Audio 

I compared both, the only difference is the 1st one has yuv420p(progressive), the 2nd one has yuv420p; so I guess that's the root cause, and want to change the scan type to try.
bad file: https://www.dropbox.com/s/t07pfe69a78h1tg/bad.webm?dl=0
good file: https://www.dropbox.com/s/uivgb1trobhrg5n/good.webm?dl=0

**Tags:** ffmpeg

> **Comments:**
> **username_1**: That's just a container flag missing. libvpx doesn't support interlacing. Does ffplay play the file?  
> **username_0**: Thanks @username_1 , the ffplay can replay the bad.webm. but it can't be replay in kurento. I guess the reason is bad.webm doens't have "(progressive)"; how can I add it, and have a try?  

---

## 1 answers

### Answer by username_1 on 2018-07-02. Score: 0 | Accepted answer

The issue isn't the scan type but the timestamps for the video stream.
Run
ffmpeg -i bad.webm -c copy -an badv.nut

and then
ffmpeg -i badv.nut -i bad.webm -c copy -map 0:v -map 1:a new.,webm


The video timestamps start at some large non-zero number but the audio TS start at zero. That throws stream queueing out-of-whack since the sync relies on the stream with earliest start time within the file. The two step method works around that by isolating the video first into its own file.

> **Comments:**
> **username_0**: Thanks @username_1. After run your 2 commands. the new.webm can be replayed! can you explain what issue the timestamps of the bad.webm; and the reason.  
> **username_0**: Thanks @Gyen for your kind help.  But I still don't know why the issue appear. the video was created by kurento RecorderEndpo.  
> **username_1**: The issue appears because of the timestamp start_time difference  Why kurento created such a file, is best asked to kurento devs.  
> **username_0**: Can you tell me how to check the start_time for both video and audio?  
> **username_1**: `ffprobe -show_entries stream=index,start_time,codec_type -of compact=p=0 in.mp4`  
> **username_0**: I run "ffprobe -show_entries stream=index,start_time,codec_type -of compact=p=0 ./bad.webm", start_time for video and audio are same, both are "0.000000"  
> **username_1**: Compare video start_time with pts_time in `ffprobe in.mp4 -show_packets -select_streams v -read_intervals 0%+#1  -v 0`  
> **username_2**: ok, but if I have one video that ffprobe reports yuv420p(progressive) and when I encode with ffmpeg (-pix_fmt yuv420p) then ffprobe reports just "yuv420p" . So is there such an option to ffmpeg encoding to make ffprobe report (progressive) or is there not? My problem is I want to concatenate the two videos and they don't seem to work well, so perhaps this is the issue - I tried everything else. But even if this is not the issue, the original questions stands about ffmpeg option to set progressive. Thanks!  

---

