Results 1 to 8 of 8

Thread: Coding problem with merge2ass.sh scripts from merging two subtitles

Hybrid View

  1. #1
    Join Date
    Jun 2010
    Location
    Damascus
    Beans
    11
    Distro
    Ubuntu 10.04 Lucid Lynx

    Coding problem with merge2ass.sh scripts from merging two subtitles

    Hi , Guys there is a script named merge2ass.sh and this is the link :
    ftp://ftp.berlios.de/pub/smplayer/tools/merge2ass.sh
    this script for merge 2 subtitles in one new subtitle file. and when play the movie you will see 2 subtitles
    one above screen and one below .so you can set tow languages .
    so this script works fine for me but when I set Arabic one of the tow languages the process will work fine but when film show the Arabic language will appear like question marks (????)
    I am sure the problem not from the player because it is also appears as question marks in the generated file(result from two subtitles merging).
    I think the problem is the coding. I have to make some configuration special for the Arabic language.
    there is a link in Smplayer forums that talke about this scripts and how to use it.
    http://smplayer.berlios.de/forums/viewtopic.php?id=1487
    please any suggestions to the way that I can solve my problem.
    Thanx in advance.

    Best Regards
    Bilal Salas
    Last edited by Eng.AbuWleeD; January 18th, 2011 at 12:15 PM. Reason: link added

  2. #2
    Join Date
    Jun 2010
    Location
    Damascus
    Beans
    11
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Coding problem with merge2ass.sh scripts from merging two subtitles

    guys any question about my thread??
    any missed information in my first post?
    help me.this forum for human-being and I am a human.
    so please help me.
    Thanx alot

  3. #3
    Join Date
    Feb 2008
    Beans
    10

    Re: Coding problem with merge2ass.sh scripts from merging two subtitles

    try inserting -utf8 in front of -dumpsrtsub in the script

  4. #4
    Join Date
    May 2009
    Beans
    4

    Re: Coding problem with merge2ass.sh scripts from merging two subtitles

    Quote Originally Posted by jose1711 View Post
    try inserting -utf8 in front of -dumpsrtsub in the script
    Thanks jose1711, that worked for me! And also thanks for the script

  5. #5
    Join Date
    Jun 2010
    Beans
    1

    Exclamation Re: Coding problem with merge2ass.sh scripts from merging two subtitles

    Hi!

    -unicode instead -utf8 worked better for me.

    BTW, I found a problem with SRT subtitles using milliseconds precision. SSA format does not support millisecond, and players go crazy if you use them. Therefore, the script should remove them.

    Here are the necessary changes. Change the function generate_ssa_dialogs() for the following one:

    Code:
    generate_ssa_dialogs(){
    sed -e "/ --> /s/,/./g" "${sub[1]}-temp" | tr -d "\r" | awk 'BEGIN{ORS="";print " "} / --> /,/^$/ {ORS=" ";print} /^$/{print "\n"}' | sed -e "s/ --> /,/g" -e "s/^ \([^ ]*\) \(.*\)/Dialogue: Marked=0,\1,lang1style,Cher,0000,0000,0000,,\2/" -e "s/,00:/,0:/g" -e "s/\([:,]\)0\([0-9]\)/\1\2/g" -e "s/\([0-9]\)\(.\)\([0-9]\)\([0-9]\)0\(,\)/\1\2\3\4\5/g" >>"$output"
    sed -e "/ --> /s/,/./g" "${sub[2]}-temp" | tr -d "\r" | awk 'BEGIN{ORS="";print " "} / --> /,/^$/ {ORS=" ";print} /^$/{print "\n"}' | sed -e "s/ --> /,/g" -e "s/^ \([^ ]*\) \(.*\)/Dialogue: Marked=0,\1,lang2style,Cher,0000,0000,0000,,\2/" -e "s/,00:/,0:/g" -e "s/^ *//g" -e "s/\([:,]\)0\([0-9]\)/\1\2/g" -e "s/\([0-9]\)\(.\)\([0-9]\)\([0-9]\)0\(,\)/\1\2\3\4\5/g" >>"$output"
    }
    Thanks for that awesome script!

  6. #6
    Join Date
    Jul 2007
    Location
    Magic City of the Plains
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Coding problem with merge2ass.sh scripts from merging two subtitles

    If a post is older than a year or so and hasn't had a new reply in that time, instead of replying to it, create a new thread. In the software world, a lot can change in a very short time, and doing things this way makes it more likely that you will find the best information. You may link to the original discussion in the new thread if you think it may be helpful.

  7. #7
    Join Date
    May 2010
    Beans
    1

    Re: Coding problem with merge2ass.sh scripts from merging two subtitles

    this script not works for me!!

  8. #8
    Join Date
    Feb 2008
    Beans
    10

    Re: Coding problem with merge2ass.sh scripts from merging two subtitles

    Quote Originally Posted by tongo View Post
    this script not works for me!!
    if you want someone to help you, you'll need to give us a bit more details..

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •