loading .ts HD clips

Hi Guys
Recently i found myself in the need of elaborate video recorded from a dreambox decoder grabbed directly from a satellite stream. I should work on them as soon as they are recorded and make different version to upload on an ftp server, one to be easily burned onto a video DVD (better an iso) and another to be played from a media player. Both things can be easily accomplished with kdenlinve.

The problem i encountered at first is that while kdenlive can load the ts file and starts making thumbnails i can just work with the audio, the video is black. I have this problem with HD ts streams (h264/ac3 on ts container).

At the beginning i tought that was just a matter of container so i exctracted the video with:

ffmpeg -i file.ts -an -vcodec copy -f h264 file.mp4

This command gives a lot of errors on the command line but eventually produces a readable media, but while other players can read the video, kdenlive does not show it leaving the video track completely black. So it is clearly a problem on the h264 stream coming from the dreambox:

Input #0, mpegts, from 'partita.ts':
Duration: 02:35:00.19, start: 56435.152367, bitrate: 5341 kb/s
Program 7742
Stream #0.0[0xa5]: Video: h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 57.21 fps, 50 tbr, 90k tbn, 50 tbc
Stream #0.1[0x19a](ita): Audio: ac3, 48000 Hz, stereo, s16, 384 kb/s
Stream #0.2[0x19b](und): Audio: ac3, 48000 Hz, stereo, s16, 384 kb/s
Stream #0.3[0x318]: Data: [5][0][0][0] / 0x0005
Stream #0.4[0x812]: Data: [5][0][0][0] / 0x0005
Stream #0.5[0x1a2](ara): Audio: mp2, 48000 Hz, 2 channels, s16, 192 kb/s
Stream #0.6[0x83b]: Data: [5][0][0][0] / 0x0005
Stream #0.7[0x898]: Data: [5][0][0][0] / 0x0005

How can i help debuggin this? Should i open a bugzilla entry?

H.264 video in .ts container is not well supported by ffmpeg/mlt/kdenlive, especially if it's interlaced. It's a very common issue...
According to ffmpeg, your file's framerate is 57.21 fps, which is non-standard, probably variable frame rate.
Whats does mediainfo (http://mediainfo.sourceforge.net/en) tell about your file ?

There's something you can try, without guarantee :
- demux the file with tsmuxer (http://www.smlabs.net/tsmuxer_en.html)
- remux the tracks you need into mkv with mkvmerge/mmg from the mkvtoolnix package (http://www.bunkus.org/videotools/mkvtoolnix/)
You'll get the same H.264 stream, but in a mkv container, better supported by ffmpeg. But there are chances that it will not work better in kdenlive...

Another solution (more conventional) is to convert the video to DNxHD before editing.

PS : mediainfo, tsmuxer and mkvtoolnix should be available through your distribution's repositories.

Hi tanks for reply

This is what mediainfo says (25.0fps!!??)

ID : 15E0
Complete name : /media/LaCie/partita.ts
Format : MPEG-TS
File size : 5.78 GiB
Duration : 2h 34mn
Overall bit rate : 5 341 Kbps

ID : 165 (0xA5)
Menu ID : 7742 (0x1E3E)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.0
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Format settings, GOP : M=1, N=40
Duration : 2h 34mn
Bit rate : 4 108 Kbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 fps
Standard : Component
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Top Field First
Bits/(Pixel*Frame) : 0.079
Stream size : 4.45 GiB (77%)
Color primaries : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
Transfer characteristics : BT.709-5, BT.1361
Matrix coefficients : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177

About converting it to DNxHD i tried to leave it converting overnight and after 8 hours it was barely at 50% converting 6fps. Strange because it started at 24 and i have an intel core i3.

I will try to demux with tsmuxer