This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Muxing interlaced video
#1
1.I am muxing the source file into the transport stream. As a muxer, I chose ffmpeg, since the ts-muxer introduces A-V resync. The output is a small inappropriate source file.
2. I am muxing the source file in to MKV.
In the tab "Muxing" - "Adjsut to stream frame rate" check or uncheck this box - no difference.
Source file options:
Format : MPEG Video
Frame rate : 25.000 FPS
Standard : PAL

Output File Options:
Frame rate mode : Variable
Frame rate : 50.000 FPS
Original frame rate : 25.000 FPS

If I mux the source file using mkvtoolnix - Output file options:
Frame rate mode : Constant
Frame rate : 25.000 FPS
Standard : PAL

Source file
Reply
#2
Quote:Source file options:
Format : MPEG Video
Frame rate : 25.000 FPS
Standard : PAL

Output File Options:
Frame rate mode : Variable
Frame rate : 50.000 FPS
Original frame rate : 25.000 FPS
Where do these values come from?

When looking at the source file I get:
Video
Count                                    : 378
Count of stream of this kind             : 1
Kind of stream                           : Video
Kind of stream                           : Video
Stream identifier                        : 0
StreamOrder                              : 0
FirstPacketOrder                         : 0
ID                                       : 224
ID                                       : 224 (0xE0)
Format                                   : MPEG Video
Format                                   : MPEG Video
Commercial name                          : MPEG-2 Video
Format version                           : Version 2
Format profile                           : Main@Main
Format settings                          : CustomMatrix / BVOP
Format settings, BVOP                    : Yes
Format settings, BVOP                    : Yes
Format settings, Matrix                  : Custom
Format settings, Matrix                  : Custom
Format_Settings_Matrix_Data              : 10111112121213131313141414141415151515151516161616161616171717171717171718181818181818191A191A1A191B1B1B1A1B1C1C1C1C1E1E1E1F1F21
Format settings, GOP                     : M=3, N=15
Format settings, picture structure       : Frame
Internet media type                      : video/MPV
Duration                                 : 178600
Duration                                 : 2 min 58 s
Duration                                 : 2 min 58 s 600 ms
Duration                                 : 2 min 58 s
Duration                                 : 00:02:58.600
Duration                                 : 00:02:58:15
Duration                                 : 00:02:58.600 (00:02:58:15)
Bit rate mode                            : VBR
Bit rate mode                            : Variable
Bit rate                                 : 9000000
Bit rate                                 : 9 000 kb/s
Width                                    : 720
Width                                    : 720 pixels
Height                                   : 576
Height                                   : 576 pixels
Sampled_Width                            : 720
Sampled_Height                           : 576
Pixel aspect ratio                       : 1.067
Display aspect ratio                     : 1.333
Display aspect ratio                     : 4:3
Frame rate                               : 25.000
Frame rate                               : 25.000 FPS
Frame count                              : 4465
Standard                                 : PAL
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Chroma subsampling                       : 4:2:0
Bit depth                                : 8
Bit depth                                : 8 bits
Scan type                                : Interlaced
Scan type                                : Interlaced
Scan order                               : BFF
Scan order                               : Bottom Field First
Compression mode                         : Lossy
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.868
Delay                                    : 247.811111
Delay                                    : 248 ms
Delay                                    : 248 ms
Delay                                    : 248 ms
Delay                                    : 00:00:00.248
Delay_DropFrame                          : No
Delay, origin                            : Container
Delay, origin                            : Container
Delay_Original                           : 0
Delay_Original                           : 00:00:00.000
Delay_Original_Settings                  : drop_frame_flag=0 / closed_gop=1 / broken_link=0
Delay_Original_DropFrame                 : No
Delay_Original_Source                    : Stream
Time code of first frame                 : 00:00:00:00
Time code source                         : Group of pictures header
GOP, Open/Closed                         : Open
GOP, Open/Closed                         : Open
GOP, Open/Closed of first frame          : Closed
GOP, Open/Closed of first frame          : Closed
Stream size                              : 201127997
Stream size                              : 192 MiB (96%)
Stream size                              : 192 MiB
Stream size                              : 192 MiB
Stream size                              : 192 MiB
Stream size                              : 191.8 MiB
Stream size                              : 192 MiB (96%)
Proportion of this stream                : 0.95628
Buffer size                              : 229376
intra_dc_precision                       : 9
for the video no indication of VFR.

Cu Selur
Reply
#3
(22.09.2019, 21:30)Selur Wrote:
Quote:Source file options:
Format : MPEG Video
Frame rate : 25.000 FPS
Standard : PAL

Output File Options:
Frame rate mode : Variable
Frame rate : 50.000 FPS
Original frame rate : 25.000 FPS
Where do these values come from?

for the video no indication of VFR.

Cu Selur

the sorce file has a constant frame rate. It's right.
When I mux this file in the *.mkv with Mkvtoolnix output file has a constant frame rate. It's right.
When I mux this file in the *.mkv with Hybrid output file indicated as vfr. It's wrong!
Reply
#4
Ah, I see problem is probably with the mkvmerge muxing call.
-> I'll look into it.

Cu Selur
Reply
#5
Selur, please fix besides this problem, the problem of mux in the transport stream with FFmpeg.
Reply
#6
Problem with the ffmpeg muxing
ffmpeg -y -r 25 -i "E:\Output\21_56_32_1910_02.m2v" -i "E:\Output\iId_1_aid_0_21_56_32_1910_01.wav" -vcodec copy -acodec copy -map 0:0 -map 1:0 -metadata encoding_tool="Hybrid 2019.09.21.1"  -aspect 133375:100000 -r 25 -fflags +genpts -f mpegts -muxrate 100000000 "E:\Output\Adriana Russo - Capriccio ( Discoring 81).ts"
is that ffmpeg aborts with:
Quote:[mpegts @ 0000021f25038200] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mpegts @ 0000021f25038200] first pts value must be set
av_interleaved_write_frame(): Invalid data found when processing input
No real clue why this happens and how to fix it.
The extracted audio&video stream seem to be okay.

Adding '-fflags +genpts' does seem to fix something since the muxing doesn't crash, but the output audio isn't muxed properly now. :/

Cu Selur
Reply
#7
Selur, please fix the A-V resync when muxing to the transport stream using TS-muxer.
This source file without resync. When I mux it with Hybrid (using TS-muxer) in the output *.ts file beginning with 01:10 it has a A-V resync.
Reply
#8
About muxing pcm audio with ffmpeg into a transport stream is not supported by ffmpeg.
(tsMuxeR converts the audio to LPCM which ffmpeg doesn't support afaik.)

Looking into the second file and tsMuxer remuxing.
Reply
#9
I suspect that the stream is stretched, but the mkv stretch detection is broken atm. looking into it.
This will take a while,...
(may be tomorrow in case I find the time)

Cu Selur
Reply
#10
(22.09.2019, 23:40)Selur Wrote: About muxing pcm audio with ffmpeg into a transport stream is not supported by ffmpeg.
(tsMuxeR converts the audio to LPCM which ffmpeg doesn't support afaik.)

Looking into the second file and tsMuxer remuxing.

Quote from here

Quote: Though PCM is a more general term, it is often used to describe data encoded as LPCM.
ts-muxer is not able to convert or change any parameter of audio or video.
Selur, try opening "Il Silenzio (Melissa Venema) [Live in Maastricht II] (N).mkv" in TS-muxer.
You will see in the "tracks" window in the column "codec" "LPCM" in the properties of the audio track
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)