LinHES Forums
http://forum.linhes.org/

How can I change/add labels to audio streams?
http://forum.linhes.org/viewtopic.php?f=15&t=19680
Page 1 of 1

Author:  goofee [ Sat Mar 14, 2009 3:17 pm ]
Post subject:  How can I change/add labels to audio streams?

I made a recording that has two audio streams. In the original recording file they are labeled (eng) and (esl). They playback perfectly regardless of what player I use. (internal, mplayer, xine, vlc, xbmc, wmp...) I made a cutlist to remove unwanted portions of the recording, then transcoded it using the lossless setting. It plays back fine but most players choose the wrong audio stream and has to be changed everytime it's played. The labels are missing from the transcoded file. Is there a way to re-add the labels? Or change the transcode setting to include them? Or better yet drop the second audio stream all together?

Before
Code:
$ ffmpeg -i /myth/tv/2504_20090303010000.mpg
Input #0, mpegts, from '/myth/tv/2504_20090303010000.mpg':
  Duration: N/A, start: 89324.883133, bitrate: N/A
  Program 1
    Stream #0.0[0x1122]: Video: mpeg2video, yuv420p, 544x480 [PAR 20:17 DAR 4:3], 15000 kb/s, 59.94 tb(r)
    Stream #0.1[0x1123](eng): Audio: mp2, 48000 Hz, stereo, s16, 160 kb/s
    Stream #0.2[0x1124](esl): Audio: mp2, 48000 Hz, stereo, s16, 160 kb/s

After
Code:
$ ffmpeg -i /myth/tv/2504_20090303010000.mpg
Input #0, mpeg, from '/myth/tv/2504_20090303010000.mpg':
  Duration: 01:52:00.88, start: 0.372656, bitrate: 1962 kb/s
    Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 544x480 [PAR 20:17 DAR 4:3], 15000 kb/s, 59.94 tb(r)
    Stream #0.1[0x1c1]: Audio: mp2, 48000 Hz, stereo, s16, 160 kb/s
    Stream #0.2[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16, 160 kb/s

Any ideas? Thanks.

Author:  cecil [ Sun Mar 15, 2009 3:47 pm ]
Post subject: 

I know there are utilities that can be used to play w/ mp3s. My thought is to, split the audio and video. Massage the mp3 as need then, combine the two. I however have not played w/ massaging mp3s.

Author:  alien [ Fri Apr 03, 2009 7:15 am ]
Post subject: 

Code:
ffmpeg -i input.mpg output.mpg
Will drop the second audio track. You can use the -map 2:1 option if you want the second track instead. The -alang eng can be used to set the audio track language back to english.

Author:  goofee [ Tue Apr 07, 2009 12:40 am ]
Post subject: 

Thanks. I'd been playing with ffmpeg a bit but couldn't get it to work quit right. I think I got it now. With your command it does drop the second audio channel but it transcoded it into some really poor quality video/audio file. Maybe there is a default setting but I didn't find it. I ended up setting the video and audio codecs to 'copy' and it then made a file with the same quality.
Code:
ffmpeg -i inputfile.mpg -map 0:0 -map 0:1 -vcodec copy -acodec copy output.mpg
This ran through in less than 5 minutes and worked perfectly. I used this site as a reference. It has some good info and examples.http://howto-pages.org/ffmpeg/

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/