VideoHelp Forum
+ Reply to Thread
Results 1 to 9 of 9
Thread
  1. I have a number of Chinese VCDs and have been using vcdgear to extract them. However, the style for these is to put Mandarin on one stereo channel and Cantonese on the other. I want to use these files with Plex, which won't isolate a stereo channel in the way VLC media player will, so I need to split the audio track in two. While I could extract with Handbrake this means re-encoding the video, which I obviously want to avoid.

    What's the best way to go about this? My initial queries led me to tools like Yamb, is that the best way?
    Quote Quote  
  2. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    According to HydrogenAud.io forums, you could test if this works for dual-channel MP2 (no guarantees):

    Code:
    BeSplit -core( -input stereo.mp2 -prefix .\channels -type mp2 -demux )
    Quote Quote  
  3. What would the workflow for that look like? My approach was:

    1. Convert MPG to MP4 using Yamb
    2. Extract streams from MP4 in raw format using Yamb (which for some reason comes out as an mp3 not an mp2)
    3. Use BeSplit to split the audio into each channel
    4. Use Yamb to concatenate the m1v and two mp2 files into a single file

    But Yamb, while showing the mp2 files in its file browsing view, doesn't add them to the list when selected.

    Sadly I can't use the output anyway as BeSplit seems to mangle the audio.
    Quote Quote  
  4. ffmpeg: https://trac.ffmpeg.org/wiki/AudioChannelManipulation

    Code:
    ffmpeg -i stereo.mp4 -af "pan=mono|c0=c1" -c:v copy -c:a aac mono.mp4
    Drag and drop onto a batch file, adds .mono to base name:
    Code:
    ffmpeg -i %1 -af "pan=mono|c0=c1" -c:v copy -c:a aac "%~dpn1.mono%~x1"
    Specify audio codec/bitrate and container as necessary.

    All mp4 files in folder:
    Code:
    for %%F in (*.mp4) do ( ffmpeg -i "%%~dpnxF" -af "pan=mono|c0=c1" -c:v copy -c:a aac "%%~dpnF.mono%%~xF" )
    Or are you looking to keep both channels as separate tracks? The web site shows how to do that too.
    Last edited by jagabo; 24th Jul 2021 at 17:49.
    Quote Quote  
  5. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    there is no easy way to do it. unless you are experienced in making vcds. best is to use the player to only play left or right audio as was expected when it was made.
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  6. I see that VCDGear remuxes to MPG with MP2 audio. This will convert the single stereo track to two mono tracks and remux to a new MPG:

    Code:
    for %%F in (*.mpg) do ( ffmpeg -y -i "%%~dpnxF" -filter_complex "[0:a]channelsplit=channel_layout=stereo[left][right]" -map 0:v -map "[left]" -map "[right]" -c:v copy -c:a mp2 "%%~dpnF.mono2x%%~xF" )
    A 49 minute VCD MPG file took about 15 seconds to convert. Here you can see MPCHC playing the resulting MPG file with two selectible audio tracks:

    Image
    [Attachment 60019 - Click to enlarge]


    Oops, I checked the audio sync of the new file and it it was off by several seconds at the end of the video. The source I was using actually a DAT file copied from a VCD many years ago, renamed .MPG. There were several complaints from ffmpeg about timestamps during the conversion. Although the DAT file plays properly with audio in sync, attempts to remux it with other tools failed or resulted in A/V sync errors too. Maybe the cleanup that VCDGear performs will help with those problems and give you an MPG file that ffmpeg can deal with properly.
    Last edited by jagabo; 24th Jul 2021 at 19:53.
    Quote Quote  
  7. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    lol. it's only a pos vcd to begin with. not sure why anyone would devote more than 5 minutes to converting it. get a better source.
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  8. Originally Posted by aedipuss View Post
    lol. it's only a pos vcd to begin with. not sure why anyone would devote more than 5 minutes to converting it. get a better source.
    Point me to a store which ships internationally with an in stock DVD or better copy of seasons 1 & 2 of the 1998 show Princess Pearl (还珠格格) with Cantonese audio and Chinese subtitles, and I'll happily pick it up.
    Quote Quote  
  9. Originally Posted by jagabo View Post
    I see that VCDGear remuxes to MPG with MP2 audio. This will convert the single stereo track to two mono tracks and remux to a new MPG:

    Code:
    for %%F in (*.mpg) do ( ffmpeg -y -i "%%~dpnxF" -filter_complex "[0:a]channelsplit=channel_layout=stereo[left][right]" -map 0:v -map "[left]" -map "[right]" -c:v copy -c:a mp2 "%%~dpnF.mono2x%%~xF" )
    Thanks, I very much appreciate the time you spent on this. I will see if the audio remains in sync.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!