FAQ  •  Register  •  Login

Why h264 file needs transcoding

<<

staffann

Serviio newbie

Posts: 8

Joined: Fri Jul 29, 2011 5:07 pm

Post Sun Jul 31, 2011 10:18 am

Why h264 file needs transcoding

I own a Panasonic TX-P42TV20 TV set. It usually plays h264 avi files just fine as long as the audio format is ok. I have however one file that, despite it being h264, refuses to play. I need to know what makes this file require transcoding and how I can create a transcoding rule that is as narrow as possible to select this file but not others that play fine in their original format.

The ffmpg -i info is:

  Code:
Input #0, avi, from 'Chariots of Fire (1981) English subs [H264]/Chariots of Fire.avi':
  Metadata:
    ISFT            : MediaCoder 0.6
  Duration: 02:03:49.38, start: 0.000000, bitrate: 1008 kb/s
    Stream #0.0: Video: h264, yuv420p, 854x480 [PAR 1:1 DAR 427:240], PAR 491520:491477 DAR 2048:1151, 29.97 fps, 29.97 tbr, 29.97 tbn, 59.94 tbc
    Stream #0.1: Audio: mp3, 24000 Hz, 2 channels, s16, 8 kb/s


Without any transcoding the TV says that it doesn't support the file format.
Just changing the container to mpegts (as in the standard Panasonic profile) the TV says it cannot open the file.
Transcoding the video to mpegts and mpeg2vido works:
  Code:
               <Video targetContainer="mpegts" targetVCodec="mpeg2video">
            <Matches container="avi" vCodec="h264" />
               </Video>

Transcoding Transcoding to mpegts, mpeg2video and ac3 audio results in no sound (!).

What is is about this file that requires video transcoding? How can I create the appropriate, narrow rule? And why won't audio transcoding work (not required with this file, but I'm just curious)?
<<

Cerberus

User avatar

DLNA master

Posts: 4114

Joined: Sun Jan 02, 2011 5:20 pm

Location: Reading, UK

Post Sun Jul 31, 2011 10:58 am

Re: Why h264 file needs transcoding

What is is about this file that requires video transcoding?


i would guess your player doesnt support h264 video and Mp3 audio thats why i needs trancoding

How can I create the appropriate, narrow rule?


the code you posted would be just fine i cant think of way to make it narrower other than:

<Matches container="avi" vCodec="h264" aCodec="mp3" />

why won't audio transcoding work (not required with this file, but I'm just curious)?


this doesnt work in this instance as the player may not support mpeg2 video with ac3 audio
Phil Bennett
Beta Tester Group
Wiki | FAQ

Samsung LE40C750 LCD | Samsung BD-C5900 | Sony PS3 | Windows 7 |
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
<<

staffann

Serviio newbie

Posts: 8

Joined: Fri Jul 29, 2011 5:07 pm

Post Sun Jul 31, 2011 3:03 pm

Re: Why h264 file needs transcoding

I'm just trying to understand why the TV set plays one h264 file and not another.

Below is a file that I can play by just converting the audio to ac3:
  Code:
Input #0, matroska, from 'MYFILENAME.mkv':
  Metadata:
    doctype         : matroska
  Duration: 01:45:50.34, start: 0.000000, bitrate: N/A
    Stream #0.0(eng): Video: h264, yuv420p, 1280x696, PAR 29:30 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
    Stream #0.1(eng): Audio: dca, 48000 Hz, 6 channels, s16
    Stream #0.2(eng): Subtitle: 0x0000

with filter
  Code:
              <Video targetContainer="mpegts" targetACodec="ac3">
            <Matches container="avi" aCodec="dca" />
            <Matches container="mp4" aCodec="dca" />
            <Matches container="matroska" aCodec="dca" />
            <Matches container="mpegts" aCodec="dca" />
            <Matches container="mpeg" aCodec="dca" />
         </Video>


In this case I have done what I would have liked to do with the file in my first post - leave the video unchanged (for better quality and smaller CPU load), change the container to mpegts and where necessary recode audio. What is the difference between the two video streams that make one play and the other not? Note that I've tried rules that convert both files to mpegts and ac3.
<<

Cerberus

User avatar

DLNA master

Posts: 4114

Joined: Sun Jan 02, 2011 5:20 pm

Location: Reading, UK

Post Sun Jul 31, 2011 3:31 pm

Re: Why h264 file needs transcoding

try adding this line to that list

<Matches container="avi" vCodec="h264" aCodec="mp3" />

does that now play with audio ??
Phil Bennett
Beta Tester Group
Wiki | FAQ

Samsung LE40C750 LCD | Samsung BD-C5900 | Sony PS3 | Windows 7 |
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
<<

staffann

Serviio newbie

Posts: 8

Joined: Fri Jul 29, 2011 5:07 pm

Post Sun Jul 31, 2011 3:55 pm

Re: Why h264 file needs transcoding

No, that is the issue. The file (Chariots of Fire) won't play at all with that rule. It requires transcoding of the video stream to work (while the other file plays fine with mpegts, transcoded ac3 audio and original h264 video).

Edit: I'm inserting the MediaInfo information for each file below.

Chariots of Fire (the problem one):
  Code:
General
Complete name                    : \\BILBO\2TBDisk\My Shared Folder\Video\Chariots of Fire (1981) English subs [H264]\Chariots of Fire.avi
Format                           : AVI
Format/Info                      : Audio Video Interleave
File size                        : 893 MiB
Duration                         : 2h 3mn
Overall bit rate                 : 1 009 Kbps
Writing application              : MediaCoder 0.6

Video
ID                               : 0
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L4.0
Format settings, CABAC           : Yes
Format settings, ReFrames        : 4 frames
Codec ID                         : h264
Duration                         : 2h 3mn
Bit rate                         : 940 Kbps
Width                            : 854 pixels
Height                           : 480 pixels
Display aspect ratio             : 16:9
Frame rate                       : 29.970 fps
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.076
Stream size                      : 832 MiB (93%)
Writing library                  : x264 core 58
Encoding settings                : cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=4 / brdo=0 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=0 / threads=1 / nr=0 / decimate=1 / mbaff=0 / bframes=4 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=3 / wpredb=1 / bime=1 / keyint=250 / keyint_min=25 / scenecut=40 / rc=crf / crf=24.0 / rceq='blurCplx^(1-qComp)' / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / pb_ratio=1.30

Audio
ID                               : 1
Format                           : MPEG Audio
Format version                   : Version 2
Format profile                   : Layer 3
Mode                             : Joint stereo
Mode extension                   : MS Stereo
Codec ID                         : 55
Codec ID/Hint                    : MP3
Duration                         : 2h 3mn
Bit rate mode                    : Constant
Bit rate                         : 8 000 bps
Channel(s)                       : 2 channels
Sampling rate                    : 24.0 KHz
Compression mode                 : Lossy
Stream size                      : 48.8 MiB (5%)
Alignment                        : Aligned on interleaves
Interleave, duration             : 24 ms (0.72 video frame)
Interleave, preload duration     : 73 ms



The file that doesn't need video transcoding:
  Code:
General
Unique ID                        : 324688591062294593392280293186844649 (0x3E88622C7BE36ACDFABC9A282DB7E9)
Complete name                    : MYFILENAME.mkv
Format                           : Matroska
Format version                   : Version 2
File size                        : 4.36 GiB
Duration                         : 1h 45mn
Overall bit rate                 : 5 902 Kbps
Encoded date                     : UTC 2011-06-09 12:48:13
Writing application              : mkvmerge v4.8.0 ('I Got The...') built on May 25 2011 06:38:18
Writing library                  : libebml v1.2.0 + libmatroska v1.1.0

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L4.1
Format settings, CABAC           : Yes
Format settings, ReFrames        : 5 frames
Format settings, GOP             : M=4, N=57
Codec ID                         : V_MPEG4/ISO/AVC
Duration                         : 1h 45mn
Bit rate                         : 4 394 Kbps
Width                            : 1 280 pixels
Height                           : 696 pixels
Display aspect ratio             : 16:9
Original display aspect ratio    : 16:9
Frame rate                       : 23.976 fps
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.206
Stream size                      : 3.16 GiB (72%)
Writing library                  : x264 core 115 r1995 c1e60b9
Encoding settings                : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=12 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=4394 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00
Language                         : English

Audio
ID                               : 2
Format                           : DTS
Format/Info                      : Digital Theater Systems
Codec ID                         : A_DTS
Duration                         : 1h 45mn
Bit rate mode                    : Constant
Bit rate                         : 1 510 Kbps
Channel(s)                       : 6 channels
Channel positions                : Front: L C R, Side: L R, LFE
Sampling rate                    : 48.0 KHz
Bit depth                        : 24 bits
Compression mode                 : Lossy
Stream size                      : 1.12 GiB (26%)
Language                         : English

Text
ID                               : 3
<<

Cerberus

User avatar

DLNA master

Posts: 4114

Joined: Sun Jan 02, 2011 5:20 pm

Location: Reading, UK

Post Sun Jul 31, 2011 4:28 pm

Re: Why h264 file needs transcoding

must be something in the way the file is encoded then not sure.
Phil Bennett
Beta Tester Group
Wiki | FAQ

Samsung LE40C750 LCD | Samsung BD-C5900 | Sony PS3 | Windows 7 |
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging

Return to Panasonic

Who is online

Users browsing this forum: No registered users and 6 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.