Previously, AVStream.codec.time_base was used for that purpose, which
was quite confusing for the callers. This change also opens the path for
removing AVStream.codec.
The change in the lavf-mkv test is due to the native timebase (1/1000)
being used instead of the default one (1/90000), so the packets are now
sent to the crc muxer in the same order in which they are demuxed
(previously some of them got reordered because of inexact timestamp
conversion).
This doesn't allow encoding of DTS or TrueHD. It just sets the correct
stream ID in the TS output file when a DTS or TrueHD audio stream is copied.
Fixes ticket #1398
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The rational for this is another issue that plex has exposed. When it is
conducting a transcode of video to HLS for streaming, my father noticed
artifacts when played on his GoogleTV (NSZ-GT1). He sent me a test file
and I reproduced it on my device of the same model. It is important to
note that the artifacts were not present when streaming to VLC or QuickTime
Player. I copied the command-line that plex used, and conducted all of the
following tests using FFmpeg git.
Transcode to HLS: artifacts on playback
Transcode to TS: playback is fine
Cat HLS segments into a single TS: playback is fine
Segment single TS file to segments: artifacts on playback
Segment single TS file to segments using Apple's HLS segmenter: playback is
fine
At this point I carefully examined the differences between Apple's HLS
segmenter output and FFmpeg's. Among the considerable differences, I
noticed that the video PES packets always had a 0 length. So I continued:
Transcode to HLS using FFmpeg with 0 length PES packets: playback is fine.
Segment single TS to segments with 0 length PES packets: playback is fine.
All failures mentioned are only on the GTV since it is the only player on
which I could reproduce artifacts. I only tested the GTV, VLC, and
QuickTime Player though, so my test case is limited. I do not know if
other players exhibit this issue.
Since it was useful last time, I have uploaded the test file as
hls_pes_packet_length.m4v along with its associated txt file which contains
the transcode command-line that was used.
Reviewed-by: Kieran Kunhya <kierank@obe.tv>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* restore multiple languages data from extradata to PMT table
* setting correctly hearing empaired subtitling type
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Using extradata by TS muxer to correctly restore PMT table
* PES_header_data_length should be always 0x24 for DVB teletext,
according to DVB standard
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Improved DVB subtitles encoder to generate AVPacket.data in the same
format as generates MPEGTS demuxer + DVB subtitles parser. So now single
format of DVB subtitles data is used across all the components of FFmpeg:
only subtitles payload WITHOUT 0x20 0x00 bytes at the beginning and 0xFF
trailing byte.
Improved MPEGTS muxer to support format of DVB subtitles in
AVPacket.data described above: while muxing we add two bytes 0x20 0x00 to
the beginning of and 0xFF to the end of DVB subtitles payload.
The patch fixes DVB subtitle copy problems: tickets #2989 fully and #2024
partly.
Signed-off-by: Clément Bœsch <u@pkh.me>
Many video players accept broken frames in a transport stream, so there
is no reason to abort remuxing when encountering one, just print a
warning instead.
Fixes ticket #1758.
Also move the declaration to internal.h, and add restrict qualifiers
to the declaration (as in the implementation).
Signed-off-by: Martin Storsjö <martin@martin.st>
This adds the avoption mpegts_flags and converts the existing
resend_headers option into a flag, keeping the old option as
fallback for now.
Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
This removes the dependency on adts.c internals, and simplifies
adding other packetization formats.
Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
Also add missing trailing commas, break long codec_tag lines and
add spaces in codec_tag declarations.
Signed-off-by: Martin Storsjö <martin@martin.st>