Opened 14 years ago

Closed 14 years ago

Last modified 9 years ago

#406 closed defect (fixed)

mythtranscode --mpeg2: sample rate not set - Error writing output header

Reported by: laga@… Owned by: anonymous
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: yes

Description

Hello all!

I'm trying to use the new mpeg2 transcoding which was introduced to MythTV in ticket #158. However, I'm experiencing a problem with mythtranscode just quitting without actually doing anything. Here comes the log:

mythtv@styx:/mnt/foo/video$ mythtranscode --mpeg2 --infile 1070_20050925201000_20050925221000.nuv --honorcutlist 2005-10-01 23:14:14.891 Using runtime prefix = /usr 2005-10-01 23:14:14.954 New DB connection, total: 1 2005-10-01 23:14:14.985 New DB connection, total: 2 2005-10-01 23:14:15.005 Begining MPEG2 to MPEG2 transcode of Donnie Darko (Donnie Darko) - ... cutlist will be honored. Input #0, mpegts, from '1070_20050925201000_20050925221000.nuv':

Duration: N/A, bitrate: N/A Stream #0.0[0x2ff]: Video: mpeg2video, yuv420p, 720x576, 25.00 fps, 15000 kb/s Stream #0.1[0x300](deu): Audio: mp2, 48000 Hz, stereo, 192 kb/s Stream #0.2[0x301](deu): Audio: mp3

Output #0, dvd, to '1070_20050925201000_20050925221000.nuv.tmp':

Stream #0.0: Video: mpeg2video, 720x576, 25.00 fps, q=2-31, 15000 kb/s Stream #0.1: Audio: 0x0000, 48000 Hz, stereo, 192 kb/s Stream #0.2: Audio: 0x0000

[dvd @ 0x407b10c0]sample rate not set Error writing output header

I should add a few words on my setup, I think. I'm running Debian Sarge and MythTV is built from yesterday's SVN. I recorded this show off my DBox (thanks to levon), so I think it's DVB style. Mythtranscode --mpeg2 seems to work ok so far on other recordings, but this one also shows an odd behaviour in mythfrontend: I can select two audio tracks, one being the regular German audio track ("unknown mp2 2ch"), the other one is called "unknown mp3 2ch". When I switch to the second track, I don't get any sound. In conclusion, I think that this is not usual for a recording, but it still would be nice to transcode the beast :)

I will be glad to provide additional information as needed and I hope we can get this fixed somehow if it turns out to be a bug within MythTV.

Change History (7)

comment:1 Changed 14 years ago by mccarthy.aaron@…

It looks like it is failing on the MP3 audio stream. There is not checking in mpeg2trans.cpp for valid DVD video/audio streams. In Australia the DVB-T audio streams are valid DVD audio, so I didn't add any checks when I implemented the new transcoder. Should be a simple mater of checking for non-DVD compatible streams and ignoring them in the MPEG2trans::InitOutput? function.

To keep that particular stream it would need to be reencoded to a DVD compatible codec.

comment:2 Changed 14 years ago by laga@…

Hi Aaron!

Thanks for your prompt reply. Your approach on the problem is very simple and effective, however, I can't implement it due to my lack of any coding skills.

I've spend some time looking at mpeg2trans.cpp and eventually figured out how to make it spit out some debugging messages. However, it doesn't make any sense to me - I think that I'm just printing the wrong stuff (variables? I wouldn't know ;).

You can take a look at my changes here: http://laga.ath.cx/~laga/mythtv/mpeg2trans-verbose.patch

That's what I get when running my modified version of mythtranscode (sorry for the formatting)

laga@styx:~/myth-dev/mythtv/programs/mythtranscode$ ./mythtranscode --mpeg2 --ho norcutlist --infile /mnt/foo/video/1070_20050925201000_20050925221000.nuv 2005-10-04 12:24:52.111 Using runtime prefix = /usr 2005-10-04 12:24:52.146 New DB connection, total: 1 2005-10-04 12:24:52.162 New DB connection, total: 2 2005-10-04 12:24:52.178 Begining MPEG2 to MPEG2 transcode of Donnie Darko (Donni e Darko) - ... cutlist will be honored. Input #0, mpegts, from '/mnt/foo/video/1070_20050925201000_20050925221000.nuv':

Duration: N/A, bitrate: N/A Stream #0.0[0x2ff]: Video: mpeg2video, yuv420p, 720x576, 25.00 fps, 15000 kb/s Stream #0.1[0x300](deu): Audio: mp2, 48000 Hz, stereo, 192 kb/s Stream #0.2[0x301](deu): Audio: mp3

2005-10-04 12:24:52.692 verbose message: ost->codec->codec_type 0 2005-10-04 12:24:52.693 verbose message: ost->codec->codec_id 2 2005-10-04 12:24:52.694 verbose message: ost->codec->codec_tag 0 2005-10-04 12:24:52.694 verbose message: ist->codec->codec_type 0 2005-10-04 12:24:52.695 verbose message: ist->codec->codec_id 2 2005-10-04 12:24:52.695 verbose message: ist->codec->codec_tag 0 2005-10-04 12:24:52.696 verbose message: ost->codec->codec_id 86017 2005-10-04 12:24:52.697 verbose message: ost->codec->codec_tag 0 2005-10-04 12:24:52.697 verbose message: ist->codec->codec_type 1 2005-10-04 12:24:52.698 verbose message: ist->codec->codec_id 86017 2005-10-04 12:24:52.698 verbose message: ist->codec->codec_tag 0 2005-10-04 12:24:52.699 verbose message: ost->codec->codec_type 1 2005-10-04 12:24:52.699 verbose message: ost->codec->codec_id 86017 2005-10-04 12:24:52.699 verbose message: ost->codec->codec_tag 0 2005-10-04 12:24:52.700 verbose message: ist->codec->codec_type 1 2005-10-04 12:24:52.700 verbose message: ist->codec->codec_id 86017 2005-10-04 12:24:52.701 verbose message: ist->codec->codec_tag 0 Output #0, dvd, to '/mnt/foo/video/1070_20050925201000_20050925221000.nuv.tmp':

Stream #0.0: Video: mpeg2video, 720x576, 25.00 fps, q=2-31, 15000 kb/s Stream #0.1: Audio: 0x0000, 48000 Hz, stereo, 192 kb/s Stream #0.2: Audio: 0x0000

2005-10-04 12:24:52.704 Couldn't open output file, error #-2 laga@styx:~/myth-dev/mythtv/programs/mythtranscode$

When you take a closer look at the "verbose messages", you'll notice that I get every message three times. I believe that this happens because my recordings has three streams, including the broken mp3 stream. However, two of those three messages are identical, which doesn't make much sense to me.

It would be really nice if someone could shed some light on this. It would be even better if someone who actually knows to program could implement this (ever written a "hello world" program? I bow to you). Let's just hope that someone considers this to be an important issue :)

regards, Michael "laga" Haas

comment:3 Changed 14 years ago by danielk

Owner: changed from Isaac Richards to jdonavan
Version: head
  1. Donavan, any idea about this?

I see you committed #158.

I would have punted this to cpinkham otherwise.

comment:4 Changed 14 years ago by Geoffrey Hausheer

Owner: changed from jdonavan to anonymous
Status: newassigned

comment:5 Changed 14 years ago by Geoffrey Hausheer

Resolution: fixed
Status: assignedclosed

Well, I have no idea if this is fixed or not, but I just replaced the entire mpeg2 transcoding stuff with completely different code (which will actually work). So retest. If you are still having problems, open a new ticket with the specific messages.

comment:6 in reply to:  3 Changed 9 years ago by anonymous

Replying to danielk:

  1. DonHuan?, any idea about this?

I see you committed #158.

I would have punted this to cpinkham otherwise.

comment:7 Changed 9 years ago by stuartm

Ticket locked: set
Note: See TracTickets for help on using tickets.