スキップしてメインコンテンツに移動する sharinq (u/sharinq) - Reddit
sharinq u/sharinq さんのアバター。

sharinq

u/sharinq

フィードオプション
注目順
新しい順
賛成票数順
表示
カード
コンパクト

NHK World collection (English-language TV programs from Japan's public broadcaster)
r/DHExchange
NHK World collection (English-language TV programs from Japan's public broadcaster)
Sharing

NHK World is the international arm of Japan's public broadcaster NHK, which broadcasts English-language programs.

I'm sharing my collection of NHK World programs, some I've found on the internet and some I've recorded myself.

I previously shared my collection in 2021, but I've now deduplicated it, fixed filenames and reuploaded it.

Please see this post for links: https://www.reddit.com/r/NHKWorldFans/comments/1azh329/download_my_nhk_world_collection_from_1fichier/

I'm not longer archiving NHK World content myself, and I hope that the community will find ways to archive and share NHK World content going forward. If this interests you please visit the NHKWorldFans Discord for lively discussion about NHK World archiving: https://discord.gg/dNgCFZFpqS






  • It is relatively inexpensive. Premium is €5 for a month, €30 for a year.

  • Vouchers can be bought and given. I asked for and was thankfully given a 1ficher premium voucher for a year, so I haven't had to pay myself.

  • There is unlimited "hot" storage, so I can upload my entire collection and it will stay up until the files haven't been downloaded for a certain amount of time.

  • The API is simple and useful.

If there is a filehost that would have been more appropriate, please let me know.


I'm uploading my NHK World collection one last time
r/NHKWorldFans のアイコン。
r/NHKWorldFans
I'm uploading my NHK World collection one last time

Hi everyone!

I no longer have the interest to be active in this community or do NHK related projects, but it would be a shame if my collection of NHK World videos could not be accessed by those interested.

I think it would be great if there were (more) efforts to share this collection, perhaps via file hosts, servers, torrents, the Internet Archive, Usenet, or any other means we can think of. However, I don't have the interest to be part of such a project, so I'm simply uploading my collection to 1fichier one last time, and hoping that the community will take over from here.

I'd like it if we could have a list of community members who have downloaded the entire collection (once I've uploaded it all), and who are willing to reshare it (using 1fichier or however they want) for serious preservation/distribution efforts that they find inspiring.

I've shared my collection before, but some things are different now:

  • Duplicates have been removed

  • All the files are in MP4 format

  • Files are named using the format "Series Name - Episode Name.mp4" with some exceptions, for example episodic series might be named like "Series Name - S1E1 - Episode Name.mp4"

Please feel free to share any ideas you have about any of this!

Edit: My 1fichier premium was going to run out and I had a note in this post asking for a voucher, thanks to u/marwood0 for sending me one!




















Let's collectively record and upload programs that aren't on VOD! Let's collectively record and upload programs that aren't on VOD!

Hi everyone,

It's so great that people are recording and sharing shows that aren't on VOD, thank you u/Glagoo and u/EnterSpacePearl and u/nedragrevev, and thank you and sorry to everyone I've forgotten to mention here!

I think we should collectively record and upload new live stream programs in a somewhat organised way, to save time collectively. Thanks to an anonymous donor, I have a 1fichier account, and I can give people FTP access to upload to it. Anyone interested? :) It would be good to have more than one person recording, because recording from the live stream can go wrong easily, so two or three people recording might be wise.

Here are a few notes I have about recording the live stream:

  • There seem to be two 1080p live stream URLs, one which has "AI Subtitles" burned in to the upper left, and one which doesn't, so it seems like we should use the one that doesn't.

  • nhk-record seems like a really great project even though I haven't used it myself, but I have a question about it maybe someone could answer: does it trim the first frame correctly? I ask because IIRC if FFmpeg trims a downloaded TS file from the live stream, the first frame will be "frozen", but if I convert a downloaded TS file to MP4 and then trim it the fade from black seems to be trimmed correctly. I may be getting these details wrong, but maybe someone knows what I'm talking about. :)

  • I have let my scripts that I've posted here become out of date, I am very sorry about this! I have been meaning to update it and change it to a single cross-platform Python file.

  • We should try to get live recordings without breaking news ticker bars at the bottom. My script records all four airings of a program and tries to select a video that doesn't have a ticker bar. I think that nhk-record can actually remove them, but I think that this often isn't necessary since I don't think it usually covers all four airings, but I could be wrong.

  • A lot of shows are on VOD these days, do we know which shows are live stream only? I believe The Mark of Beauty, Lunch ON! and PythagoraSwitch Mini are only on the live stream, and Ceramic Treasures which was posted about recently if we haven't already got a complete set of them.

If anyone has any comments about this or any other ideas about things we should do, let us know! I think it would be great to somehow create a public NHK World archive, one that's not dependent on any one person (including me!), and I'm slowly organising and deduplicating my collection which I can upload again at some point, so if anyone has any ideas about this please let us know as well, but I'm sure I'll post about this again sometime in the future.









I've made an NHK World mini archive that auto-updates I've made an NHK World mini archive that auto-updates

I've made an auto-updating mini archive using 1fichier. It only contains recent 720p/1244K VOD files, so it's not the best archive imaginable, but it was cheap and easy to set up.

I hope it inspires others to create NHK World archiving projects of their own! Maybe we could all collaborate on something... Let us know if this interests you.

Here are the two shared folders:

I made two scripts to do the auto-updating. The first script collects VOD information from NHK and checks the 1080p URLs for validity: https://www.reddit.com/r/NHKWorldFans/comments/y50ex6/script_for_archiving_nhk_world_vod_data/

The second script remotely uploads from NHK to 1fichier: https://pastebin.com/raw/RugtDJuS

If anyone has any questions or ideas, please let me know, I am happy to explain anything. :)






さんが さんに返信しました

By the way, about an hour ago I slightly updated the script and my previously prepared nhk_vod_data.json (available via the MEGA link) to improve the validity checking for 1080p links, so you might want to update them if you had saved them previously.



さんがコメントしました

I've improved how FFmpeg checks the validity of URLs. Now it seeks to the halfway point and checks that, and now the two episodes you mentioned are correctly marked as invalid. It might be further improved by checking more than one point in the video. Thanks again!


さんがコメントしました

Hi! Here are some direct links, again from this JSON file: https://www.reddit.com/r/NHKWorldFans/comments/y50ex6/script_for_archiving_nhk_world_vod_data

But this time in a format that aria2 can download with the command aria2c -i urls.txt

Here it is: https://paste.ee/r/IRTVt/0

I figured that this might be more useful, sorry I didn't think about this for the Core Kyoto links, here they are in the same format in case it's still useful: https://paste.ee/r/6MKYA/0



さんが さんに返信しました

Hello!

Sorry I didn't mention this in in the post, but you'll need to install the yt-dlp module, which you can do from the command line with python -m pip install yt-dlp. Then you can try to unmodified script and see if it works.



I'm having trouble converting some TrollHD MKVs to MP4 I'm having trouble converting some TrollHD MKVs to MP4

Hi everyone, sorry that this is so off topic!

I've recently been converting my NHK collection to be all in MP4 format, for consistency and compatibility. This FFmpeg command has worked most of the time:

ffmpeg -i input.mkv -c copy output.mp4

However, some TrollHD MKVs aren't converting right, such as this episode of Document 72 Hours: https://mega.nz/file/xkBi3SBY#sl1cD5QYQf8pMneNlcqtC2TxRW0DGqfRi_IEPsNqQxU

FFmpeg shows a lot of output that looks like this:

[mp4 @ 0000022ac5710580] Non-monotonous DTS in output stream 0:0; previous: 1600, current: 528; changing to 1601. This may result in incorrect timestamps in the output file.

And the resulting MP4 has choppy playback with a lot of dropped frames.

Can anyone work out how to remux this file to MP4 without re-encoding? Or if this isn't possible, can someone tell me what the next best solution is?

Thanks!

P.S. I've also asked this question on our Discord, and I just wanted to mention the Discord because the link to it from this sub might be easy to miss: https://discord.gg/dNgCFZFpqS


I really don't know that much, but you don't need to know much to do useful things.

I like the free book Automate the Boring Stuff with Python. I haven't read much of it myself, but the content it covers seems well chosen, and just what you need for writing practical everyday scripts. Most of the topics in the first 11 chapters are important things to know, and from there I'd suggest just reading whatever chapters sound interesting (I would suggest the "Web Scraping" and "Working with CSV Files and JSON Data" chapters).

But, once you know a little bit of Python, I find that making scripts is mostly Googling things and using Python libraries, for example I don't know what "cross-correlation" really is and I've never used the SciPy library before but Googling lead me to it and I basically copied that bit from a couple of sources, and then the rest of the script is straightforward Python stuff.

Next time you are doing something repetitive, see if you can write a Python script to do it for you! :) Yes, it might actually take longer than doing it manually, but you'll have learned something that can make things faster next time, and you might even have created something that you can share with others.


I managed to make a Python script to do this, here's how it works:

  • It uses FFmpeg to take a 5 second bit of the audio of each video, and tries to make them more similar (mono, same sample rate, lowpass filter and the dynaudnorm filter)

  • It uses SoundFile to load the audio files, then SciPy's cross-correlation function scipy.signal.correlate and NumPy's argmax to get the time delay between the two audio files

  • It uses FFmpeg again to mux the audio and video together and uses itsoffset offset the audio

The script is used by putting the files with the best quality video in a folder named "video" and the files with the best quality audio in a folder named "audio", and each pair of files has the same filename (the files extensions can be different though), and then the combined files will be made in a folder named "output".

I'm sure this script isn't perfect and could be improved, but it seems to work alright with what I've tested it on.

Thanks u/nedragrevev for the inspiration!

import os
import subprocess
import numpy as np
import soundfile as sf
from scipy.signal import correlate

audio_no_exts = {}

for fn in os.listdir('audio'):
    no_ext = os.path.splitext(fn)[0]
    audio_no_exts[no_ext] = fn

pairs = []

for fn in os.listdir('video'):
    no_ext = os.path.splitext(fn)[0]
    if no_ext in audio_no_exts:
        pairs.append({
            'audio': os.path.join('audio', audio_no_exts[no_ext]),
            'video': os.path.join('video', fn),
            'output': os.path.join('output', no_ext+'.mp4'),
            'no_ext': no_ext
        })

os.makedirs('temp', exist_ok=True)
os.makedirs('output', exist_ok=True)

for p in pairs:
    if os.path.isfile(p['output']):
        continue

    print(p['no_ext'])

    wav_video_path = os.path.join('temp', p['no_ext']+'_video.wav')
    wav_audio_path = os.path.join('temp', p['no_ext']+'_audio.wav')

    def cmd(inp, out):
        return ['ffmpeg', '-y', '-i', inp, '-ss', '10', '-t', '5', '-ac', '1', '-ar', '44100', '-af', 'lowpass=f=3000,dynaudnorm', out]

    subprocess.run(cmd(p['video'], wav_video_path))
    subprocess.run(cmd(p['audio'], wav_audio_path))

    wav_video, fs = sf.read(wav_video_path)
    wav_audio, fs = sf.read(wav_audio_path)

    corr = correlate(wav_video, wav_audio)
    shift = (np.argmax(corr) - int(len(corr)/2)) / fs

    print(shift)

    os.remove(wav_video_path)
    os.remove(wav_audio_path)

    c = ['ffmpeg', '-y', '-i', p['video'], '-itsoffset', str(shift), '-i', p['audio'], '-c', 'copy', '-map', '0:v:0', '-map', '1:a:0', p['output']]
    subprocess.run(c)

try:
    os.rmdir('temp')
except:
    pass

さんが さんに返信しました

さんが さんに返信しました

さんが さんに返信しました

さんがコメントしました

Here are some direct links. By the way if anyone is interested, I made this by using the VOD data JSON file linked here: https://www.reddit.com/r/NHKWorldFans/comments/y50ex6/script_for_archiving_nhk_world_vod_data/

And this Python 3 script:

import json

with open('nhk_vod_data.json') as j:
    data = json.load(j)

for d in data:
    if d['title'] == 'Core Kyoto':
        title = d['sub_title_clean']
        if d['valid1080']:
            url = d['url1080']
        else:
            url = d['url720']

        print(f'* [{title}]({url})')

I'll split this into a few posts because of Reddit's character limit.

Edit: Links in aria2 input format: https://paste.ee/r/6MKYA/0





I see, thanks for the information!

You had the exact idea I had with using Audacity to sync both the audio streams and then FFmpeg to mux and adjust the sync, although I hadn't worked out the details, thanks for the pointer to the itsoffset flag.

I have been wishing to find something that can automatically sync two similar audio streams, or maybe something that could take a small part of one stream and "find" it in the other, but either way something to automatically get the sync difference between the two streams. I didn't ever find anything that looked promising. But, depending on how many videos there are and how efficient I can be, aligning them in Audacity visually might be OK. I guess the first step is to figure out how many videos I'm dealing with.

Thanks again! Oh, and don't worry about the post title, I didn't ever think anything was strange about it, it is a notice after all, and most posts aren't.


This is fantastic! I appreciate how well documented it all is too.

You've mentioned something that I have been wondering how to approach, which is syncing and muxing the audio from 720p VOD files with the excellent video quality but relatively poor audio quality of some over-the-air recordings. This has been something I've wanted to do myself for a while! Can you share how you've done this, specifically the syncing? I appreciate your offer to do this, and I might take you up on it but I worry that I might have too many videos that fall into this category (I plan to see how many there are soon as I sort out my collection).