Semi-dubbed movies

Ask specific questions about your target languages. Beginner questions welcome!
User avatar
arthaey
Brown Belt
Posts: 1080
Joined: Sat Jul 18, 2015 9:11 pm
Location: Seattle, WA, USA
Languages: :
EN (native);
ES (adv receptive, int productive);
FR (false beginner);
DE (lapsed beg);
ASL (lapsed beg);
HU (tourist)
Language Log: viewtopic.php?f=15&t=3864&view=unread#unread
x 1675
Contact:

Semi-dubbed movies

Postby arthaey » Sun Sep 27, 2015 4:32 am

One reason I tend to dislike dubbed movies is because I know what the famous actors are supposed to sound like, and if they don't do an exceptional job matching the voice, it really bugs me.

So, my thought was, what if you spliced together the original voices for the primary actors of a movie plus the dubbed voices for all the supporting cast? It would be a TON of work and a major pain, of course... but now I'm curious what the end result might be like to watch.
0 x
Posts in: FrenchGermanHungarianSpanish
NaNoWriMo: 10,000 words
Corrections welcome in any language; I prefer an informal register.

Ruan
Yellow Belt
Posts: 99
Joined: Thu Aug 27, 2015 1:05 pm
Languages: Brazilian Portuguese (N), English
Language Log: viewtopic.php?f=15&t=1370
x 154

Re: Semi-dubbed movies

Postby Ruan » Sun Sep 27, 2015 9:31 am

Actually, it's a pretty simple job if you have written down when the primary actors speak.
Then it's just a matter of using standard unix tools to do the trick.

Use ffmpeg to split both videos, original and dubbed, in 60 second chunks with this one-liner:

ffmpeg -i fff.avi -acodec copy -f segment -segment_time 10 -vcodec copy -reset_timestamps 1 -map 0 -an fff-%d.avi

"fff.avi" is the name of the source clip. Change "-segment_time 10" to the general duration you want for each segment. If you want each clip to be about 40 seconds, then use "-segment_time 40". Use "-an" if you don't want the resulting clips to have sound.



Then run:

ls *.avi > list.txt
sort -n -t - -k 2 list.txt > list.txt.keep
sed -i '/fff-\|ff2-/!d' list.txt.keep
rm list.txt
mv list.txt.keep list.txt

Remember to change fff and ff2 in the 3rd line to the names of both videos.

You want list.txt to end up looking like this:
matrixen-0.avi
matrixes-0.avi
matrixen-1.avi
matrixes-1.avi
matrixen-2.avi
matrixes-2.avi
matrixen-3.avi
matrixes-3.avi


Now run

sed -i '1~2 s/^/rm /' list.txt
sed -i '2~2 s&^&#&' list.txt
mv list.txt list.sh

And you'll get in list.sh

rm matrixen-0.avi
#matrixes-0.avi
rm matrixen-1.avi
#matrixes-1.avi
rm matrixen-2.avi
#matrixes-2.avi
rm matrixen-3.avi
#matrixes-3.avi


So that running

sh list.sh

removes English audio by default.
If you want to rather keep the English audio and remove the Spanish audio for minute 2, run

sed -i '3s&#&rm &' list.sh
sed -i '4s&rm &#&' list.sh

Notice that, for minute n, the filenames are ( n - 1 ) and the line numbers are the nth odd line number, for the first language, and the nth even line number, for the second language.

1, 2, 3, 4, 5, 6, 7, 8
1, 1, 2, 2, 3, 3, 4, 4

So let's say you wrote in a file called delete.txt the minutes you don't want, and they're all in the first language.

1
3
4
7

That means you want to edit the 1st, the 3rd, the 4th and the 7th odd line numbers in the file list.sh.
This will make the conversion:

Code: Select all

seq 1 2 100 > odd.txt
#replace 100 with larger number if you have more than 100 split files
sed -i 's,^,sed -n ,' delete.txt
sed -i 's,$,p odd.txt >> linenumbers.txt,' delete.txt
mv delete.txt delete.sh
sh delete.sh


Therefore running this as "sh editlist.sh"...

Code: Select all

#!/bin/bash
cp list.sh list.sh.keep
NEXTLINE=0
while read line
do
   sed -i ''"$line"'s&rm &#&' list.sh
   NEXTLINE=$((line+1))
   sed -i ''"$NEXTLINE"'s&#&rm &' list.sh
done < linenumbers.txt
sh list.sh


...will do the trick.

Now list and sort, merge everything back with ffmpeg, and you got your movie.

ls *.avi > list.txt
sort -n -t - -k 2 list.txt > list.txt.keep
sed -i 's#^#file \x27./#' list.txt.keep
sed -i 's#$#\x27#' list.txt.keep
ffmpeg -f concat -i list.txt.keep -c copy hereisyourmovie.avi
Last edited by Ruan on Mon Sep 28, 2015 7:23 am, edited 17 times in total.
2 x

User avatar
rdearman
Site Admin
Posts: 7231
Joined: Thu May 14, 2015 4:18 pm
Location: United Kingdom
Languages: English (N)
Language Log: viewtopic.php?f=15&t=1836
x 23128
Contact:

Re: Semi-dubbed movies

Postby rdearman » Sun Sep 27, 2015 12:09 pm

You have to love unix...

But seriously, wouldn't it be annoying to have two people speaking English and the other 90% speaking French or something?
1 x
: 0 / 150 Read 150 books in 2024

My YouTube Channel
The Autodidactic Podcast
My Author's Newsletter

I post on this forum with mobile devices, so excuse short msgs and typos.

User avatar
arthaey
Brown Belt
Posts: 1080
Joined: Sat Jul 18, 2015 9:11 pm
Location: Seattle, WA, USA
Languages: :
EN (native);
ES (adv receptive, int productive);
FR (false beginner);
DE (lapsed beg);
ASL (lapsed beg);
HU (tourist)
Language Log: viewtopic.php?f=15&t=3864&view=unread#unread
x 1675
Contact:

Re: Semi-dubbed movies

Postby arthaey » Sun Sep 27, 2015 12:53 pm

Ruan wrote:Actually, it's a pretty simple job if you have written down when the primary actors speak.
Then it's just a matter of using standard unix tools to do the trick.

This is true if you can assume that the primary actors' audio never overlaps with the others'... and I'm not at all sure that this is a valid assumption for most movies. I don't know much about audio processing, but I was under the impression that separating out overlapping voices would be a pain.

rdearman wrote:You have to love unix...

How can you not love unix, when it makes such tasks (relatively) trivial? :)

rdearman wrote:But seriously, wouldn't it be annoying to have two people speaking English and the other 90% speaking French or something?

I'm sure it would annoying to many people, but I find myself intrigued by the idea. Especially since I find it extremely annoying for well-known actors to speak with the "wrong" voice. ;)

Maybe I'll put together a short, simple scene as a demo, so I can see whether I like it in practice as much as in theory...
0 x
Posts in: FrenchGermanHungarianSpanish
NaNoWriMo: 10,000 words
Corrections welcome in any language; I prefer an informal register.

Ruan
Yellow Belt
Posts: 99
Joined: Thu Aug 27, 2015 1:05 pm
Languages: Brazilian Portuguese (N), English
Language Log: viewtopic.php?f=15&t=1370
x 154

Re: Semi-dubbed movies

Postby Ruan » Sun Sep 27, 2015 1:09 pm

arthaey wrote:
Ruan wrote:Actually, it's a pretty simple job if you have written down when the primary actors speak.
Then it's just a matter of using standard unix tools to do the trick.

This is true if you can assume that the primary actors' audio never overlaps with the others'... and I'm not at all sure that this is a valid assumption for most movies. I don't know much about audio processing, but I was under the impression that separating out overlapping voices would be a pain.


Surely. Voice recognition is still not state-of-the-art technology, so you'd have to double check everything you'd tell a C library or whatever to process. And you'd have to fiddle round with this sort of stuff. So, although it's not impossible, I'd take a lot of time.

rdearman wrote:But seriously, wouldn't it be annoying to have two people speaking English and the other 90% speaking French or something?

I'm sure it would annoying to many people, but I find myself intrigued by the idea. Especially since I find it extremely annoying for well-known actors to speak with the "wrong" voice. ;)

Maybe I'll put together a short, simple scene as a demo, so I can see whether I like it in practice as much as in theory...


I'll try my luck at this, too. I'll post here whatever happens.
1 x

User avatar
Polyclod
Yellow Belt
Posts: 99
Joined: Sat Jul 18, 2015 12:46 pm
Location: Texas
Languages: Speaks: English (N), Spanish, French, German (Intermediate)
Learning: Russian
Hit List: Brazilian Portuguese, Japanese
Language Log: viewtopic.php?f=15&t=1181
x 188

Re: Semi-dubbed movies

Postby Polyclod » Sun Sep 27, 2015 2:31 pm

As someonewho wants to learn Russian, I can say initially I was frustrated because it seems like everything aside from children's cartoons is dubbed with basically a Russian speaker talking loudly over the original English track. I'm not sure why Russian dubbing is so awful, but hey that's a reason to get into natively produced materials ASAP!
1 x
Bücher:

Star Trek The Next Generation Tod im Winter: 82 / 348

Русский

Assimil Russian: 30 / 100

User avatar
arthaey
Brown Belt
Posts: 1080
Joined: Sat Jul 18, 2015 9:11 pm
Location: Seattle, WA, USA
Languages: :
EN (native);
ES (adv receptive, int productive);
FR (false beginner);
DE (lapsed beg);
ASL (lapsed beg);
HU (tourist)
Language Log: viewtopic.php?f=15&t=3864&view=unread#unread
x 1675
Contact:

Re: Semi-dubbed movies

Postby arthaey » Sun Sep 27, 2015 3:03 pm

Polyclod wrote:As someonewho wants to learn Russian, I can say initially I was frustrated because it seems like everything aside from children's cartoons is dubbed with basically a Russian speaker talking loudly over the original English track. I'm not sure why Russian dubbing is so awful, but hey that's a reason to get into natively produced materials ASAP!

That is... not the kind of "semi-dubbed" I was looking for... ;)

My condolences on what sounds like a pretty lousy dubbing experience!
0 x
Posts in: FrenchGermanHungarianSpanish
NaNoWriMo: 10,000 words
Corrections welcome in any language; I prefer an informal register.

User avatar
pir
Orange Belt
Posts: 174
Joined: Fri Aug 07, 2015 7:24 am
Location: BC, Canada
Languages: Groks fluently: English, German
Dutch (C2~)
Swedish (B2~ on hold)
Romanian (B1~ on hold)
Swahili, Wolof, Esperanto, Russian (A1 on hold)
Studies: French (B1~), Japanese (A1), Spanish (A0)
~ means ++passive than active knowledge.

Corrections: YES!
Language Log: viewtopic.php?f=15&t=1132
x 507
Contact:

Re: Semi-dubbed movies

Postby pir » Sun Sep 27, 2015 6:45 pm

rdearman wrote:But seriously, wouldn't it be annoying to have two people speaking English and the other 90% speaking French or something?

That's just an average day among my code-switching Montreal friends. ;)
2 x

Ruan
Yellow Belt
Posts: 99
Joined: Thu Aug 27, 2015 1:05 pm
Languages: Brazilian Portuguese (N), English
Language Log: viewtopic.php?f=15&t=1370
x 154

Re: Semi-dubbed movies

Postby Ruan » Sun Sep 27, 2015 7:18 pm

rdearman wrote:You have to love unix...

But seriously, wouldn't it be annoying to have two people speaking English and the other 90% speaking French or something?

Image
Image
1 x

User avatar
neofight78
Blue Belt
Posts: 539
Joined: Wed Jul 22, 2015 8:02 pm
Location: Novosibirsk, Russia
Languages: English (N), Russian (B2+), Spanish (A0)
Language Log: viewtopic.php?t=833
x 1232

Re: Semi-dubbed movies

Postby neofight78 » Sun Sep 27, 2015 9:19 pm

Polyclod wrote:As someonewho wants to learn Russian, I can say initially I was frustrated because it seems like everything aside from children's cartoons is dubbed with basically a Russian speaker talking loudly over the original English track. I'm not sure why Russian dubbing is so awful, but hey that's a reason to get into natively produced materials ASAP!


I couldn't agree more. Often it's the same person doing all the voices and there is absolutely no acting involved at all, it's all read out out in a completely lifeless fashion. It's worse because just when you think you've escaped it, some foreign character pops up in your native material to offend your ears with yet more lousy dubbing.
0 x


Return to “Practical Questions and Advice”

Who is online

Users browsing this forum: No registered users and 2 guests