2011-01-04, 15:11
Hi,
after weeks of tweaking (and cursing) I finally am able to convert tvheadend mkv's to another format that is suitable for e.g. cutting and / or transcoding.
althought the recorded mkv's play correct in xbmc / vlc or another player, cutting or transcoding software always made either the resulting file unplayable (green screen, sound but hanging picture, artifacts) or the sound out-of-sync with the video.
So how did I do it?
1. convert .mkv to .ts format (ffmpeg -i input.mkv -acodec copy -vcodec copy output.ts)
please note that the .ts is not always playable!
2. open the .ts with application dvbcut (google for ppa) the file is being indexed
3a. cut commercials or begin / end slack
3b. export to .mpg from within dvbcut
you wil notice that dvbcut will 'repair' all missing frames that can cause the issues with the resulting file.
The exported mpg file can then be transcoded.
I use handbrake (new version came out today!) to convert the resulting mpg to m4v format.
still not sure why transcoding or even unpacking both video and audio streams from the mkv makes the sound out-of-sync?
can it be that tvheadend resulting mkv doesn't start with the required frame (but instead with some 'in-between frame')?
Hope this can help somebody who's facing the same challenges
will also update the wiki over at tvheadend site once I have 'upgraded' to the redmine system.
regards,
Ruud
after weeks of tweaking (and cursing) I finally am able to convert tvheadend mkv's to another format that is suitable for e.g. cutting and / or transcoding.
althought the recorded mkv's play correct in xbmc / vlc or another player, cutting or transcoding software always made either the resulting file unplayable (green screen, sound but hanging picture, artifacts) or the sound out-of-sync with the video.
So how did I do it?
1. convert .mkv to .ts format (ffmpeg -i input.mkv -acodec copy -vcodec copy output.ts)
please note that the .ts is not always playable!
2. open the .ts with application dvbcut (google for ppa) the file is being indexed
3a. cut commercials or begin / end slack
3b. export to .mpg from within dvbcut
you wil notice that dvbcut will 'repair' all missing frames that can cause the issues with the resulting file.
The exported mpg file can then be transcoded.
I use handbrake (new version came out today!) to convert the resulting mpg to m4v format.
still not sure why transcoding or even unpacking both video and audio streams from the mkv makes the sound out-of-sync?
can it be that tvheadend resulting mkv doesn't start with the required frame (but instead with some 'in-between frame')?
Hope this can help somebody who's facing the same challenges
will also update the wiki over at tvheadend site once I have 'upgraded' to the redmine system.
regards,
Ruud